Company dedicated to web development, graphic design, photography and web hosting.

How to install Liferay
Published Sunday, 16th of January 2011
Overview Steps to install Liferay 6.0.5 Community Edition (bundle with Tomcat) Alias table
VariableExampleDescription
${MYSQL_HOST}localhostThe host where the mysql server is running
${MYSQL_PORT}3306The port where the mysql server is running
${LFRY_DDBB}lportalDatabase schema for liferay standard installation
${LFRYDB_USERNAME}lportalDatabase username for the database in liferay
${LFRYDB_PASSWORD}liferayDatabase password for the database in liferay
${LFRY_HOME}/liferay-portal-6.0.5Directory instance installation
${JAVA_HOME}${LFRY_HOME}/tomcat-6.0.26/bin/jre1.6.0_21Directory where java JRE is installed
Steps to follow MySQL Installation
  1. Download and install mysql 5 in ${MYSQL_HOST}
    Download from http://dev.mysql.com/downloads/mysql/5.0.html

  2. Create a database
    create database ${LFRY_DDBB} character set utf8;

  3. Create a user with ${LFRYDB_USERNAME} and ${LFRYDB_PASSWORD} if doesn’t exist.
    create user '${LFRYDB_USERNAME}'@'localhost' identified by '${LFRYDB_PASSWORD}';
  4. Assign permissions for this user:
    grant all on ${LFRY_DDBB}.* to '${LFRYDB_USERNAME}'@'localhost' identified by '${LFRYDB_PASSWORD}' with grant option;
Liferay Installation
  1. Download Liferay 6.0.5 community edition (Bundled with Tomcat) from
    http://www.liferay.com/downloads/liferay-portal/overview

  2. Unzip the file in your ${LFRY_HOME}

  3. Create a file named "portal-ext.properties" in ${LFRY_HOME}/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes and add next lines.
    12
    # load MySQL JDBC driver
    jdbc.default.jndi.name = jdbc/LiferayPool

  4. Edit ${LFRY_HOME}\tomcat-6.0.26\conf\Catalina\localhost\ROOT.xml file, comment Hypersonic data source (HSQL) configuration and add the following properties for MySQL:
    12345678910111213141516171819202122
    ...
    <!-- Hypersonic -->
    <!--<Resource name="jdbc/LiferayPool" auth="Container"
        type="javax.sql.DataSource" driverClassName="org.hsqldb. jdbcDriver"
        url="jdbc:hsqldb:lportal"
        username="sa"
        password=""
        maxActive="20" /> -->
    <!-- MySQL -->
    <Resource
        name="jdbc/LiferayPool"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://${MYSQL_HOST}:${MYSQL_PORT}/${LFRY_DDBB}?useUnicode=true&characterEncoding=UTF-8"
        username="${LFRYDB_USERNAME}"
        password="${LFRYDB_PASSWORD}"
        maxActive="20"
    />
    ...
    </Context>

  5. Set an environment variable called $JAVA_HOME to point your ${JAVA_HOME}

  6. Remove non-used stuffs:
    Remove the ${LFRY_HOME}/tomcat-6.0.26/webapps/sevencogs-hook folder.
    Remove the ${LFRY_HOME}/tomcat-6.0.26/webapps/sevencogs-theme folder.
    Remove the ${LFRY_HOME}/tomcat-6.0.26/webapps/sevencogs-mobile-theme folder.

  7. Start Liferay portal running ${LFRY_HOME}/tomcat-6.0.26/bin/startup.sh (in windows environments, run startup.bat)

  8. Login into Liferay using the default account. Use test@liferay.com as user and test as password.

References There are no references in this entry.


Back to the list of entries