Document : Installation Guide
Installation Guide For Liferay( In Linux)
Download Liferay & Sql Script
1. Download the liferay-portal-tomcat-x.x.x zip file & liferay-portal-sql-x.x.x zip file from
following website.
www.liferay.com
Then click on Download & click on Bundled with Tomcat x.x
If you want to take sql the click on Additional Files
Click on Liferay Portal 5.0.1 SQL Scripts
Extraction of Liferay
2. Extract the liferay-portal-tomcat-x.x.x zip file.
3. Then put in any directory
eg : if i want to put in opt directory then i will do it by using below command
(assume i am in home)
mv liferay-portal-tomcat-x.x.x /opt/
If you want to change the name you can change
Extraction of SQL Script
4. Extract the liferay-portal-sql-x.x.x zip file.
5. Then go to MYSQL Query Browser login as root then open Script tab
6. Click on Open file go to the Extracted liferay-portal-sql-x.x.x/create/
7. Select create-mysql.sql file & then click on OK.
8. If you want to change the database name (by default it will be lportal) you can change it.
9. Then click on Execute.
10. Now got to folder where you kept liferay-portal-tomcat-x.x.x (Or the name which you
specified)
Configuration of Liferay
11. Go to following path liferay-portal-tomcat-x.x.x/conf/Catalina/localhost (Or specified
name/conf/Catalina/localhost)
Liferay Database changing
12. Open ROOT.xml and change the following things.
Comment following thing
<Resource
Installation guide for Liferay Page 1 of 4
Document : Installation Guide
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:lportal"
username="sa"
password=""
maxActive="20"
/>
then add following thing in MSQL Area
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://Ip Address /lportal(Or Specified
database name)?useUnicode=true&characterEncoding=UTF-8"
username="username"
password="password"
maxActive="100"
maxIdle="30"
maxWait="10000"
/>
13. Copy mysql.jar in liferay-portal-tomcat-x.x.x/common/lib (Or specified
name/common/lib)
14. If you want to change the port the go to liferay-portal-tomcat-x.x.x/conf (Or specified
name/conf)
Liferay Port changing
15. The open server.xml and change the following thing.
Assume i want to change port from 8080(by default) to 8181
<Connector port="8080" maxHttpHeaderSize="8192"
Installation guide for Liferay Page 2 of 4
Document : Installation Guide
maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false" redirectPort="8443"
acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
/>
to
<Connector port="8181" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false" redirectPort="8443"
acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
/>
Bash Profile Configuration
16. Then go to home directory.
17. By using command prompt open bash profile
vi .bash_profile
Then write this code
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
PATH=/usr/java/jdk1.5.0_02/bin:$PATH:$HOME/bin:./
(Or give the path of jdk)
Installation guide for Liferay Page 3 of 4
Document : Installation Guide
export PATH
export JAVA_HOME=/usr/java/jdk1.5.0_02/
(Or give the path of jdk)
export
CLASSPATH=/usr/java/jdk1.5.0_02/lib/tools.jar:/usr/java/jdk1.5.0_02/jr
e/lib/rt.jar:./
(Or give the path of jdk)
export CATALINA_HOME=/opt/liferay-portal-tomcat-x.x.x (or
Specified Name)
unset USERNAME
Then save it.
Starting the Liferay Server
18. Now logout & login.
19. By useing command prompt go to extracted liferay-portal-tomcat-x.x.x (Or the name
which you specified).
20. Go to liferay-portal-tomcat-x.x.x /bin (Or name specified/bin) and give this command
sh startup.sh and enter
If you want to stop then
sh shutdown.sh and enter
21. If any error you want to see then o to liferay-portal-tomcat-x.x.x /logs (Or name
specified/logs) and give this command
tail -f Catalina.out and enter
22. If any liferay is not started or gives error then give this command and then use above
command
chmod -R 777 /opt/liferay-portal-tomcat-x.x.x (Or the name
specified) (Assume i copied liferay-portal-tomcat-x.x.x into opt
directory)
23. Now Open the Browser and type the below line
http://localhost:8080 (Or localhost:changed port number)
If it is in Server
http://server IP Address:8080 (Or Server IP Address:changed port
number)
Installation guide for Liferay Page 4 of 4