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
then add following thing in MSQL Area
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
to
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)
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/jre/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)