Win32 Apache+Jserv Apollo Demo Installation Docs

 

Required Files:

You must download the following files before starting the installation process:

Apollo Jar:
http://www.projectapollo.org/status/download-jar.html

Jserv for win32:
http://java.apache.org/jserv/index.html

Apache win32:
http://httpd.apache.org/

MySQL for win32:
http://www.mysql.org

Sun JDK1.2.2 or Sun JDK 1.3 for win32:
http://java.sun.com

Download the JSDK2.0 Jar File
Currently located here: http://java.sun.com/products/servlet/archive.html

Download the MM.MySQL JDBC Driver jar file:
http://www.worldserver.com/mm.mysql/

Download the DBConnectionBroker jar file:
http://www.javaexchange.com/

Start installing software:

    Install JDK

        Install the JDK into any directory, the JDK installer should take care of everything for you

    Install JSDK2.0

        Install the JSDK2.0 into c:\jsdk2.0 (this is the default).  If you choose another directory, just keep in mind some of the sample paths I give you need to be adjusted.

    Install MySQL

        Install MySQL into c:\mysql (this is the default).  If you choose another directory, just keep in mind some of the sample paths I give you need to be adjusted.

    Install Apache

        Install Apache into c:\apache (this is NOT the default).  If you choose another directory, just keep in mind some of the sample paths I give you need to be adjusted.

    Install JServ

        Install JServ into c:\jserv (this is NOT the default).  If you choose another directory, just keep in mind some of the sample paths I give you need to be adjusted.  You should point the JServ installer at the JDK binary you installed above (eg: c:\jdk1.2\bin).  You should point the JServ installer at the JSDK2.0 you installed above at c:\jsdk2.0. You should allow jserv to modify your apache httpd.conf file, and point it at c:\apache\conf

    Install Apollo Demo Site:

        If you downloaded the Apollo Demo Site with source code, unzip the archive to c:\apache\apollodemo.  If you just downloaded the Class file JAR, you may place the JAR file in c:\apache\apollodemo.  If you choose another directory, just keep in mind some of the sample paths I give you need to be adjusted.

Start Configuring Software:

    Mysql

        Under win32 MySQL by default will mangle the case of table names.  You need to turn this feature off.  In your c:\my.cnf add this clause in the [mysqld] section:

set-variable = lower_case_table_names=0 

If you do not have a c:\my.cnf file, you can copy the default one from c:\mysql\my-example.cnf

        Start the MySQL server by running c:\mysql\bin\mysqld.
        Connect to the MySQL server by running c:\mysql\bin\mysql.
        Create the apollodemo database by issuing the SQL Command:

            create database apollodemo;

        Add the correct MySQL permissions to the apollodemo user by issuing the SQL command:

            grant ALTER, CREATE, DELETE, DROP, INDEX, INSERT, SELECT, UPDATE on apollodemo.* to apollodemo identified by 'apollo64demo';

        Quit MySQL by issuing the "quit;" command.

    Apache

                The c:\apache\conf\httpd.conf will need changing due to a installation bug in the JServ installer, and a new change in the win32 conf format in apache >=1.3.14.  Modify the entry in the httpd.conf from "Include "c:\jserv\conf\jserv.conf"" to "Include "c:/jserv/conf/jserv.conf"".  This simply changes backslashes to forward slashes.  This is required for apache >=1.3.14.

    Jserv

        Edit the file c:\jserv\conf\jserv.conf.

            Change the backslashes in the LoadModule line to forward slashes.

            Change the backslashes in the ApJServProperties line to forward slashes.

            Change the backslashes in the ApJServLogFile line to forward slashes.

            Search for the "ApJServMount" directive.  There should be two entries by default.  One for /servlets and one for /servlet.  Add an entry for the new JServ zone apollodemo.  Add this line:

           ApJServMount /apollodemo /apollodemo
 

        Edit the file c:\jserv\conf\jserv.properties
            Search for "zones=".  By default it will most likely just have the root zone, add the apollodemo zone to this list.  It should look something like this:

                zones=root,apollodemo

            At the bottom of the file add this line:

servlet.testApollo.initArgs=PropertiesFile=c:\jserv\servlets\apollodemo.properties

        Configure the c:\apollo\apollodemo\apollodemo.properties file

            Copy the default win32 properties file to apollodemo.properties by issuing this command:

                copy c:\apache\apollodemo\apollodemo.properties.sample.win32 c:\apache\apollodemo\apollodemo.properties

        Edit the apollodemo.properties file

            Confirm the repositories= directive has the correct directories in it.  It should include the JAR file if you downloaded a JAR package of the demo site, or point to the extracted copy of the demo site.  You will almost certainly need to update the filenames in the repositories line to the correct file names for the JAR files, since the filesnames you downloaded probably included version numbers.  It should include the JAR file for the DBBroker, the MM.Mysql JDBC driver and the JAR file for the apollo framework.  If you used the suggested directories, you should not have a major problem.

        Configure apollo properties file, c:\apollo\apollodemo\org\projectapollo\demo\org.projectapollo.demo.Demo.properties

            Copy the default win32 properties file to org.projectapollo.demo.Demo.properties by issuing this command:

                copy c:\apache\apollodemo\org\projectapollo\demo\org.projectapollo.demo.Demo.properties.sample.win32 c:\apache\apollodemo\org\projectapollo\demo\org.projectapollo.demo.Demo.properties

            Edit the org.projectapollo.demo.Demo.properties file, and confirm all the paths are correct.  (This shouldn't be a problem if you used the paths above).  If you are using a database server then MySQL, then you need to configure the driver for your database.

           

Start Software:

    Before the demo site will run, you will need to start up all the applications first. 

        Start the MySQL server by running c:\mysql\bin\mysqld

        Start apache by running c:\apache\apache.  If you left JServ in automatic mode, apache will automatically start JServ.  If you are running in manual mode (which I often do for development), you must now start JServ.  This is accomplished by executing the java class org.apache.jserv.JServ with a parameter of the c:\jserv\conf\jserv.properties file.

    You should now be able to access the site by requesting the url: http://localhost/apollodemo/demo