Tuesday, January 03, 2006

Configuration in eXo Portal

APPLICATION SPECIFIC CONFIGURATION IN EXO-PORTAL :
Most of the changes are to be made in install_dir/exo-tomcat/web-apps/portal directory. This is a directory, which is already present in the exo-tomcat when you download it.

Creating A New Portal Instance :

  • In exo-tomcat/conf/Catalina/localhost/ copy the portal.xml to myportal.xml and edit it. You need at least change the context path and docbase to avoid the name collision with the one of the portal. You need to change the database configuration as well since each portal instance should have its own database.
  • Copy the portal.war in exo-tomcat/webapps to myportal.war, the name must be matched with the context path you specify in the myportal.xml.
  • Edit the web.xml file and change the display-name tag value to myportal
    Launch your tomcat and access
    http://localhost:8080/myportal/

Database Configuration Or Migrating the default Database to a new Database: Currently, the supported databases are:

  1. MySQL
  2. HSQL
  3. Postgresql
  4. DB2
  5. Oracle
  6. Microsoft SQL Server
  • Changing the database is quite simple, you just need to replace an XML file (that configures the J2EE Datasources) and add the database driver in the classpath of your application server.
  • The eXo Platform defines two datasource by default: one for the portal and one for the workflow. Tomcat
  • In Tomcat 5, the datasource configuration XML files are located under TOMCAT_DIST/conf/Catalina/localhost.
  • Each portal instance has to define the datasource it will use. The portalInstanceName.xml files contain that information. To change the database used you have to customize those files.
  • To ease the change, we provide several template files like portal.xml.mysql or portal.xml.postgresql. Pick up the one you want and rename it to portal.xml (overide the default one that contains hsql configuration). Of course, you will have to customize your personal database information - like username, password and DB URI - by editing the file.
  • Then you finally have to add the database driver in tomcat TOMCAT_DIST/common/lib directory. Changes in Default Database::
  • In Exo, you will not get the default database because it is generated on the fly when the exo-tomcat server starts. But you will get the script file, which acts as a default database. The location of default database is : install_dir/exo-tomcat/temp/data/portal.script
  • Exo uses hsqldb as its default database and to see the tables you have to use hsqldb front .Now if you want to change the database, and then you should first download an hsqldb package. In its demo directory, there is a runManager.sh file. Double click on it, and choose the hsql standalone driver, and make the path point to the db (usually in the /exo-tomcat/temp/exo or /exo-tomcat/temp/portal) and open it, then you can use any sql line to change it, and make sure shutdown your tomcat first, because the db can"t be opened by two client instance.
  • Whenever you want to add some additional fields, which are related to user, you can user exo_user_profile table in the portal.script.
  • If you change the config.xml,then you should delete all the db files in the tomcat/temp directory,b/c every first time the exo run,it will import all the config.xml like files into the db(jcr),and don"t take care of them in the disk anymore.

2 comments:

nanothoughts said...

What is EXO Sir, please explain for beginners like me

Balamurugan Subramaniam said...

It is Exo-Portal which was created by Exo-platform.For detailed information about Exo-Portal please have a look on this following link.
http://www.exoplatform.com
[or]
http://www.exoplatform.org.