Installation on Sourceforge.net

The Sourceforge.net project webserver mounts project group directories read only. The standard installations of quite a few software (including Jaws) thus fail. This guide explains how you can get Jaws CMS up and running on SourceForge.net

1) Copy the jaws-complete-version.number.tar.gz (or any other file that you downloaded from the Jaws-Project) file to the SourceForge web server via SFTP or SCP as described by SourceForge.net documents. 2) Extract the jaws-complete-version.number.tar.gz file under the project web home directory using the “tar -xvf <tarfilename>” command. For eg if the project name is PROJECT, then you need to extract the file under /home/groups/P/PR/PROJECT/htdocs. This will create a directory called jaws under htdocs and extract all the files there. 3) To keep the installation simple, I moved all the files and directories under the jaws/html/ directory to the jaws/ directory.

  cd /home/groups/P/PR/PROJECT/htdocs/jaws/html
  mv * ..
  cd ..
  rmdir html

4) Since the SourceForge servers are mounted read only, the installation needs some manual steps to be done before initiating the installation. 5) Create your project directory under /tmp/persistent/PROJECT which is mounted Read/Write. In our eg. create the directory jaws and set its permissions as below.

  mkdir /tmp/persistent/PROJECT/jaws
  chmod 777 /tmp/persistent/PROJECT/jaws
  mkdir /tmp/persistent/PROJECT/jaws/config
  chmod 777 /tmp/persistent/PROJECT/jaws/config
  mkdir /tmp/persistent/PROJECT/jaws/data
  chmod 777 /tmp/persistent/PROJECT/jaws/data
  mkdir /tmp/persistent/PROJECT/jaws/session
  chmod 777 /tmp/persistent/PROJECT/jaws/session

6) Now we will have to link the install sources to the appropriate folders under /tmp/persistent/PROJECT

  First rename the existing directories.
  mv config config_save
  mv data data_save
  Now create sym links to the /tmp/persistent/PROJECT directories
  cd /home/groups/P/PR/PROJECT/htdocs/jaws
  ln -s /tmp/persistent/PROJECT/jaws/config
  ln -s /tmp/persistent/PROJECT/jaws/data

7) Setting the session path. Since Jaws (at present) does not allow this to be configured, this needs to be done manually for the present by changing the source code.

  cd /home/groups/P/PR/PROJECT/htdocs/jaws
  Edit the file index.php (use any editor of your choice) and 
  add the following code to the beginning of the file 
  (just after the comments header)
  session_save_path("/tmp/persistent/PROJECT/jaws/session");
  Add the above line of code also to the beginning of the 
  following files:
  install.php
  admin.php
  In summary, three files need to be added and the above 
  code lines added.

8) As the last step add the redirector file to the htdocs directory so that the url http://PROJECT.sourceforge.net is redirected to the jaws/ folder.

  Create a file index.php under the 
  /home/groups/P/PR/PROJECT/htdocs folder add add the
  following lines of code:
  <?php
  header("Location: http://PROJECT.sourceforge.net/jaws");
  ?>
  This will ensure that the jaws cms page is opened whenever 
  the URL to your project is accessed.

9) Create the jaws database by logging into the phpmyadmin installation for your project. For help on this read the great documentation on sourceforge.net at : http://sourceforge.net/docman/display_doc.php?docid=4297&group_id=1#mysql 10) Now start the install by accessing http://PROJECT.sourceforge.net and follow the standard steps as prescribed. 11) For the database settings you will need the following data. In this example we assume the sourceforge.net project name is PROJECT and the project group id (visible on the admin page of your project after you login to sourceforge) is 123456

  a)  Server : mysql4-P
  b)  Database : P123456_jaws
  c)  Login user : P123456admin
  d)  Login password : xxxxxx
  e)  Drive : MySQL

12) Complete the installation. 13) To avoid security risks, you will now need to move back the config directory.

   Delete the symbolic link first.
   cd /home/groups/P/PR/PROJECT/htdocs/jaws
   rm config
   mv config_save config
   cd config
   cp /tmp/persistent/PROJECT/jaws/config/*.* .
   Delete the config directory under /tmp/persistent now
   rm -rf /tmp/persistent/PROJECT/jaws/config

14) Manually set the JAWS_PATH in the config file.

   cd /home/groups/P/PR/PROJECT/htdocs/jaws/config
   Edit the file JawsConfig.php and comment out the 
   JAWS_PATH line and add a new line as described below:
   // define('JAWS_PATH', substr(dirname(__FILE__), 0, -6));
   define('JAWS_PATH', '/home/groups/P/PR/PROJECT/htdocs/jaws/');

15) Login to the admin page of jaws to administer it.

  The url: http://PROJECT.sourceforge.net/jaws/admin.php
  Install whatever gadjets and plugins that you need.

16) Once all configuration is done, you can change back the database login and password set when you installed to the Read/Write user that sourceforge.net provides.

   cd /home/groups/P/PR/PROJECT/htdocs/jaws/config
   vi JawsConfig.php
   Change the db['user'] and db['password'] entries 
   to the Read/Write user id (like P123456rw) and 
   password.
   IMPORTANT:  If you need to add any more gadgets etc, 
   you will need to change it back to the admin user id 
   and password.

17) Enjoy your Jaws installation. For sample installations visit my projects at www.bitknight.org and www.aladdinlinux.org hosted by sourceforge.net

 
  /var/www/wiki/htdocs/data/jaws/v06/sfnet.txt · Last modified: 2007/11/02 16:27