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
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4
-
Fedora Unleashes Atomic Desktops
Fedora has combined its solid distribution with rpm-ostree system to make it possible to deliver a new family of Fedora spins, called Fedora Atomic Desktops.
-
Bootloader Vulnerability Affects Nearly All Linux Distributions
The developers of shim have released a version to fix numerous security flaws, including one that could enable remote control execution of malicious code under certain circumstances.