CMS | Clarity
Bringing sense to
content management.
Really.
No joke.

Install Liferay on a Base Ubuntu Server or Desktop

Send to friendPrinter-friendly version

Liferay LogoIn case you've never heard of Liferay, here's a brief introduction. Liferay is a Java-based platform that serves two purposes: first, it is a portal system. In other words, one can develop portlets (these range from an individual content well to a full fledge application) and then drag and drop them upon any given page. Second, it possesses a full fledged content management system that focuses on excellent UI (helped along with the wonderful jQuery library) and standards' based approaches to implementation. Moreover, Liferay is Open Source and is nearly programming language and system agnostic. Not a Java person? Fine, create portlets in PHP, Python, Ruby, or Groovy! Last but not least, Liferay has been recognized by Gartner which is bound to satisfy even the most skeptical of execs. So beyond almost non-existent documentation, Liferay has everything to love.

The focus of this article (as the title may have given away) is how to install Liferay on an Ubuntu Linux server or desktop. Herein I assume that you have a newly installed machine just waiting for customization, but long standing instances will suffer no setbacks. In an effort to make life a little easier, I've created a shell script that will do the bulk of the work for you. After it finishes, a few manual commands should see a complete Liferay instance running happily.

As always, this article and all articles like it are considered helpful suggestions, and as such we do not guarantee accuracy. Remember, only you can assume liability.

Alright, now that Smokey the Wanna Be Lawyer has departed, let's talk setup. There are numerous types of Liferay instances that one can stand up--from JBoss to Glassfish--but we are using the base Liferay 5.2.1 + Tomcat 6. If you wish to use another package, then remove the wget lines from the shell script and roll your own. Second, I'm not a huge fan of utilizing Tomcat by itself to run an instance for numerous reasons, the least of which isn't improved ssl handling. As a result, this guide will set up Apache2 and set up mod_ajp_proxy to get Apache as the frontend. The database that will be set up is MySQL as it's quick and painless to utilize. Lastly, a new MySQL user will be created so useful but oh so dangerous Root-with-no-password won't cause headaches down the road. Also, this script sets up PHP5 and Python so one can develop portlets in those languages. Postfix is also installed in case you need a mail server. If you do not wish to have PHP, Python, or Postfix then remove line 2, 5, and 6 respectively.

Step 1
Now that that's finished, let's install! First download the shell script and rename the extension from .txt to .sh. If you are not interested in what it does, then feel free to skip down to step two. To start, the script will install base packages such as Apache2, PHP5, MySQL, and Java. Once that is finished, the script wgets the needed packages from SourceForge, unzips them, and then places them in /opt/liferay. Modify that destination path if you so choose. After setting up the base data in a DB named lportal for MySQL and creating another user, ajp_proxy is then enabled for Apache.

Step 2
To launch the shell script, you may have to first make it executable. So, issue the command

chmod 755 install_liferay.sh

Then execute it with

sudo ./install_liferay.sh

When MySQL is installing, you will be prompted to enter a root password which you can enter and then verify. When Postfix comes along, choose "Internet Site" as the type of configuration and then either your domain name or ip address for the name of the server. After Java and the liferay packages are downloaded, the script will begin setting up the DB. Simply follow the prompts to set the username and password for the new user.

Step 3
Finally, once the script is finished executing, it is time to run a few manual commands to complete the process.
Type

java -version

and note the number. It should be something similar to 1.6.0_10. Next edit your .bashrc file and set the JAVA HOME variable like so:

nano ~/.bashrc

Scroll to the bottom and then enter the following making sure to substitute in your specific Java version in lieu of the X's. For this process, convert the underscore in the java version number you got to a dot.

export JAVA_HOME=/usr/lib/jvm/java-6-sun-x.x.x.x

Finally, hit Ctrl+X to exit nano. Be sure to hit "y" to save the changes and enter to keep the same name of the file.

Step 4
Let's configure Apache! Issue

sudo nano /etc/apache2/sites-enabled/000-default

When nano appears, change the entries of NameVirtualHost * (if you have it) and <VirtualHost *> to NameVirtualHost*:80 and <VirtualHost *:80>.

Then paste the below after the line that begins with ServerAdmin:

ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / ajp://localhost:8009/

To finish up, restart Apache with

sudo /etc/init.d/apache2 restart

Step 5
Congratulations! Liferay should now be ready to start. Change to Liferay's bin by typing

cd /opt/liferay/tomcat*/bin

followed by issuing the command

sudo ./startup.sh

You can now point your browser to http://localhost:8080 to get Tomcat's attention. Once you are greeted with your very own Liferay site, you can then abandon the ":8080".

cialis

Ubuntu Server or Desktop

I love reading and I am always searching for informative information like this! I enjoyed reading your articles. This is truly a great read for me. Thanks for the post

Online Sweepstakes

buy viagra

cheap viagra

buy cialis

buy cialis

qYuBdT

aQCTODiy qYuBdT

cheap viagra

cheap viagra

cheap viagra

cialis

viagra online

Nice Post

Nice post and will look forward for future updates

Thanks
SEO Company

cialis online

Tremendous post

Tremendous post and will look forward to your future update.

SEO Services

cheap viagra

buy viagra

cialis

buy viagra

cheap viagra

buy cialis

generic viagra

cheap viagra

generic viagra