I am also new to Liferay5.2.3, started some days before. While Installing Liferay I faced so many issues.
Here is the output of that one
We can install liferay in three ways,
a . Using Liferay with bundle
b. Using deploying src/ext
c. Using war file
I worked on all the above three
a. Using Liferay with bundle
no need of any configuration. only download the Liferay from the below mentioned link and unzip it
b. Using Source
- Download the liferay-portal-src-5.2.3 from the below link
http://www.liferay.com/downloads/liferay-portal/additional-files/ under Files for Developers section (at the end) download “Liferay Portal 5.2.3 Source”
Download Tomcat-6.0.20 – zip format
Download Mysql.5.0 and install
Make sure ANT_HOME is defined in the Environment variables.
unzip the Tomcat-6.0.20 to the location in your local dirve.
Ex: D:\SVN_INTEGRAL\tomcat6_withoutbundle
unzip the Liferay-source to the location in your local dirve.
Ex: D:\SVN_INTEGRAL\liferay-portal-src-5.2.3
copy the app.server.properties as app.server.{username}.properties (keep the original file as it is) username – System login name
Ex: app.server.abc.properties
In app.server.{username}.properties set the TOMCAT_HOME path for the following variable app.server.tomcat.dir
Ex: app.server.tomcat.dir=D:/SVN_INTEGRAL/tomcat6_withoutbundle
in command prompt, Go to liferay_soruce location where you have unzipped. And provide the following command
ant clean
ant start
ant deploy
Ex: D:\SVN_INTEGRAL\liferay-portal-src-5.2.3> ant clean
Make sure that you can see the following dir in
/webapps/tunnel-web and /webapps/ROOT/ dtd, errors, html, layouttpl and wap Copy the web.xml file from
/portal-web/docroot/WEB-INF/web.xml to /webapps/ROOT/WEB-INF dir Create a file portal-ext.properties and add the below lines: (This file is used to override the properties defined in portal.properties file which is existing in portal-impl.jar)
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
place the portal-ext.properties file in the
\webapps\ROOT\WEB-INF\classes folder run the sql script from the location
/sql/create/create-mysql.sql make sure that “lportal” database is present.
Create a New File “setenv.bat” under the directory
/bin
and add the below line.
set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config="%CATALINA_HOME%/conf/jaas.config" -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
Randomly you may get “Out of memory error”
The above piece of code is to ensure that you wont get “Out of memory error”.
start tomcat server
Check for the URL: http://localhost:8080/web/guest
c. Using war
Download and install Tomcat 6 and above to your preferred directory. From now on, the directory where you installed Tomcat will be referred to as $TOMCAT_HOME.
Download and install JDK 6 update 18 . Set an environment variable called %JAVA_HOME% (in Windows) or $JAVA_HOME (in Linux/UNIX) to point to your JDK directory.
Download following files from the below link
http://www.liferay.com/downloads/liferay-portal/additional-files/
Liferay Portal 5.2.3 WAR
tunnel-web.war
Liferay Portal 5.2.3 Dependencies
Create and edit $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml to set up the portal web application. Add the below lines and configure data sources for your database
className="org.apache.catalina.realm.JAASRealm"
appName="PortalRealm"
userClassNames="com.liferay.portal.kernel.security.jaas.PortalPrincipal"
roleClassNames="com.liferay.portal.kernel.security.jaas.PortalRole"
/>
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8"
username=""
password=""
maxActive="100"
maxIdle="30"
maxWait="10000"
/>
name="mail/MailSession"
auth="Container"
type="javax.mail.Session"
mail.transport.protocol="smtp"
mail.smtp.host="localhost"
mail.store.protocol="imap"
mail.imap.host="localhost"
/>
Edit $TOMCAT_HOME/conf/catalina.properties.
common.loader=
${catalina.home}/common/classes,\
...\
${catalina.home}/lib/ext/*.jar
Obtain the JDBC driver for your version of the database server. In the case of MySQL use mysql-connector-java-{$version}-bin.jar. And copy in the below location
$TOMCAT_HOME/lib/ext.
To add support for accessing Liferay's services remotely and to access the document library using WebDAV follow these steps:
Create a dir tunnel-web in $TOMCAT_HOME/webapps folder
Unzip the tunnel-web.war file in $TOMCAT_HOME/webapps/tunnel-web folder
Create a copy of ROOT.xml (Created in step 4) rename as tunnel-web.xml
Create $TOMCAT_HOME/conf/jaas.config.
PortalRealm {
com.liferay.portal.kernel.security.jaas.PortalLoginModule required;
};
Create a New File “setenv.bat” under the directory
/bin
and add the below line.
set JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config="%CATALINA_HOME%/conf/jaas.config" -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
Delete contents $TOMCAT_HOME/webapps/ROOT directory
Ensure below two jars are there in $TOMCAT_HOME/lib/ext folder. If not download from the respective sites
jta.jar
mail.jar
Unpack liferay-portal-5.2.3.war to $TOMCAT_HOME/webapps/ROOT.
In in the file $TOMCAT_HOME\webapps\ROOT\WEB-INF\classes\portal-ext.properties, copy the below lines to configure MySQL DB
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=
jdbc.default.password=
Make sure your database server is installed and is working. Create a database for Liferay. If the DB configured then Liferay will automatically create the tables and populate it the first time it starts.
Run Tomcat, point browser to http://localhost:8080. Sign in as test@liferay.com and password test
Link:
http://www.liferay.com/downloads/liferay-portal/additional-files/
Hope this will help people.
No comments:
Post a Comment