How to install Appaserver: Notes ----- 1) These steps assume you have an initial application name in mind: $application. Probably the initial application name will either be "everglades" or "classgrades". 2) For the horizontal menus to work, DynarchMenu must be purchased (~$100) and installed. See http://dynarch.com . 3) Install Appaserver as a normal user, not root. Directories that need write permission for apache are noted. Steps ----- 1) Set environment variables in your login profile file: a. APPASERVER_HOME=/foo/appaserver Note: the tar/cpio file does NOT contain a subdirectory root. So $APPASERVER_HOME should either be empty or contain a previous version of Appaserver. b. CGI_HOME=/foo/cgi-bin or CGI_HOME=/foo/cgi c. APPASERVER_LINK_FLAGS=-s <-- Only if CGI_HOME is on a different filesystem than APPASERVER_HOME. <-- If so, ScriptAlias --> Options FollowSymLinks d. APPASERVER_UNUSED_PARAMETER_FLAG=-Wunused-parameter <-- Only if your c compiler supports it. e. DOCUMENT_ROOT=/foo <-- Not necessary, but convenient. f. DYNARCH_HOME=/foo/hmenu-$version <-- Not necessary, but convenient. g. PATH=$PATH:$APPASERVER_HOME/utility:$APPASERVER_HOME/src_appaserver 2) Get Appaserver: a. cd $APPASERVER_HOME b. ftp timriley.net <-- login in as anonymous/whatever c. ftp> cd pub/timriley/appaserver d. ftp> dir appaserver* <-- notice the highest version e. ftp> get appaserver_$version.tar.gz f. ftp> bye or a. cd $APPASERVER_HOME b. ftp timriley.net <-- login in as anonymous/whatever c. ftp> cd pub/timriley d. ftp> dir appaserver* <-- notice the highest version e. ftp> get appaserver_$version.cpio.gz f. ftp> bye 3) Untar Appaserver: a. cd $APPASERVER_HOME b. zcat appaserver_$version.tar.gz | tar -xvf - Note: the tar file does NOT contain a subdirectory root. So $APPASERVER_HOME should either be empty or contain a previous version of Appaserver. or Uncpio Appaserver: a. cd $APPASERVER_HOME b. zcat appaserver_$version.cpio.gz | cpio -ivdu Note: the cpio file does NOT contain a subdirectory root. So $APPASERVER_HOME should either be empty or contain a previous version of Appaserver. 4) Create the application's directories and check permissions: a. cd $APPASERVER_HOME b. mkdir $application c. make sure $APPASERVER_HOME/$application is writable by apache. d. mkdir data e. make sure $APPASERVER_HOME/data is writable by apache. f. make sure $CGI_HOME is writable by apache. - Appaserver writes messages to $CGI_HOME/appaserver.err . g. make sure $CGI_HOME is writable by your non-root login name. 5) Compile Appaserver: a. cd $APPASERVER_HOME b. make_appaserver.sh or makeall.sh <-- makeall.sh is archaic. 6) Create the links: a. ln -s $APPASERVER_HOME/$application $DOCUMENT_ROOT b. ln -s $APPASERVER_HOME/src_$application $DOCUMENT_ROOT c. ln -s $APPASERVER_HOME/javascript $DOCUMENT_ROOT Note: The Apache configuration file (httpd.conf) needs to have "Options FollowSymLinks" set. 7) Generate index.html: a. cd $APPASERVER_HOME b. cp index_$application_template.html $DOCUMENT_ROOT/index.html or cp index_template.html $DOCUMENT_ROOT/index.html c. edit $DOCUMENT_ROOT/index.html to taste. 8) Generate style.css a. cd $APPASERVER_HOME b. cp style-generic.css $DOCUMENT_ROOT/$application/style.css c. edit $DOCUMENT_ROOT/$application/style.css to taste. 9) Create the Appaserver configuration file: The Appaserver configuration file contains all of the information necessary to access the database. a. cd $APPASERVER_HOME b. cp appaserver_template.config /etc/appaserver.config c. edit appaserver.config to taste. - Note: make sure cgi_directory maps to httpd.conf --> ScriptAlias. - If ScriptAlias uses /cgi then cgi_directory must be /cgi. - If ScriptAlias uses /cgi-bin then cgi_directory must be /cgi-bin. d. protect appaserver.config to taste. 10) Create the database a. echo "create database $application;" | mysql -uroot -p 11) Test the Appaserver configuration file: a. echo "show tables;" | sql <-- no output is OK; investigate errors. 12) Create the Appaserver tables: a. create_$application_appaserver.sh <-- no output is OK; investigate errors. 13) Insert into the Appaserver tables: a. zcat insert_$application_appaserver.sql.gz | sql <-- no output is OK; investigate errors. 14) Create the application tables: a. create_$application.sh <-- no output is OK; investigate errors. 15) Insert into the application tables: a. zcat insert_$application.sql.gz | sql <-- no output is OK; investigate errors. 16) Execute any necessary upgrade scripts. a. upgrade-appaserver-database 17) Place the icons and style sheet: a. cd $APPASERVER_HOME b. cp trashcan.gif magnify_glass.gif $DOCUMENT_ROOT c. cd $APPASERVER_HOME/javascript d. cp calendar-brown.css calendar.css 18) Point your browser to $DOCUMENT_ROOT and login. Note: The initial username and password is nobody/nobody. Login as nobody/nobody and perform the following: a. Insert a new Appaserver User: you and password: yourpassword. b. Insert a new Role Appaserver User: you -- Appaserver System. c. Insert a new Role Appaserver User: you -- instructor. d. Insert a new Role Appaserver User: you -- administrator. e. Delete the Appaserver User: nobody. f. point your browser again to $DOCUMENT_ROOT and login as you/yourpassword. Debugging: clues to problems can be found in the tail of the following files: 1) $CGI_HOME/appaserver.err 2) /var/log/apache/error.log Note: make sure httpd.conf has CGI turned on: - ScriptAlias --> Options --> +ExecCGI is set. 19) Integrate DynarchMenu (optional): a. Purchase DynarchMenu (~$100) from http://dynarch.com. b. Untar it and set $DYNARCH_HOME. c. ln -s $DYNARCH_HOME $DOCUMENT_ROOT/hmenu d. Generate the menu stylesheet from one of the samples. - cd $DOCUMENT_ROOT/hmenu/src - cp skin-$favorite.css skin-$application.css or cp $APPASERVER_HOME/skin-generic.css skin-$application.css e. Link the stylesheet to the application. - ln $DYNARCH_HOME/src/skin-$application.css \ $DOCUMENT_ROOT/$application f. The application's stylesheets must be linked to DynarchMenu's tree. - ln $DOCUMENT_ROOT/$application/style.css \ $DYNARCH_HOME/src/style-$application.css