Liferay Installation
Tuesday, 25. March 2008, 00:41:05
The Scripts
First, prepare tomcat:
Make sure all the .sh scripts in the /bin/ are executable
chmod a+x tomcat/bin/*.sh
Change the port LifeRay will run on (or keep default: 8080)
Edit tomcat/conf/server.xml and chance the reference from 8080 to whatever port you want.
You can check to see if you're on the right track, by running tomcat/bin/startup.sh and browsing to localhost:the-port-you-chose
The default user is test@liferay.com with password: test
The Database
If you want to use a different database than Hypersonic (which you most definitely do), you will need to do some extra work:
Download the Liferay Source, or see this comment
Unzip the source somewhere.
Run the source/sql/create/create-db.sql of your choice
NOTE: The default database name will be lportal. The create scripts will delete it if it already exists. If you want it to be called something else, you might be able to change that by editing the create-db.sql.
ex: mysql -u root -p < create-mysql.sql > mysql.out
You'll need to put any DB driver jars in a directory where tomcat can find them (common/lib works)
You'll need to change the tomcat/conf/Catalina/localhost/ROOT.xml context, so that it's using the right driver URL, and the right DB user and password.
Here is a diff of the default ROOT.xml with a configured ROOT.xml:
< driverClassName="org.hsqldb.jdbcDriver"
< url="jdbc:hsqldb:lportal"
< username="sa"
< password=""
---
> driverClassName="com.mysql.jdbc.Driver"
> url="jdbc:mysql://localhost:3306/lportal"
> username="xxxxxxxx"
> password="xxxxxxxx"
You'll have to explicitly give a DB user and password grants to the lportal database after you've run the create-db.sql script
If you get an NPE when you try to start LifeRay, check the logs in tomcat/logs/catalina.out for clues as to which of the many parts is breaking.
Running Liferay
$shell$ cd tomcat
$shell$ ./bin/startup.sh


