Requirements

Liferay

 

OS and Hardware Settings

Virtual: Why not - the benefits are huge

Preferred OS: Ubuntu LTS 64-bit

Hardware: At least 2 CPU's and at least 3 GB Ram

Installation

Prepare database

Create the Database

mysql> create database liferay  CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on liferay.* to liferay@localhost identified by '*****';
Query OK, 0 rows affected (0.00 sec)

Install binaries

Download Liferay from https://www.liferay.com/downloads/liferay-portal/overview

JAVA is not integrated, and must be installed seperately

MySQL Driver is at http://dev.mysql.com/downloads/connector/j/

Unzip the download, the goal is to have the install 

cd /opt
unzip liferay-portal-tomcat-6.2-ce-ga2-20140319114139101.zip
mv liferay-portal-tomcat-6.2-ce-ga2-20140319114139101 liferay

If You use MySQL, we need to copy in the driver (get it here) first to /opt/liferay/tomcat-7.0.42/lib:

sudo cp mysql-connector-java-5.1.34-bin.jar /opt/liferay/tomcat-7.0.42/lib

Enter MySQL stuff

vi /opt/liferay/tomcat-7.0.42/webapps/ROOT/WEB-INF/classes/portal-ext.properties
 
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/liferay?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=liferay
jdbc.default.password=******

Start Liferay

cd /opt/liferay/tomcat-7.0.42/bin
./startup.sh

Using CATALINA_BASE:   /opt/liferay/tomcat-7.0.42
Using CATALINA_HOME:   /opt/liferay/tomcat-7.0.42
Using CATALINA_TMPDIR: /opt/liferay/tomcat-7.0.42/temp
Using JRE_HOME:        /opt/jre
Using CLASSPATH:       //opt/liferay/tomcat-7.0.42/bin/bootstrap.jar
Using CATALINA_PID:    /opt/liferay/tomcat-7.0.42/temp/catalina.pid
Tomcat started.
root@myserver:~#

See everything is ok:

root@myserver:~# tail -f /opt/liferay/tomcat-7.0.42/logs/catalina.out

A Common problem is:

09:52:53,735 INFO  [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
09:52:58,382 ERROR [localhost-startStop-1][Cache:120] Unable to set localhost. This prevents creation of a GUID. Cause was: lrserver: lrserver
java.net.UnknownHostException: lrserver: lrserver
	at java.net.InetAddress.getLocalHost(Unknown Source)
	at net.sf.ehcache.Cache.<clinit>(Cache.java:214)

This can be fixed by editing /etc/hosts, so "lrserver" is 127.0.0.1


After Restart, You can go to http://localhost:8080 (or a fitting URL):

First thing is the Basic Configuration

Then, the install:

After the Install, a notice of the status and where to find the config:

Finally, the Portal is up:


 

Meet me at