1. Install the Java 2 SDK, version 1.4 or newer
Install the Java 2 SDK, version 1.4 or newer (from SUN
http://java.sun.com/products/j2se/
). For details on how to install these components on your operating system, see the documentation that comes with them. You must install the Java SDK, not the JRE (Java Runtime Environment) that is also available from SUN. The JRE is not sufficient to run OpenCms!Important: This version of OpenCms was tested with Java 1.4 only. Some features regarding file encoding where used that are not available with Java releases before 1.4.
2. Install Tomcat
OpenCms 5.0 requires a Servlet 2.3 / JSP 1.2 standards compliant container. Tomcat 4 is the reference implementation of this Standard. This release was tested with Tomcat 4.0.x and Tomcat 4.1.x. Older versions of Tomcat (3.x and earlier) do not support this newer standard and are thus not usable for OpenCms 5.0.
Install Tomcat from
http://jakarta.apache.org/tomcat/index.html
into a folder of your choice. This is theCATALINA_HOME
folder. Don't forget to set the environment variablesCATALINA_HOME
andJAVA_HOME
.Test the installation by running Tomcat in standalone mode and check the examples. Note: Tomcat uses port 8080 in standalone mode. If you wish, you can combine the servlet-engine with a webserver like the Apache Web Server
http://www.apache.org/httpd.html
. Please see the documentation available with the webserver on how to combine it with your servlet environment.Important: To make sure Tomcat works with the correct charset to read and write files you should add the following parameter to the commandline that is used to start Tomcat:
-Dfile.encoding=ISO-8859-1.
You can set the environment variableCATALINA_OPTS
to do so (CATALINA_OPTS="-Dfile.encoding=ISO-8859-1"
). The default encoding of OpenCms isISO-8859-1
, but you can also set another encoding supported by your Java VM, e.g.UTF-8
. In case you do not care about the encoding, the default is most likley what you need.Setting the file encoding on Windows systems: To avoid problems regarding the encoding, run Tomcat in standalone mode and edit the properties of the shortcut "Start Tomcat" in the start menu of Windows. Add the parameter
3. Install MySQL-Dfile.encoding=ISO-8859-1
to the command line behind the call of the java executable. Here's an example of how the start command of Tomcat should look like after the modification:c:\j2sdk1.4.1\bin\java.exe -jar -Dfile.encoding=ISO-8859-1 -Duser.dir="C:\tomcat4" "C:\tomcat4\bin\bootstrap.jar" start
.
Install MySQL from
http://www.mysql.com/downloads/index.html
(see the MySQL documentation onhttp://www.mysql.com/documentation/index.html
). On Windows-based systems MySQL has to be installed on theC:\
drive and should be registered as service using(your MySQL path)/mysql/bin/mysqld -install
.Start the MySQL server by running the service (WIN32) or executing
(your MySQL path)/mysql/bin/mysqld
(UNIX).Check that MySQL is running before you continue by starting the MySQL monitor (execute
mysql
in your MySQL bin folder). The database works correctly if a MySQL prompt appears after calling the monitor. Quit the MySQL monitor by typing exit and go to the next step.
4. Deploy the opencms.war file
Copy the
opencms.war
file from the binary distribution ZIP file toCATALINA_HOME/webapps/
. ReplaceCATALINA_HOME
with the real path to your Tomcat installation.Start (or restart) Tomcat. Tomcat will now deploy the web application OpenCms.
Important: OpenCms requires that it's
*.war
file is unpacked. OpenCms can not be deployed as war file only. Make sure Tomcat does unpack the war file and creates theCATALINA_HOME/webapps/opencms/
directory, placing the OpenCms files in this directory. The default configuration for your Servlet containers / environment could be to not unpack the deployed*.war
file. If this is so you must unpack the opencms.war file manually. Use an unzip tool for this,*.war
files are just*.zip
files with a different extension. The OpenCms setup wizard will display a warning and not allow you to continue if you did not unpack the*.war
file.
5. Install OpenCms using the Setup-Wizard
Start the Setup-Wizard by pointing your webbrowser to
http://localhost:8080/opencms/ocsetup
. Depending on your configuration, you have to replacelocalhost
with your servername. The port 8080 is only used if you start Tomcat in standalone mode.Follow the instructions of the OpenCms Setup-Wizard, using the "Standard" setup. It will set up the OpenCms database and import all workplace resources into the system. For normal installations with MySql and Tomcat running on the same server all default settings will fit your needs.
Important: In case you want to import content from older OpenCms versions (5.0 beta 1 or 4.x), you must turn on the "directory translation" feature to make sure your pages still work. You can later change this setting (and all other settings selected during setup) by editing the file
CATALINA_HOME/webapps/opencms/WEB-INF/config/opencms.properties
.
6. Now your system is ready
Now your system is ready to use. You can login with username:
Admin
and password:admin
. Please change this password as soon as possible. The login URL of OpenCms in a default configuration is:http://localhost:8080${OpenCmsContext}system/login/
7. Security issues
]]>Finally after you have installed OpenCms you should have a look at the security settings.
First change the
Admin
user password of OpenCms by calling the user preferences (the "hammer" icon on the main screen of the workplace).Then you can add a password to the MySQL database. Enter the following commands at the MySQL command line.
use mysql; insert into user values ('localhost', 'opencmsuser', \ password('XXXXX'),'N','N','N','N','N','N','N','N','N', \ 'N','N','N','N','N'); insert into db values ('localhost', 'opencms', 'oopencmsuser', \ 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); flush privileges;Make sure you replace
opencmsuser
andopencms
with the name of your user and database in case you have changed them on the setup wizard.Don't forget to add the new user and password to all connect strings of the database in your
opencms.properties
file. Only the new user can now connect to the OpenCms tables. For more information see the MySQL documentation.
1. Install the Java 2 SDK, version 1.4 or newer
Install the Java 2 SDK, version 1.4 or newer (from SUN
http://java.sun.com/products/j2se/
). For details on how to install these components on your operating system, see the documentation that comes with them. You must install the Java SDK, not the JRE (Java Runtime Environment) that is also available from SUN. The JRE is not sufficient to run OpenCms!Important: This version of OpenCms was tested with Java 1.4 only. Some features regarding file encoding where used that are not available with Java releases before 1.4.
2. Install Tomcat
OpenCms 5.0 requires a Servlet 2.3 / JSP 1.2 standards compliant container. Tomcat 4 is the reference implementation of this Standard. This release was tested with Tomcat 4.0.x and Tomcat 4.1.x. Older versions of Tomcat (3.x and earlier) do not support this newer standard and are thus not usable for OpenCms 5.0.
Install Tomcat from
http://jakarta.apache.org/tomcat/index.html
into a folder of your choice. This is theCATALINA_HOME
folder. Don't forget to set the environment variablesCATALINA_HOME
andJAVA_HOME
.Test the installation by running Tomcat in standalone mode and check the examples. Note: Tomcat uses port 8080 in standalone mode. If you wish, you can combine the servlet-engine with a webserver like the Apache Web Server
http://www.apache.org/httpd.html
. Please see the documentation available with the webserver on how to combine it with your servlet environment.Important: To make sure Tomcat works with the correct charset to read and write files you should add the following parameter to the commandline that is used to start Tomcat:
-Dfile.encoding=ISO-8859-1.
You can set the environment variableCATALINA_OPTS
to do so (CATALINA_OPTS="-Dfile.encoding=ISO-8859-1"
). The default encoding of OpenCms isISO-8859-1
, but you can also set another encoding supported by your Java VM, e.g.UTF-8
. In case you do not care about the encoding, the default is most likley what you need.Setting the file encoding on Windows systems: To avoid problems regarding the encoding, run Tomcat in standalone mode and edit the properties of the shortcut "Start Tomcat" in the start menu of Windows. Add the parameter
3. Install MySQL-Dfile.encoding=ISO-8859-1
to the command line behind the call of the java executable. Here's an example of how the start command of Tomcat should look like after the modification:c:\j2sdk1.4.1\bin\java.exe -jar -Dfile.encoding=ISO-8859-1 -Duser.dir="C:\tomcat4" "C:\tomcat4\bin\bootstrap.jar" start
.
Install MySQL from
http://www.mysql.com/downloads/index.html
(see the MySQL documentation onhttp://www.mysql.com/documentation/index.html
). On Windows-based systems MySQL has to be installed on theC:\
drive and should be registered as service using(your MySQL path)/mysql/bin/mysqld -install
.Start the MySQL server by running the service (WIN32) or executing
(your MySQL path)/mysql/bin/mysqld
(UNIX).Check that MySQL is running before you continue by starting the MySQL monitor (execute
mysql
in your MySQL bin folder). The database works correctly if a MySQL prompt appears after calling the monitor. Quit the MySQL monitor by typing exit and go to the next step.
4. Deploy the opencms.war file
Copy the
opencms.war
file from the binary distribution ZIP file toCATALINA_HOME/webapps/
. ReplaceCATALINA_HOME
with the real path to your Tomcat installation.Start (or restart) Tomcat. Tomcat will now deploy the web application OpenCms.
Important: OpenCms requires that it's
*.war
file is unpacked. OpenCms can not be deployed as war file only. Make sure Tomcat does unpack the war file and creates theCATALINA_HOME/webapps/opencms/
directory, placing the OpenCms files in this directory. The default configuration for your Servlet containers / environment could be to not unpack the deployed*.war
file. If this is so you must unpack the opencms.war file manually. Use an unzip tool for this,*.war
files are just*.zip
files with a different extension. The OpenCms setup wizard will display a warning and not allow you to continue if you did not unpack the*.war
file.
5. Install OpenCms using the Setup-Wizard
Start the Setup-Wizard by pointing your webbrowser to
http://localhost:8080/opencms/ocsetup
. Depending on your configuration, you have to replacelocalhost
with your servername. The port 8080 is only used if you start Tomcat in standalone mode.Follow the instructions of the OpenCms Setup-Wizard, using the "Standard" setup. It will set up the OpenCms database and import all workplace resources into the system. For normal installations with MySql and Tomcat running on the same server all default settings will fit your needs.
Important: In case you want to import content from older OpenCms versions (5.0 beta 1 or 4.x), you must turn on the "directory translation" feature to make sure your pages still work. You can later change this setting (and all other settings selected during setup) by editing the file
CATALINA_HOME/webapps/opencms/WEB-INF/config/opencms.properties
.
6. Now your system is ready
Now your system is ready to use. You can login with username:
Admin
and password:admin
. Please change this password as soon as possible. The login URL of OpenCms in a default configuration is:http://localhost:8080${OpenCmsContext}system/login/
7. Security issues
]]>Finally after you have installed OpenCms you should have a look at the security settings.
First change the
Admin
user password of OpenCms by calling the user preferences (the "hammer" icon on the main screen of the workplace).Then you can add a password to the MySQL database. Enter the following commands at the MySQL command line.
use mysql; insert into user values ('localhost', 'opencmsuser', \ password('XXXXX'),'N','N','N','N','N','N','N','N','N', \ 'N','N','N','N','N'); insert into db values ('localhost', 'opencms', 'oopencmsuser', \ 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); flush privileges;Make sure you replace
opencmsuser
andopencms
with the name of your user and database in case you have changed them on the setup wizard.Don't forget to add the new user and password to all connect strings of the database in your
opencms.properties
file. Only the new user can now connect to the OpenCms tables. For more information see the MySQL documentation.