The CDM Server can be installed on Linux , Mac OS X and of course on Windows. For detailed information on the requirements please refer to CDM Server - Requirements. For each CDM database a separate CDM remote web application instance will be launched which will require a significant amount of memory. The CDM server listens per default on port 8080 but can be configured to use another port. Installer packages for the CDM Server are provided in the download section as Debian package and as an executable Windows installer application.
In the following the steps required to install and set up a CDM Server are described for Debian Linux and for Windows XP. Where necessary the platform dependant steps are described fro each operation system individually.
In the following it is assumed that the CDM Server installation is available from the this URL: (http://CDMServer.com/).
Read the CDM Server - Requirements document and make sure that your environment meets the mentioned hardware and software requirements of CDM Server. Install any additional software needed before downloading the CDM Server.
The automated installation of the CDM Server configures the server per default to listen on port 8080. If you already have another service using this port you have to change the configuration (see step 3 below) in order to allow the server to startup.
sudo apt-get install jsvc
dpkg -i cdmserver_x.x.x.-5_all.deb
The resulting output on the terminal should looks like in the following:
Selecting previously deselected package cdmserver.(Reading database ... 31748 files and directories currently installed.)Unpacking cdmserver (from ../cdmserver_0.0.1-1_amd64.deb) ...Setting up cdmserver (0.0.1-1) ... Adding system startup for /etc/init.d/cdmserver ... /etc/rc0.d/K02cdmserver -> ../init.d/cdmserver /etc/rc1.d/K02cdmserver -> ../init.d/cdmserver /etc/rc6.d/K02cdmserver -> ../init.d/cdmserver /etc/rc2.d/S98cdmserver -> ../init.d/cdmserver /etc/rc3.d/S98cdmserver -> ../init.d/cdmserver /etc/rc4.d/S98cdmserver -> ../init.d/cdmserver /etc/rc5.d/S98cdmserver -> ../init.d/cdmserver Starting CDM Server: cdmserver with -Xmx1024M -jar /opt/cdmserver//cdmserver-standalone.jar --httpPort=8080 --ajp13Port=-1 --logfile=/var/log/cdmserver/cdmserver.log
/opt/cdmserver/.cdmLibrary
%PROGRAMFILES%/EDIT CDM-Server/.cdmLibrary
During the previous step the CDM Server has been installed. Now navigate with your web browser to the CDM Server root (http://CDMServer.com:8080/). Access to this page is restricted, thus you are being presented a sign-in box. Unless you change the credentials which are defined in .cdmLibrary/cdm-server-realm.properties file the CDM Server will use the default: user=admin, password=edit. For security reasons it is highly recommended that you change the credentials as soon as possible. If you have problems locating the .cdmLibrary/cdm-server-realm.properties file please refer to Step 2. Installation. The respective file is a java properties file defining the users, passwords and roles for a Jetty-HashUserRealm (please refer to http://docs.codehaus.org/display/JETTY/Realms as reference).
After succesful login, you should see an administrative overview on the CDM Server like shown in the image below. This page will reports an error since the server has been installed without connecting it to an existing CDM database:
<bean id="MyBeanIdentifier" lazy-init="true" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="driverClass" value="com.mysql.jdbc.Driver"/> <property name="username" value="MyUserName"/> <property name="password" value="MyPassword"/> <property name="url" value="jdbc:mysql://MyDatabaseAddress/MyDatabaseName"/></bean>
You can define multiple data source beans in the datasources.xml file so you can configure the server to expose multiple databases ot once. For each CDM database a separate CDM remote web application instance will be launched which will require a significant amount of memory (see CDM Server - Requirements for more information).
The bean id will be used as name of the specific web application instance and specifies the base path at which the according webservices are available. This path is shown in the administrative overview of the CDM Server (http://CDMServer.com:8080/).
/etc/init.d/cdmserver restart
The CDM Server can be started with different commanline options with are listed in the following. In order to apply these options to a CDM Server running as service you have to edit different configuration files on each platform:
-datasources <datasourcesfile> use the specified datasources file. Default is {user.home}/.cdmLibrary/datasources.xml -help print this message -httpPort <httpPortNumber> set the http listening port. Default is 8080 -jmx Start the server with the Jetty MBeans in JMX Management mode. For testing you can use the following jvm options: -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authentic ate=false -Dcom.sun.management.jmxremote.port=9999 -webapp <file> use the specified webapplication this either can be a compressed war or extracted file. If this option is used extraction of the war from the cdmserver jar file is omitted.Using the following paths developers can run the server completely from the target folder or completely from source: '{cdmlib-project-root}/cdmlib-remote/tar get/cdmserver' '{cdmlib-project-root}/cdmlib-remote/src /main/webapp' -win32service ONLY USED INTERNALLY - prepare for running as win32 service, the server will not be started automatically!
dpkg -r cdmserver