Enterprise Collaboration with Liferay
From the Source
If you set up these tools from source, create a staging area for the code and installer binaries:
mkdir /opt/install
After obtaining the Apache http server source and mod_jk binary [1], place them in the new directory /opt/install. You can obtain Liferay 4.4.2 – bundled with Tomcat 5.5 and the SQL scripts bundle – from the Liferay website [2]. Also, you will need the Java 6 binary [3] and the MySQL Connector for Java [4] – be sure you get the right version! Check the MySQL version with mysql --version.
Next, create a directory for Liferay to reside in:
mkdir /opt/liferay-4.4.2
Then copy the Liferay bundle to the new directory and expand:
cp /opt/install/liferay-portal-tomcat-5.5-jdk5-4.4.2.zip /opt/liferay-4.4.2 cd /opt/liferay-4.4.2 unzip ./liferay-portal-tomcat-5.5-jdk5-4.4.2.zip remove zip file: rm ./liferay-portal-tomcat-5.5-jdk5-4.4.2.zip
Create group apache and user tomcat as a member of Apache:
groupadd apache useradd -g apache tomcat make Tomcat startup scripts executable chmod 755 /opt/liferay-4.4.2/bin/*.sh
Next, configure the database connection settings and mail server settings:
vi /opt/liferay-4.4.2/conf/Catalina/localhost/ROOT.xml
Edit the file so that it resembles the file in Listing 1. Note the username set earlier for the MySQL user lportal and the password in mysql config.
Listing 1
ROOT.xml
Now, untar and drop the MySQL Connector into /opt/liferay-4.4.2/lib/ext:
cd /opt/install tar -zxvf ./mysql-connector-java-5.1.5.tar.gz cd mysql-connector-java-5.1.5 cp ./mysql-connector-java-5.1.5-bin.jar /opt/liferay-4.4.2/common/lib/ext
(Your MySQL Connector file name may be different.) To populate the MySQL database, create a directory to expand the SQL scripts to and load the appropriate one into MySQL:
mkdir /opt/install/sql-scripts mv /opt/install/liferay-portal-sql-4.4.2.zip /opt/install/sql-scripts cd /opt/install/sql-scripts unzip ./lilferay-portal-sql-4.4.2.zip cd create-minimal mysql lportal -u lportal -p < ./create-minimal-mysql.sql
This example uses the minimal install database script because this configuration doesn't require much cleanup before production deployment. In the folder named create, you will find scripts that will load up a richly populated instance of Liferay, much like the Liferay website. If you have time on your hands, you can load the database from that folder to explore an environment with users, groups, content, and communities already set up.
Starting Liferay
Change ownership of /opt/tomcat-4.4.2 to user tomcat, group apache:
chown -R tomcat:apache /opt/liferay-4.4.2
Create a startup script similar to the script showing in Listing 2.
Listing 2
/etc/init.d/liferay
Now, make the script executable, set up Liferay as a service, and test Liferay:
chmod 755 /etc/init.d/liferay chkconfig --add liferay chkconfig liferay on service liferay start
Tail the output of the log file to see that Liferay starts up ok:
tail -f /opt/liferay-4.4.2/logs/catalina.out
Errors involving the MySQL driver or an inability to determine the dialect for MySQL could indicate an incorrect driver version. Verify the version of MySQL running on the server and the version of the MySQL driver you have installed. Also make sure that ownership for the connector is tomcat:apache.
Point your browser to http://{serverIpAddress}:8080 to test the configuration. You should see the default welcome page with a login prompt.
Looking Forward
Congratulations. You now have a working implementation of Liferay. Although it is still not production-ready, it is ready for you to dive in and familiarize yourself with the system. The next steps are to install the Apache http server and mod_jk Tomcat connector. Before building Apache, check out Liferay. Using the password test, log in with test@liferay.com, and then change the password on the test@liferay.com account by selecting My Account under the Welcome button in the upper right corner.
With the default setup, all new users get their own community. Users get a sort of sandbox, where they can place portlets and switch around screen layouts without affecting the public pages.
Now would be a great time to take a breather and peruse some of the Liferay online documentation at http://www.liferay.com/web/guest/community/documentation.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Find SysAdmin Jobs
News
-
Kubuntu Focus Announces XE Gen 2 Linux Laptop
Another Kubuntu-based laptop has arrived to be your next ultra-portable powerhouse with a Linux heart.
-
MNT Seeks Financial Backing for New Seven-Inch Linux Laptop
MNT Pocket Reform is a tiny laptop that is modular, upgradable, recyclable, reusable, and ships with Debian Linux.
-
Ubuntu Flatpak Remix Adds Flatpak Support Preinstalled
If you're looking for a version of Ubuntu that includes Flatpak support out of the box, there's one clear option.
-
Gnome 44 Release Candidate Now Available
The Gnome 44 release candidate has officially arrived and adds a few changes into the mix.
-
Flathub Vying to Become the Standard Linux App Store
If the Flathub team has any say in the matter, their product will become the default tool for installing Linux apps in 2023.
-
Debian 12 to Ship with KDE Plasma 5.27
The Debian development team has shifted to the latest version of KDE for their testing branch.
-
Planet Computers Launches ARM-based Linux Desktop PCs
The firm that originally released a line of mobile keyboards has taken a different direction and has developed a new line of out-of-the-box mini Linux desktop computers.
-
Ubuntu No Longer Shipping with Flatpak
In a move that probably won’t come as a shock to many, Ubuntu and all of its official spins will no longer ship with Flatpak installed.
-
openSUSE Leap 15.5 Beta Now Available
The final version of the Leap 15 series of openSUSE is available for beta testing and offers only new software versions.
-
Linux Kernel 6.2 Released with New Hardware Support
Find out what's new in the most recent release from Linus Torvalds and the Linux kernel team.