These are the standard installation instruction for OpenCMS as of
version 4.1.53 with added instructions on how to install OpenCMS with
BEA WebLogic 5.1/Solaris/Oracle 8. I've tagged the inserted paragraphs
by
2001-02-05 HK:
HK is Heiko Kirschke, mailto:Heiko.Kirschke@acm.org
How to install OpenCms
The following instructions guide you through the installation of the
OpenCms system. All steps work both on Linux/UNIX and Windows NT. Be
sure to complete every step and check its results as described before
you go on to the next step.
Step 1
Install the Apache Web Server.
Check that your server is working by requesting an example page
(e. g. the demo index.html coming with the apache distribution).
2001-02-05 HK: Installing Apache is not necessary for BEA Weblogic,
since BEA WebLogic has its own Web server. Use this URL instead:
http://your.server:7001, this should come up with the standard BEA
page.
Step 2
Install the Java JDK (from SUN or IBM) and the Apache JServ
1.0. OpenCms currently works only with version 1.0. For details on how
to install these components on your operating system, see the
documentation that comes with them.
2001-02-05 HK: For BEA WebLogic, install the J2EE additionally. Set up
an environment variable J2EE_HOME which points towards this
installation directory.
Check that a Jserv Servlet Zone is set up properly and running on your
machine by requesting the default IsItWorking class coming with JServ.
2001-02-05 HK: Installing Apache JServe is not necessary for BEA
Weblogic, since BEA WebLogic has its own servlet engine.
Step 3
Install mySQL (see the mySQL documentation on how to do this). Please
remember that mySQL is shareware and you have to pay for it if you use
it for a commercial purpose.
Make sure mySQL is running before you continue by starting the mySQL
monitor (command mysql in your mySQL bin folder). The database works
correctly, if a mySQL prompt appears after calling the monitor. You
can exit and go on to the next step.
2001-02-05 HK: With BEA WebLogic, normally Oracle (or one of the other
major commercial RDBMs) is used. Haven't checked BEA WebLogic with
mySQL up to now.
Step 4
Unzip the OpenCms distribution (opencms_4.1xxx.zip). We currently have
no RPM or setup.exe available, but this is a planned project for the
future.
Copy the opencms.properties from the config folder and the opencms.jar
to your servlets directory.
2001-02-05 HK: Assuming that $WL_HOME points towards the BEA WebLogic
installation directory (e.g. $WL_HOME=/usr/local/weblogic), create
directory $WL_HOME/myserver/servletclasses/opencms and put these files
there. I prefer to use a symbolic link `opencms' here, with `opencms'
being a symbolic directory link to the current used OpenCMS version.
Copy the pics folder residing in the workplace to your apache document
root folder. Create a new folder download in the apache document root
folder.
2001-02-05 HK: In BEA WebLogic, the document root folder is
$WL_HOME/myserver/public_html
Create two new folders ExternalComponents and logs in your servlet
directory.
Get the database driver mysql.jar and xerces.jar described in
Components and copy them to the newly created ExternalComponents
folder as well as to the opencms folder extracted from the zip file.
Your servlets folder now looks like this:
(your servlet path)/servlets/ExternalComponents/xerces.jar
(your servlet path)/servlets/ExternalComponents/mysql.jar
(your servlet path)/servlets/logs/
(your servlet path)/servlets/opencms.jar
(your servlet path)/servlets/opencms.properties
2001-02-05 HK: In BEA WebLogic,
(your servlet path)/servlets=$WL_HOME/myserver/servletclasses/opencms, i.e.:
$WL_HOME/myserver/servletclasses/opencms/ExternalComponents/xerces.jar
$WL_HOME/myserver/servletclasses/opencms/logs/
$WL_HOME/myserver/servletclasses/opencms/opencms.jar
$WL_HOME/myserver/servletclasses/opencms/opencms.properties
Step 5
For setting up the opencms database cd to config in the extracted
opencms folder. Create a new database by
mysqladmin create opencms41
Finally run
mysql opencms41 < mysql.sql
This will create all required database tables. Make sure all tables
are created properly by calling the mySQL monitor again with mysql
opencms and entering show tables at the monitor prompt. mySQL prints
out the following list of tables:
+--------------------------+
Tables in opencms41
+--------------------------+
CMS_FILES
CMS_GROUPS
CMS_GROUPUSERS
CMS_PROJECTS
CMS_PROPERTIES
CMS_RESOURCES
CMS_SYSTEMID
CMS_SYSTEMPROPERTIES
CMS_USERS
+--------------------------+
2001-02-05 HK: In BEA WebLogic with Oracle, start sqlplus and source in
the Oracle setup script, e.g.:
sqlplus
...
@oraclePlsql.sql
quit
Be aware that this erases all pre-existent OpenCMS data of previous
OpenCMS installations.
Step 6
Edit the opencms.properties and set the path for the log file:
log.file=(your servlet path)/servlets/logs/opencms.log
2001-02-05 HK: In BEA WebLogic, I use file
$WL_HOME/myserver/servletclasses/opencms/logs/opencms.log
Also change the entries for your registry and your publishing export
path in your opencms.properties:
registry = (your opencms folder)/config/registry.xml
exportpoint.path.0 = (your apache docroot)/pics/
exportpoint.path.1 = (your apache docroot)/download/
exportpoint.path.2 = (your apache docroot)/pics/system/
2001-02-05 HK: In BEA WebLogic, use the document root instead of the
(your apache docroot) as described above, i.e.:
registry = (your opencms folder)/config/registry.xml
exportpoint.path.0 = $WL_HOME/myserver/public_html/pics/
exportpoint.path.1 = $WL_HOME/myserver/public_html/download/
exportpoint.path.2 = $WL_HOME/myserver/public_html/pics/system/
On UNIX systems the system may have problems writing to the logs
folder. For this reason you should set its owner to nobody.
2001-02-05 HK: For BEA WebLogic, I have a special Solaris user and
group weblogic which owns all BEA WebLogic files (i.e., all files
including and below $WL_HOME).
Change the export path to an existing empty folder in the line
beginning with "writeExportPath" (You will find these lines near to
the end of the file cmssetup.txt). cd to the parent opencms folder
and initialize the database with all workplace default files by
calling:
java -mx64M -classpath opencms.jar:xerces.jar:mysql.jar
com.opencms.core.CmsShell config/opencms.properties < config/cmssetup.txt
This must be written in one single command line. The Java binary java
should reside in the bin folder of your JDK installation. If there is
no Java binary available on your system but only a Java runtime
environment, you may replace the java command by jre.
On Windows environments you have to replace the colons used as
classpath separators by semicolons.
Some Java VM need additional settings for the classpath. Try to add
the current directory . and (for JDK 1.1.x) the classes.zip in the lib
folder of your JDK installation to the "-classpath" switch of your
command above, if you get a ClassNotFoundException.
The OpenCms database is now set up completely. You are now able to
check the basic OpenCms system. Call the OpenCms console by entering
java -mx64M -classpath opencms.jar:xerces.jar:mysql.jar
com.opencms.core.CmsShell config/opencms.properties
(This command is similar to the one above. Note that the pipe
"< config/cmssetup.txt" is missing now.)
Log in as Admin and check the accessibility of a workplace file in
your database:
> login Admin admin
> readFile "/system/workplace/action/start.html"
The OpenCms console answers with
[Resource]:/system/workplace/action/start.html , Project=1 , User=1 , \
Group=1 : Access=rwvrwvr-v- : Resource-type=2
Step 7
Now you can finalize the configuration of your servlet zone. Make sure
that your jserv.conf contains the line
ApJServMount /servlets /root
and the jserv.properties contains
zones=root
wrapper.bin.parameters=-mx64M
and
root.properties=(your servlet configuration path)/zone.properties
Update your zone.properties and set the following repositories:
repositories=(your servlet path)/servlets/opencms.jar
repositories=(your servlet path)/servlets/ExternalComponents/xerces.jar
repositories=(your servlet path)/servlets/ExternalComponents/mysql.jar
and add the lines:
servlet.opencms.code=com.opencms.core.OpenCmsServlet
to the Servlet Aliases section and
servlet.opencms.initArgs=properties=(your servlet path)/servlets/opencms.properties
to the Servlet Init Parameters section.
2001-02-05 HK: For BEA WebLogic, add following lines to
$WL_HOME/weblogic.properties (replace /usr/local/weblogic by your
local $WL_HOME installation directory):
weblogic.httpd.register.opencms=com.opencms.core.OpenCmsServlet
weblogic.httpd.initArgs.opencms=\
properties=/usr/local/weblogic/myserver/servletclasses/opencms/opencms.properties
2001-02-05 HK: For BEA WebLogic, change following lines in
$WL_HOME/startWebLogic.sh from:
PRE_CLASSPATH=
POST_CLASSPATH=
to:
PRE_CLASSPATH="${WL_HOME}/myserver/servletclasses/opencms/opencms.jar:${WL_HOME}/lib/xerces.jar:${J2EE_HOME}/lib/j2ee.jar"
POST_CLASSPATH="${ORACLE_HOME}/jdbc/lib/classes12.zip:${ORACLE_HOME}/jdbc/lib/nls_charset12_01.zip"
This assumes that $ORACLE_HOME points towards your Oracle installation
directory, since the Oracle driver classes are loaded from
there. $J2EE point towards your J2EE installation. I've put the
xerces.jar into $WL_HOME/lib instead into the ExternalComponents
directory.
Step 8: Now your system is ready!
Start your web server. The OpenCms system is available at
http://your.server/servlets/opencms/system/workplace/action/login.html.
Login as Admin with the default password admin.
2001-02-05 HK: For BEA WebLogic, use this URL instead:
http://your.server:7001/opencms/system/workplace/action/login.html.
Step 9: Security
After you have managed to install OpenCms you should have a look at
the security. Change the admin password of OpenCms by calling the
user preferences ("hammer" icon on the workplace main screen). After
that 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', 'ocmsuser', \
password('XXXXX'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N');
> insert into db values ('localhost', 'opencms41', \
'ocmsuser', 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
> flush privileges;
Don't forget to add the new user and his password into all connect
strings to the database. The new user can now only connect to the
OpenCms Tables. For more informations see the mySQL documentation.
Troubleshooting
Look at all available log files (here with the paths used in a
standard UNIX installation), if you have problems with calling the
login screen:
Apache log file (/usr/local/apache/logs/error_log)
JServ module log file (/usr/local/apache/logs/mod_jserv.log)
OpenCms log file ((your servlet path)/servlets/logs/opencms.log)
2001-02-05 HK: BEA WebLogic puts its logging entries into
$WL_HOME/myserver/weblogic.log