13 Oct

How to install Alfresco 5.0.a Community Edition on Ubuntu 14.04 LTS

alfresco logoAfter the development of my most viewed post sharing how to install Alfresco 4.2.c on Ubuntu 10.04 LTS (more than 35.000 views) and Windows Server 2008 R2 (more that 13.000 views), it’s time to update the tutorial to the newest major version of Alfresco: Alfresco Community Edition 5.0.a. Even if the 5-th version is quite different from the 4-th version, the installation process is more or less the same… but let’s describe exactly the differences. The operating system choosen for the tutorial is Ubuntu 14.04.01 LTS.

Differently from the other post, the tutorial is separated in two parts: the installation of the dependencies and the Alfresco installation. As we like and prefer, the installation is a step by step list of commands and tasks: simpler to understand, to do and to test. Hope you’ll be agree.

Read More

07 Jan

How to install Pentaho Business Analytics platform 5

In this tutorial we are going to see how to install Pentaho Business Analytics Platform 5. The so called Pentaho BI-Server 5 is the front-end tool of the Pentaho Suite that develop a pure (and complete) user interface to use all the different analytical tools developed by the Suite.

If you have a Linux based operating system or a Windows based platform, the tutorial should work in any case because, you will see, the steps are very simple and easy and not related on the platform.

This tutorial describes the default installation using the HSQL database for the security storage. If you want to know how to install it using MySql database instead, I suggest this tutorial made by David Fombella.

Prerequisites

Before start to install the Pentaho BI-Server 5 you have to check to have Java installed in you system. To check it, you have simply to execute the command below from a terminal.

java -version

If you don’t have it, below you can find a tutorial on how to install it. Please, remember that Pentaho BI-Server 5 requests Java7.

Download and install Pentaho Business Analytics Platform 5 Community Edition

After Java7 is available into your system, you have to download the Pentaho BI-Server 5 package from the official website or the sourceforge web page. In our case we are going to install the Pentaho Business Analytics 5 Community Edition.

Once the ‘biserver-ce-5.0.1-stable.zip’ file will be downloaded in the system, unzip it on the desktop or everywhere else you will like. All the Pentaho Business Analytics 5 tool is available in a folder described below:

biserver-ce

Probably you cannot believe me but this is enough to install Pentaho Business Analytics 5 into your system. 😉

First run and access to the user interface

Pentaho Business Analytics 5 is mainly a web application deployed in a tomcat servlet container. You can easily run the Pentaho Business Analytics 5, opening a terminal and executing the ‘start-pentaho’ script stored in the ‘biserver-ce’ folder (the one with the ‘sh’ extension for the Linux based operating systems and the one with the ‘bat’ extension for the Windows based operating systems).

To check what is happening to the web application, you can see at the log in the file described below.

<biserver-ce>/tomcat/logs/catalina.out

Once, the application is started, you can access to the user interface using a web browser at the link below.

http://<server>:8080/pentaho

With the Community Edition is suggested to use Mozilla Firefox or Google Chrome instead of MS IE Explorer (not well supported today).

To access as administrator you can use the ‘admin’ user with password ‘password’.

After the first run you are ready to use it.. for example with the A.A.A.R. solution. 😉

11 Mar

Step by step installation of Alfresco Community 4.2.c on Windows Server 2008 R2 Standard 64bit… please, no bundle!

Alfresco Community 4.2.cAfter the high interest of the installation tutorial under Ubuntu plaform, in this post is shared the installation of Alfresco Community 4.2.c on Windows Server 2008 R2 Standard 64bit with Apache Tomcat 7.0.30 and PostgreSQL 9.0.10. The purpose installation is not the bundle installation but a more “robust” for an enterprise configuration. As we like and prefer the installation is a step by step list of commands and tasks… simpler to understand, to do and to test. Hope you’ll be agree.

Before starting…

In this tutorial I use a brand new Windows Server 2008 R2 Standard 64bit installation with a user called ‘alfresco’, different from the Administrator user. Connected as ‘alfresco’ user:

JDK 1.7u7

http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Download and execute ‘jdk-7u7-windows-x64.exe’.
  • Install the jdk in ‘C:AlfrescoJavajdk1.7.0_07’.
  • Install the jre in ‘C:AlfrescoJavajre7’.
  • Click on Start -> Digit ‘cmd’ and press enter.
java -version
  • Check the java version described.
  • Right click on ‘Computer’ -> Properties -> Advanced settings -> Environment variables -> New variable with name ‘JAVA_HOME’ and value ‘C:AlfrescoJavajdk1.7.0_07’ -> Press ‘Ok’ and close all.

ImageMagick 6.7.9-4

To enable image manipulation in Alfresco, we have to install and configure ImageMagick.
Official site: http://www.imagemagick.org/script/binary-releases.php#windows
Binaries: http://imagemagick.spd.co.il/binaries/

  • First of all download GhostScript 9.06 (gs906w64.exe) used to render PDF documents, from Google Code.
  • Install gs906w64.exe in ‘C:Alfrescogs9.06’.
  • Download ‘ImageMagick-6.7.9-4-Q16-windows-x64-static.exe’ from here.

ATTENTION: Other ImageMagik versions could not work.

  • Install ‘ImageMagick-6.7.9-4-Q16-windows-x64-static.exe’ in ‘C:AlfrescoImageMagick’.
  • During the installation, check flags: ‘Add application directory to your system path’ and ‘Associate supported file extensions with ImageMagick’.
  • Click on Start -> Digit ‘cmd’.
convert.exe -version
  • Check the version described.
ffmpeg
  • Check the version described.

SWFTools 0.9.1

SWFTools is a collection of utilities to work with Adobe Flash files (SWF files).
Download it from ‘http://www.swftools.org/download.html‘.

  • Download ‘swftools-0.9.1.exe’ in the Windows section.
  • Install in ‘C:AlfrescoSWFTools’ for all users.
  • Do not create shortcut or other.
  • Right click on ‘Computer’ -> Properties -> Advanced settings -> Environment variables -> Select ‘Path’ -> Modify -> Add ‘;C:AlfrescoSWFTools’ at the end -> Press ‘Ok’ and close.
  • Click on Start -> Digit ‘cmd’
pdf2swf.exe -V
  • Check the version described.

LibreOffice Windows, version 3.5.7, English (GB)

LibreOffice is used to manage office documents.
Download site: http://www.libreoffice.org/download
Previous versions: http://www.libreoffice.org/download/?nodetect

  • Download and execute ‘LibO_3.5.7_Win_x86_install_multi.msi’.
  • Install for all the users.
  • Custom installation.
  • Install in ‘C:AlfrescoLibreOffice’.
  • Leave defaults (desktop link apart).
  • Click on Start -> Digit ‘cmd’.
C:AlfrescoLibreOfficeprogramsoffice.exe
  • LibreOffice will start.

Let’s discuss about tuning. Alfresco requires that Office runs headless as a hidden process. To do that:

  • Click on Start -> Digit ‘cmd’.
C:AlfrescoLibreOfficeprogramsoffice.exe "-accept=socket,host=localhost,port=8101;urp;StarOffice.ServiceManager" -nologo -headless
  • To check the Office processes: open the task manager where there are two different processes called “soffice.exe *32” and “soffice.bin *32”.
  • Select “soffice.exe *32” and terminate the process. Also the other will be terminated.
  • Click on Start -> Digit ‘notepad++.exe C:AlfrescoLibreOfficestart_oo.bat’ and create a new file.
@echo off

rem -----------------------------
rem -                           -
rem - START Resident OpenOffice -
rem -                           -
rem -----------------------------

C:AlfrescoLibreOfficeprogramsoffice "-accept=socket,host=localhost,port=8101;urp;StarOffice.ServiceManager" -nologo -headless
  • Save and exit.
  • Click on Start -> Digit ‘C:AlfrescoLibreOfficestart_oo.bat’.

ATTENTION: A command window will be opened with no content and never closed. Don’t worry, close it and everything will be fine.

  • Open the task manager and check again the two processes: “soffice.exe *32” and “soffice.bin *32”.

ATTENTION: Restarting the system, the Office headless processes will not restart. Remeber to execute the ‘start_oo.bat’ script otherwise no preview or Office documents will be managed by Alfresco.

PostgreSQL 9.0.10

Download from  ‘http://www.enterprisedb.com/products-services-training/pgdownload#windows‘.

  • Execute the installation.
  • Install in ‘C:AlfrescoPostgreSQL9.0’.
  • Set data folder as ‘C:AlfrescoPostgreSQL9.0data’.
  • Choose your own password.
  • Press next, next, next…
  • No added packages with StackBuilder.

Now it’s time to customize the PostgreSQL installation for Alfresco.

  • Click on Start -> PostgreSQL 9.0 -> SQL shell (psql)
  • Login as default user
CREATE ROLE alfresco WITH PASSWORD 'alfresco' LOGIN;
CREATE DATABASE alfresco WITH OWNER alfresco;
  • q to exit
  • Click on Start -> PostgreSQL 9.0 -> SQL shell (psql)
  • Login as ‘alfresco’ user on the ‘alfresco’ db with password ‘alfresco’.
ALTER USER alfresco WITH PASSWORD 'alfresco';
  • q to exit

Tomcat 7.0.30

Download from ‘http://tomcat.apache.org/‘.

  • Download ‘Tomcat 7.0’ -> Quick Navigation -> Archives -> 7.0.30 -> bin -> apache-tomcat-7.0.30-windows-x86.zip
  • Unzip it in ‘C:Alfresco’ and rename ‘apache-tomcat-7.0.32’ in ‘tomcat’.
  • Click on Start -> Digit ‘cmd’
cd C:Alfrescotomcatbin
startup.bat
  • A command window will be opened with inside all the execution logs of the Tomcat start.
  • At the end, after few seconds, open a browser to the url: http://localhost:8080/
  • To stop the Tomcat server, in the command window, execute:
shutdown.bat

Let’s customize the Tomcat installation for Alfresco.

  • Click on Start -> Digit ‘C:Alfrescotomcatconf’.
  • Copy ‘catalina.properties’ in ‘catalina.properties.orig’.
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatconfcatalina.properties’
  • Replace the ‘shared.loader’ line, initially set empty, to this value
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
  • Save and exit.
  • Copy ‘server.xml’ in ‘server.xml.orig’.
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatconfserver.xml’
  • Add ‘URIEncoding=”UTF-8″‘ to:
<Connector port="8080" protocol="HTTP/1.1"...
  • Save and exit.
  • Click on Start -> Digit ‘C:Alfrescotomcatconf’.
  • Copy ‘context.xml’ in ‘context.xml.orig’.
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatconfcontext.xml’
  • Add this line between the ‘<Context>’ starting and closing tag.
<Valve className="org.apache.catalina.authenticator.SSLAuthenticator" securePagesWithPragma="false" />
  • Save and exit.
  • From the Alfresco package ‘alfresco-community-4.2.c.zip’ extract the ‘postgresql-9.0-802.jdbc4’ from the ‘web-serverlib’ folder and copy it in ‘C:Alfrescotomcatlib’.

Alfresco Community 4.2.c

  • Click on Start -> Digit ‘C:Alfrescotomcat’
  • Create folder ‘endorsed’.
  • Create folder ‘shared’.
  • Create folder ‘shared/classes’.
  • Create folder ‘shared/lib’.
  • Unzip the ‘alfresco-community-4.2.c.zip’ package in ‘C:Alfrescotomcat’.
  • Move all the content of the folder ‘web-server/endorsed’ in ‘endorsed’.
  • Move all the content of the folder ‘web-server/shared’ in ‘shared’.
  • Move all the content of the folder ‘web-server/webapps’ in ‘webapps’.
  • Delete the file ‘README.txt’.
  • Delete the folder ‘web-server’.
  • Right click on ‘Computer’ -> Properties -> Advanced settings -> Environment variables -> Select ‘Path’ -> Modify -> Add ‘C:Alfrescotomcatbin’ -> Press ‘Ok’ and close.
  • Click on Start -> Digit ‘C:Alfrescotomcatsharedclasses’
  • Copy ‘alfresco-global.properties.sample’ in ‘alfresco-global.properties’
  • Click on Start -> Digit ‘notepad++.exe C:Alfrescotomcatsharedclassesalfresco-global.properties’.
  • Change the settings as described below, leaving all the rest not modified.
...
dir.root=C:\Alfresco\alf_data
# IMPORTANT: Leave the comment on the dir.keystore property.
...
db.username=alfresco
db.password=alfresco
...
#
# External locations
#-------------
# LibreOffice installation
ooo.exe=C:\Alfresco\LibreOffice\program\soffice.exe
ooo.enabled=true
jodconverter.officeHome=C:\Alfresco\LibreOffice
jodconverter.portNumbers=8101
jodconverter.enabled=true
# ImageMagick installation
img.root=C:\Alfresco\ImageMagick
img.exe=C:\Alfresco\ImageMagick\convert.exe
# SWFTools exe
swf.exe=C:\Alfresco\SWFTools\pdf2swf.exe
...
db.schema.update=true
...
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost:5432/alfresco
...
index.recovery.mode=AUTO
...
authentication.chain=alfrescoNtlm1:alfrescoNtlm
...
alfresco.rmi.services.host=0.0.0.0
...
  • Save and exit.

Now it’s time to define the start/stop script.

  • Click on Start -> Digiti ‘notepad++.exe C:Alfrescoalfresco.bat’
  • Of course create it with this content.
@echo off

rem ---------------------------
rem -                         -
rem - Start and Stop Alfresco -
rem -                         -
rem ---------------------------

set ALF_HOME=C:Alfresco
set CATALINA_HOME=%ALF_HOME%tomcat
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx768m -Xss768m -server -XX:MaxPermSize=256M

if /I "%1"=="start" goto :start
if /I "%1"=="stop" goto :stop
echo Usage: alfresco.bat [start stop]
goto :end

:start
%CATALINA_HOME%binstartup.bat
goto :end

:stop
%CATALINA_HOME%binshutdown.bat
goto :end

:end
  • Save and exit.
  • Click on Start -> Digit ‘cmd’ -> Right click on ‘cmd’ and execute it as administrator.
cd C:Alfresco
alfresco.bat start
  • A command window will be opened with inside all the execution logs of the Alfresco start.
  • Some minutes should be enough…
  • During bootstrap no error should appear.
  • At the end, open a browser and access to the url ‘http://localhost:8080/share’.

Last but not least, remember to copy ‘C:AlfrescotomcatbinWin32NetBIOSx64.dll’ in ‘C:WindowsSystem32’. This is usefull to make work the CIFS access to Alfresco on this Windows platform.

That’s all…

01 Feb

Step by step installation of Liferay 6.1.1 CE GA2 on Ubuntu 12.04 LTS 64bit and Tomcat 7… no bundle please!

liferay-logoIn this post is shared the installation of Liferay 6.1.1 Community Edition GA2 on Ubuntu 12.04 LTS 64bit with Apache Tomcat 7.0.35 and PostgreSQL 8.4.15. The purpose installation is not the bundle one but the more “robust” alternative for an enterprise configuration.

The post is based on the installation tutorial described in the ‘Step by step installation of Liferay 6.1.1 CE GA2 on Ubuntu 12.04 LTS and JBoss 7 64bit… no bundle please!‘ with the difference that in this case the installation is on Apache Tomcat instead of Jboss Application Server.

As we like and prefer, the installation is a step by step list of commands and tasks… simpler to understand, to do and to test. Hope you’ll be agree.

Sources

In this paragraph are collected the used sources for the installation. I suggest to download and store them in a safe repository for future purposes (re-installation, maintainance, etc.).

Creation of a Virtual Machine with Ubuntu 12.04 LTS – 64bit – Desktop

For development purpose you should create your own environment on a virtual machine useful to customizations and tests. Of course if you are in a production environment you can jump directly to the next paragraph talking about the JDK installation.

In this case we use the Oracle VirtualBox as virtualization product but nothing should happen if you prefer VMPlayer or other solutions.

As first step, create the virtual machine with at least 2Gb RAM and start it using the ‘ubuntu-12.04.1-desktop-amd64.iso’ file. During the installation you receive some easy questions, driving you in the installation task.

Below some suggestions:

  • Admit downloading and installation of third party software and update during installation.
  • Machine name: liferay
  • Password: liferay
  • Launch update manager and reboot (more times until no update or errors). This task is not mandatory but suggested.
  • VirtualBoxMenu -> Devices -> Install Guest Additions
  • Open a terminal and execute:
sudo apt-get update
  • VirtualBoxMenu -> Devices -> Shared folders -> Add a new folder called ‘Desktop’ linked to your desktop.
  • Execute in the terminal:
sudo mount -t vboxsf Desktop /mnt
ls -la /mnt

The last command is done to check everything is properly set.

Java 1.7u9

  • Execute in the terminal:
sudo mkdir -p /opt/java
sudo chown liferay:liferay /opt/java
sudo cp -r /mn/.../jdk-7u9-linux-x64.tar.gz /opt/java
cd /opt/java
gunzip jdk-7u9-linux-x64.tar.gz
tar xvf jdk-7u9-linux-x64.tar
rm jdk-7u9-linux-x64.tar
sudo nano /etc/profile.d/java.sh

.

export JAVA_HOME=/opt/java/jdk1.7.0_09
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
  • Exit saving the file content.
  • Exit from the user session (disconnect the user session) and reconnect again to receive the changes.
  • Open a terminal and execute the commands below to test if everything is properly set.
java -version
javac -version

Postgresql 8.4.15

We always prefer to compile PostgreSQL from the sources to have a full control of the installation and customizations.

  • Execute in the terminal:
sudo mkdir -p /opt/postgresql
sudo chown liferay:liferay /opt/postgresql
sudo cp /mnt/.../postgresql-8.4.15.tar.gz /opt/postgresql
cd /opt/postgresql
gunzip postgresql-8.4.15.tar.gz
tar xvf postgresql-8.4.15.tar
rm postgresql-8.4.15.tar
mkdir -p /opt/postgresql/8.4.15
cd /opt/postgresql/postgresql-8.4.15/
sudo apt-get install libreadline-dev
sudo apt-get install zlib1g-dev
./configure exec_prefix=/opt/postgresql/8.4.15
sudo make exec_prefix=/opt/postgresql/8.4.15
sudo make install exec_prefix=/opt/postgresql/8.4.15
  • Let’s create the data directory to store all data files and some configurations comprise defining the postgres user.
mkdir /opt/postgresql/8.4.15/data
mkdir /opt/postgresql/8.4.15/log
sudo adduser postgres
  • Use ‘postgres’. Other informations are optional.
sudo chown -R postgres:postgres /opt/postgresql
 su - postgres
  • Digit the password ‘postgres’.
nano .environment-8.4.15

.

export POSTGRES_VERSION=8.4.15
export LD_LIBRARY_PATH=/opt/postgres/${POSTGRES_VERSION}/lib
export PATH=/opt/postgres/${POSTGRES_VERSION}/bin:${PATH}
  • Exit from the editor saving the file content.
chmod 777 .environment-8.4.15
. .environment-8.4.15
/opt/postgresql/8.4.15/bin/initdb -D /opt/postgresql/8.4.15/data/ --encoding=UNICODE
exit
  • Back to the liferay user, let’s define some scripts used to manage the services.
sudo nano /etc/init.d/postgresql.8.4.15

.

case "$1" in

start)
 echo "Starting postgres"
 /bin/su - postgres -c "/home/postgres/postgresql-8.4.15 start"
 ;;
stop)
 echo "Stopping postgres"
 /bin/su - postgres -c "/home/postgres/postgresql-8.4.15 stop"
 ;;
* )
 echo "Usage: /sbin/service postgresql.8.4.15 {start|stop}"
 exit 1

esac

exit 0
  • Exit from the editor saving the file content.
sudo chmod 777 /etc/init.d/postgresql.8.4.15
su - postgres
  • Digit the password ‘postgres’.
. .environment-8.4.15
nano /home/postgres/postgresql-8.4.15

.

# Parameters: start or stop.
export POSTGRES_VERSION=8.4.15
# Check parameter.
if [ "$1" != "start" ] && [ "$1" != "stop" ]; then
 echo "Specify start or stop as first parameter."
 exit
fi

# Add stop switch.
__STOP_SWITCH=""
if [ "$1" = "stop" ]; then
 __STOP_MODE="smart"
 __STOP_SWITCH="-m $__STOP_MODE"
 echo "Stop switch is: $__STOP_SWITCH"

fi

# Do it.
export LD_LIBRARY_PATH=/opt/postgresql/${POSTGRES_VERSION}/lib
~/.environment-${POSTGRES_VERSION}
/opt/postgresql/${POSTGRES_VERSION}/bin/pg_ctl 
    -D /opt/postgresql/${POSTGRES_VERSION}/data 
    -l /opt/postgresql/${POSTGRES_VERSION}/log/postgresql.log 
    $1 $__STOP_SWITCH

# Alternative command.
# /opt/postgresql/${POSTGRES_VERSION}/bin/postgres -D /opt/postgresql/${POSTGRES_VERSION}/data
  • Exit from the editor saving the file content.
chmod 777 /home/postgres/postgresql-8.4.15
service postgresql.8.4.15 start
exit
  • Back to the liferay user, let’s create the database used from liferay.
su - postgres
  • Digit the password ‘postgres’.
. .environment-8.4.15
/opt/postgresql/8.4.15/bin/psql

.

CREATE ROLE liferay WITH PASSWORD 'liferay' LOGIN;
CREATE DATABASE lportal WITH OWNER liferay;
<ctrl> + d

.

/opt/postgresql/8.4.15/bin/psql -U liferay -d lportal
ALTER USER liferay WITH PASSWORD 'liferay';
<ctrl> + d

.

exit
  • Back to the liferay user.

Apache Tomcat 7.0.35

Now it’s time to install Apache Tomcat.

sudo mkdir /opt/liferay
sudo chown liferay:liferay /opt/liferay
cp /mnt/.../apache-tomcat-7.0.35.tar.gz /opt/liferay
cd /opt/liferay
tar -xvf apache-tomcat-7.0.35.tar.gz
rm -rf apache-tomcat-7.0.35.tar.gz
sudo mv apache-tomcat-7.0.35 /opt/liferay/tomcat
  • Done! Let’s start Tomcat to test everything is working properly.
/opt/liferay/tomcat/bin/startup.sh
  • Open your browser and access to ‘http://localhost:8080’ to test the default Apache page is rendered.
  • Shutdown the server
/opt/liferay/tomcat/bin/shutdown.sh

Liferay 6.1.1 Community Edition GA2 on Tomcat

Not many documentations are well done like the Liferay ones. To this link the steps for Tomcat installation of Liferay.

mkdir /opt/liferay/tomcat/lib/ext
cd /opt/liferay/tomcat/lib/ext
cp /mnt/.../liferay-portal-dependencies-6.1.1-ce-ga2-...zip /opt/liferay/tomcat/lib/ext
unzip liferay-portal-dependencies-6.1.1-ce-ga2-...zip
rm -rf liferay-portal-dependencies-6.1.1-ce-ga2-...zip
mv liferay-portal-dependencies-6.1.1-ce-ga2/*.jar .
rm -rf liferay-portal-dependencies-6.1.1-ce-ga2
  • Extract the Liferay src in a temporary folder. Starting from now we’ll call it $LIFERAY_SOURCE.
  • Copy from $LIFERAY_SOURCE/lib/development to your $TOMCAT_HOME/lib/ext: activation.jar, jms.jar, jta.jar, jutf7.jar, mail.jar, persistence.jar.
  • Copy from $LIFERAY_SOURCE/lib/portal to $TOMCAT_HOME/lib/ext: ccpp.jar.
mkdir -p /opt/liferay/tomcat/temp/liferay/com/liferay/portal/deploy/dependencies
  • Copy from $LIFERAY_SOURCE/lib/development to your $TOMCAT_HOME/temp/liferay/com/liferay/portal/deploy/dependencies: resin.jar, script-10.jar.
sudo cp /mnt/.../postgresql-8.4-703.jdbc4.jar $TOMCAT_HOME/lib/ext.
sudo cp /mnt/.../jta...jar $TOMCAT_HOME/lib/ext.
nano /opt/liferay/tomcat/bin/setenv.sh

.

JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"
  • Exit from the editor saving the file content.
mkdir -p /opt/liferay/tomcat/conf/Catalina/localhost
nano /opt/liferay/tomcat/conf/Catalina/localhost/ROOT.xml

.

<Context path="" crossContext="true">

<!-- JAAS -->

<!--<Realm
    className="org.apache.catalina.realm.JAASRealm"
    appName="PortalRealm"
    userClassNames="com.liferay.portal.kernel.security.jaas.PortalPrincipal"
    roleClassNames="com.liferay.portal.kernel.security.jaas.PortalRole"
/>-->

<!--
Uncomment the following to disable persistent sessions across reboots.
-->

<!--<Manager pathname="" />-->

<!--
Uncomment the following to not use sessions. See the property
"session.disabled" in portal.properties.
-->

<!--<Manager className="com.liferay.support.tomcat.session.SessionLessManagerBase" />-->

</Context>
  • Exit from the editor saving the file content.
nano /opt/liferay/tomcat/conf/catalina.properties
  • Replace:
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

with:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/ext,${catalina.home}/lib/ext/*.jar
  • Exit from the editor saving the file content.
nano /opt/liferay/tomcat/conf/server.xml
  • Modify with the …URIEncoding…:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
  • Exit from the editor saving the file content.
  • Make sure there is no support-catalina.jar file in your $TOMCAT_HOME/webapps directory. If you find one, remove it.
rm -rf /opt/liferay/tomcat/webapps/ROOT/*
cp liferay-portal-6.1.1-ce-ga2-...war /opt/liferay/tomcat/webapps/ROOT
cd /opt/liferay/tomcat/webapps/ROOT
jar -xf /opt/liferay/tomcat/webapps/ROOT/liferay-portal-6.1.1-ce-ga2-...war
rm /opt/liferay/tomcat/webapps/ROOT/liferay-portal-6.1.1-ce-ga2-...war
nano /opt/liferay/tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties

.

jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://localhost:5432/lportal
jdbc.default.username=liferay
jdbc.default.password=liferay

setup.wizard.enabled=true
  • Exit from the editor saving the file content.
/opt/liferay/tomcat/bin/startup.sh
tail -f /opt/liferay/tomcat/logs/catalina.out
  • Browse configuration wizard at ‘http://localhost:8080’.
  • Set administrator with login:admin, password:admin. During nexts steps confirm ‘admin’ password.
nano /opt/liferay/tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties

.

#setup.wizard.enabled=true
  • Exit from the editor saving the file content.
/opt/liferay/tomcat/bin/shutdown.sh
sudo nano /etc/init.d/liferay

.

case "$1" in

start)
 /bin/su - liferay -c "/opt/liferay/tomcat/bin/startup.sh"
 ;;
stop)
 /bin/su - liferay -c "/opt/liferay/tomcat/bin/shutdown.sh"

 ;;
* )
 echo "Usage:service liferay {start|stop}"
 exit 1

esac

exit 0
  • Exit from the editor saving the file content.
sudo chmod 777 /etc/init.d/liferay
service liferay start

My personal compliments… Liferay on Tomcat and PostgreSQL is installed with success!