Home Page / Documentation / Installation Guide
In order to install the BetaCMS you need to have already installed the following:
- Any distribution of LINUX OS.
- SUN JAVA 6 SDK or JRE . Be aware that the SUN JAVA is required. Other implementations have not been tested and may not work.
A fresh installation of JBOSS-4.2.3.GA Application Server.
An existing installation may be ok but the installation script alters some of the jboss default libs and this may cause problems to any other applications that you already run in jboss. So before you understand which libs are substituted or added it is recommended to do the installation in a another fresh copy of jboss.
To install JBOSS Application Server download the package archive (jboss-4.2.3.GA-jdk6.zip) from JBoss AS downloads and just unzip it in some folder. BetaCMS installation script (install.sh) assumes that JBoss is installed under /opt directory so you need to either install JBoss under /opt or later change the default JBoss Home Dir (JBOSS_DIR) in the installation script.
Finally, installation script assumes the existence of a dedicated user for running jboss. It is better to create one named jboss. If you do so but user name is other than jboss, then you need to change
the default jboss user (JBOSS_USER) in the installation script as the latter executes command chown -R jboss $JBOSS_DIR to change the ownership of JBoss files to the chosen user.
- POSTGRES 8.2.x or later. It has been tested with 8.2.x and 8.3.x
If all of the above are installed and prepared you can proceed to install BetaCMS package. You need to be the root user to perform the installation so login as root before you proceed further.
Upon downloading the package use the following command to unzip and untar the tgz archive:
tar -zxvf betacms-distribution-<version>.tgz
The directory betacms-distribution-<version> is created.
Go inside and locate install.sh script.
This is a very basic installation script making several assumption on where JBOSS is installed, under which user JBOSS Application server is running and where the repository files will be installed.
If you do need to change one or more settings, open script with an editor and modify them according to your needs:
- JBOSS_DIR=/opt/jboss-4.2.3.GA
- REPOSITORY_DIR=/opt/BetaCMS_Repository
- JBOSS_USER=jboss
Run the script with the following command (the command starts with a DOT):
./install.sh
The command does the following:
- Copies third party libraries and modules in JBOSS lib and deploy directories.
- Removes old BetaCMS libs and modules in JBOSS lib and deploy directories.
- Copies BetaCMS libs and modules in JBOSS lib and deploy directories.
- If no JDBC driver for PostgreSQL is found, you will be prompted to provide the version of installed PostgreSQL.
- Removes some JBOSS libs and substitutes them with newer versions.
- Creates (if not already there) the home directory (/opt/BetaCMS_Repository) where all necessary configuration and runtime files for repositories are kept.
- Copies (if not already there) file 'betacms-repositories-configuration.xml' to JBOSS_DIR/server/default/conf directory. This file contains all necessary configuration settings
for all available repositories. Please note that if BetaCMS is installed for the first time, this file is empty and you MUST create a new repository prior to starting JBoss AS. - Copies BetaCMS content management application (betacms.war) in JBOSS. This application is used to create, search, categorize, publish and share content and utilizes BetaCMS repository infrastructure to do so.
- Copies the Content API web application (content-api.war) in JBOSS. This web application allows to access the repository functionality through http requests.
When the installation is finished, if BetaCMS is installed for the first time, open JBOSS_DIR/run.conf and add the following to JAVA_OPTS variable (replace previous values for -Xms and -Xmx that may exist):
-Xms512m -Xmx512m -XX:MaxPermSize=128M -XX:PermSize=128M -Dfile.encoding=UTF-8
These are the minimum recommended values.
If BetaCMS is installed for the first time follow the instructions here in order to create a repository, prior to starting JBoss.
Start jboss (JBOSS_DIR/run.sh -b 0.0.0.0 &) and go to the following links with your browser:
- http://localhost:8080/betacms (this is the BetaCMS content management application. To login use as username: SYSTEM and as password: betaconcept)
Add a new repository to BetaCMS
BetaCMS supports multiple repositories all of which can be managed through the same web application (http://localhost:8080/betacms)
In order to configure a new repository, you need to execute the following script (located inside directory betacms-distribution-<version>) :
./create-new-repository.sh
This script assumes the following settings
- JBOSS_DIR=/opt/jboss-4.2.3.GA
- REPOSITORY_DIR=/opt/BetaCMS_Repository
- JBOSS_USER=jboss
While script is executing you will be asked to provide values for the following questions
- Provide repository identifier (Only Latin characters [A-Z, a-z] without spaces )
This is the most important variable of a repository configuration. It represents a unique identifier of the repository which
must contain only latin characters without spaces or digits.
For the rest of the instructions, it is assumed that you have provided the value REPOSITORY_ID
- Provide a Greek label for repository
Repository label in Greek (Locale = el). Default value is REPOSITORY_ID
- Provide an English label for repository
Repository label in English (Locale = en). Default value is REPOSITORY_ID
As you may see in the resulting configuration XML file (JBOSS_DIR/server/default/conf/betacms-repositories-configuration.xml), you may provide labels for more languages.
- PostgreSQL username
During installation a database will be created and credentials must be provided. Default PostgreSQL user name is postgres
- PostgreSQL password
During installation a database will be created and credentials must be provided. Default PostgreSQL user password is postgres
- PostgreSQL Server Host or IP
During installation a database will be created and host or IP where PostgreSQL is installed must be provided. Default PostgreSQL host is localhost
- PostgreSQL Server Port
During installation a database will be created and port where PostgreSQL is listening must be provided. Default PostgreSQL port is 5432
- PostgreSQL createdb script dir
Directory path where PostgreSQL script createdb is located
Once you confirm provided values for the above settings, installation script will
- create a data source file needed to establish access to the repository database
JBOSS_DIR/server/default/deploy/betacmsDB-REPOSITORY_ID-ds.xml
- create a data source file to establish access to JCR repository
JBOSS_DIR/server/default/deploy/jackrabbit-REPOSITORY_ID-ds.xml
In case you want to rename the file make sure it is always greater in alphabetical order than the previous file. Otherwise an exception is thrown. - create repository home directory (/opt/BetaCMS_Repository/REPOSITORY_ID) and further directory structure where all necessary configuration and runtime files for repository are kept.
+- opt
| +- BetaCMS_Repository
| +- REPOSITORY_ID
| \- repository.xml
| +- repository
| +- betacms_definition_schemas
| \- ..xsd (one or more)
- copυ to directory /opt/BetaCMS_Repository/REPOSITORY_ID/repository/betacms_definition_schemas default XSD schemas located in (betacms-distribution-<version>/schemas-default)
- create file REPOSITORY_DIR/REPOSITORY_ID/repository.xml
- create the following xml tag which is automatically appended to file JBOSS_DIR/server/default/conf/betacms-repositories-configuration.xml
<betacmsRepository id="REPOSITORY_ID" jcr-repository-jndi-name="java:jcr/REPOSITORY_ID"
betacms-db-jndi-name="java:jdbc/myRepository"
serverAliasURL="http://localhost:8080">
<localization>
<localizedLabel locale="el">Repository greek label</localizedLabel>
<localizedLabel locale="en">Repository english label</localizedLabel>
</localization>
</betacmsRepository> - create a database named after REPOSITORY_ID using the following command
ssh PostgreSQL_USER@PostgreSQL_HOST CREATEDB_DIR/createdb -E UNICODE REPOSITORY_ID
In case above command is not successful then, log in as PostgreSQL_USER user and execute the following command:
createdb -E UNICODE REPOSITORY_ID
Restart JBoss, visit http://localhost:8080/beatcms and login to the newly created repository !
Last Modified:31/10/2009 19:33:24 EET