How to get Tomcat bundle Liferay to use a different database __ database

Source: Internet
Author: User
Tags create directory
If you want to use a different database, you need to do the following.
1. Set up DBMS system, and have convenient database client for use
2. Find the appropriate JDBC driver
3. Download the Liferay database script
(Http://prdownloads.sourceforge.net/lportal/liferay-portal-sql-4.1.3.zip?download)

After you extract the compressed files, you will see three main directories: Create,portal and Index
The script in the Create directory automatically creates a new schema (some called a database) in the DBMS, and the automatically created schema is named Lportal. If the database has the same name, it will be drop. The script then creates the desired table for Liferay and inserts the initialization data

A script in the Portal directory creates only a table and does not automatically create a schema.

The above two types of scripts only create PK in the database and do not create a generic index. The generic index is created using script in the index directory.

After database creation, after setting up accounts, access rights through DBMS clients

Modify Liferay location ${tomcathome}/conf/catalina/localhost Root.xml
XML code <resource name= "Jdbc/liferaypool" auth= "Container" type= "Javax.sql.DataSource" Driverclassname= "Org.hsqldb.jdbcDriver" url= "jdbc:hsqldb:test" username= "sa" password = "" "Maxactive="/>

Modify DRIVERCLASSNAME,URL,USERNAME,PASSWD
Reboot Liferay to see if the page is normal

Note. In the current version (4.1.3), do not directly use Oracle 9 drives below. Because the Oracle CLOB field will be queried for null. Oracle more than 10 drivers can query out the CLOB field string "more correctly", but sometimes they are locked in a query.

Another workaround is to convert the Clob field in the Oracle database to the Vchar type.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.