Documentation
Liferay provides a rich store of resources and knowledge to help our community better use and work with our technology.
Installing Social Office for Production Use
Eventually, you'll want to install Social Office onto a production server. Unlike Liferay Portal, which can be downloaded both as a standalone .war file or as a bundle, Social Office has been simplified by distributing it as a bundle with an application server. This greatly simplifies the setup and configuration for Social Office, as there's significantly fewer steps to get a bundle up and running.
Unzip the bundle or install it to the location from which you're going to run it using the instructions above. For example, you might use D:\apps in Windows or /opt in Linux or UNIX variants. As we mentioned before, the default bundle installation of Social Office uses an embedded database. While this works great for rapid evaluation or development, it has several drawbacks:
Only one user can access it at a time since the data is stored on a file on disk and HSQL locks it when doing changes.
The data is stored inside the bundle and might be lost on redeployment.
This configuration doesn't scale well and will perform poorly once multiple users access the system.
For these reasons, you don't want to run Social Office against the embedded database. Fortunately, Social Office has great support for most production-ready databases, and it's easy to configure Social Office to use them. The exact instructions will depend on the database, but here's a summary:
Create the database in your DBMS of choice (see the section below labeled Database Setup for further information).
Create a portal-ext.properties file in the Social Office Home folder which points to the database and mail session.
Start Social Office. Social Office will create the tables automatically and start.
As you can see, this is a simple, three step process. Using MySQL as an example, we'll go over the exact settings in portal-ext.properties below.
Database Setup
First things first, let's get that database set up. Using your database vendor's tools, create your database and grant a user ID full access to it. You'll eventually configure Social Office to connect to the database using this user ID. Once this is completed, the first time Social Office starts it'll create the indexes and tables automatically.
Social Office Home
In Social Office, there's a folder named Home. This folder is the top level folder that was extracted from the .zip file or the location you installed Social Office via the installer.
Social Office Home is primarily used for storing special configuration files, like portal-ext.properties. Please take a moment to find this folder on your system. We'll be creating a configuration file there.
The portal-ext.properties File
Liferay Social Office, like Liferay Portal, makes use of a configuration file to store its settings. These properties files differ from the configuration files of most other products in that changing the default configuration file is discouraged. In fact, the file that contains all of the defaults is stored inside of a .jar file, making it more difficult to customize. Why is Social Office set up this way? Because Liferay's products use the concept of overriding the defaults in a separate file rather than going in and customizing the default configuration file. You only change the settings you want to customize in your own configuration file, and then the configuration file for your software remains uncluttered and contains only the settings you need. This makes it far easier to determine whether a particular setting has been customized— and it makes the settings more portable across different installations of Liferay Portal and Liferay Social Office.
The default configuration file is named portal.properties, and the default version resides inside the core of Social Office. To override the settings in this file we use another, similarly named file called portal-ext.properties. This file is stored in your Social Office Home folder. By default, the file doesn't exist at all, so you'll need to create it to get Social Office connected to your database.
So let's get started pointing your Social Office bundle to your database. Create a file called portal-ext.properties in your Social Office Home folder. Since this file overrides default properties that come with Social Office, you're going to override the default configuration which points Social Office to the embedded HSQL database. Using the built in connection pool, you can easily connect Social Office to most popular database servers. The template for MySQL is provided as an example below.
#
# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEn- coding=UTF-8&useFastDateParsing=false
jdbc.default.username=mommy
jdbc.default.password=daddy
In the configuration above, we're assuming the user name is mommy and the password is daddy. Obviously, you would instead use the user ID and password you configured earlier in your database. You would also point the JDBC URL to your database server, unless you're running the database on the same machine as Social Office.
For email there's a similar procedure using the built-in mail session. The mail session is a resource which enables communication between Social Office and your mail server. Please note: configuring the mail session properly is very important! Since several of Social Office's applications rely heavily email notifications, the ability to communicate with your mail server is essential. To configure the mail session, please add the following directives to your portal-ext.properties file (substituting your mail server information):
mail.session.mail.pop3.host=localhost
mail.session.mail.pop3.password=
mail.session.mail.pop3.port=110
mail.session.mail.pop3.user=
mail.session.mail.smtp.auth=false
mail.session.mail.smtp.host=localhost
mail.session.mail.smtp.password=
mail.session.mail.smtp.port=25
mail.session.mail.smtp.user=
mail.session.mail.store.protocol=pop3
mail.session.mail.transport.protocol=smtp
Save the file. You're all done! The next time you start Social Office, it'll connect to your database server and create the tables it needs to function.
We used MySQL above, just as an example, but of course Social Office supports most common databases. Below we've provided the templates for all of the supported databases. Use the template that corresponds to the one you're using.
DB2
jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
jdbc.default.url=jdbc:db2://localhost:50000/lportal:deferPrepares=false;fullyMaterializeInputStreams=true;fullyMaterializeLobData=true;progresssiveLocators=2;progressiveStreaming=2;
jdbc.default.username=db2admin
jdbc.default.password=lportal
Derby
Derby is an embedded database and is not recommended for production environments.
jdbc.default.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
jdbc.default.url=jdbc:derby:lportal
jdbc.default.username=
jdbc.default.password=
Hypersonic
Hypersonic is an embedded database and is not recommended for production environments.
jdbc.default.driverClassName=org.hsqldb.jdbcDriver
jdbc.default.url=jdbc:hsqldb:${liferay.home}/data/hsql/lportal
jdbc.default.username=sa
jdbc.default.password=
Ingres
jdbc.default.driverClassName=com.ingres.jdbc.IngresDriver
jdbc.default.url=jdbc:ingres://localhost:II7/lportal
jdbc.default.username=
jdbc.default.password=
MySQL
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=
Oracle
jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe
jdbc.default.username=lportal
jdbc.default.password=lportal
PostgreSQL
jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://localhost:5432/lportal
jdbc.default.username=sa
jdbc.default.password=
SQL Server
jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
jdbc.default.url=jdbc:jtds:sqlserver://localhost/lportal
jdbc.default.username=sa
jdbc.default.password=
Sybase
jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
jdbc.default.url=jdbc:jtds:sybase://localhost:5000/lportal
jdbc.default.username=sa
jdbc.default.password=
As you can see, Social Office supports a number of the leading databases in the industry today.
Social Office will take about a minute to launch while it creates the tables.. Once this is completed, a new browser window automatically opens and you'rre presented with the Sign In screen.