                                    install
                                    =======

Author: Alpesh Gajbe <alpesh@gnubox>
Date: 2008/07/12 01:20:39  IST


Table of Contents
=================
1 Installing the software
    1.1 Main software installation 
2 Creating Plone instance in zope
3 Creating ZPsycopg instance and configuring it
4 Creating SQLPASPlugin instance and configuring it
5 The last step : Creating selfApp instance


1 Installing the software
~~~~~~~~~~~~~~~~~~~~~~~~~
The installation instructions are for getting SELF Platform installed
on a new host. Please read dependencies in readme.txt and ensure all
dependencies are met.

1.1 Main software installation 
===============================
This process may take atleast half an hour depending on the speed of your machine.

     1. use the following command to extract the archive
        tar -xvzf selfApp-rc1-UnifiedInstaller.tar.gz


     2. To install selfApp, cd to the installer directory and issue the following command: 
        >> sudo ./install.sh (or `su; ./install.sh` on a sudo-less system)
        The installer will compile Python, Zope, psycopgda and all required libraries from source.

     3. After this give the following command sudo ./gnowsys-pg-install.sh
        This will install the database with factory defaults in postgresql-8.3

     4. To start Zope give the following command 
        sudo /opt/Plone-2.5.2/zeocluster/bin/startcluster.sh

    

2 Creating Plone instance in zope
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



  
  1. go to the Zope management Interface using a browser, say firefox
     depending on which port the Zope is currently running.  Usually
     it is [http://localhost:8080/manage] 
   
   
  2. install a "Plone Site" from the add product menu. The name of
     the Plone site can be your choice, say 'self-platform'
 
 
  3. if the name of the Plone Site is given as 'self-platform', then
     view the self-platform from [http://localhost:8080/self-platform]
 
 
  4. click on the link "Preferences"  You will see this if you are
     already logged in.  You have to be logged in as a user with
     'manager' previleges.
 
 
 

3 Creating ZPsycopg instance and configuring it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    Inside the plone instance click on the 'Add' button and select 
    'Z Psycopg 2 Database Connection' then give the id as 'auth\_db'
    and put in the connection string as 
    'dbname=<databasename> user=<username> password=<password> host=<localhost> port=<port no>'
    keep the rest as defaults and press 'Add'

4 Creating SQLPASPlugin instance and configuring it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    This plugin stores all the user details in the postgresql, and is
    an extension to the Plone/Zope authentication.
    
    SQLPASPlugin is a Plone Archetype product.  Therefore, for its
    installation view the Plone site; goto Preferences; select
    "Add/Remove Products"; select 'SQLPASPlugin' and click 'install'
    button.

    Next step is to perform some configuration of the Plugin.  

    - In the Preferences menu, notice the 'Add on Product
      Configuration' items, select 'SQL Authentication'.

    - Change the field value 'name of the user table' from 'users to
      'auth\_schema.users', and apply changes.

    - Visit the 'acl\_users' object from the Plone instance. You will
      see three SQL objects in the acl\_users's folder. 

    - Click on the  'Properties Plugin' link.

    - Change the 'Column Mapping Field' values, and add two lines as
      follows and save changes.

fullname/fullname 
email/email
           
    - Then from the acl\_users folder, click on 'source\_roles'.

    - Click on the 'Properties' tab in the ZMI.

    - Change the value of  'roles\_table' to 'auth\_schema.roles' and save changes.

    - Then from the acl\_users folder, click on 'source\_users', and
      save changes.

    - Click on the 'Properties' tab in the ZMI.

    - Change the value of  'default\_encryption' to 'md5' and save changes.

      Now the site is configured for registration of users.  The
      customized Plone site now transparently uses gnowsys-pg for
      authentication. However, follow the instructions below for
      building the storage schema.



5 The last step : Creating selfApp instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



   1. goto [http://localhost:8080/self-platform.] click on Site-Setup on
      right hand side top hand then on the Site-Setup page on the left
      hand side panel you will find a link by name "Add/Remove
      Products".Click on it.


   2. select "selfApp" from the quick installer, and add.

      These steps will extend the Plone site and mutate it to behave
      like a self-platform. After this step, you can use the
      self-platform from the [http://localhost:8080/self-platform.] 


      


  The installation procedure is still not automated.  Currently the
  following procedure helps technically savvy to install and inspect
  the software.  RPM and Deb based packaging will be done shortly.

  As and when the procedure advances this documentation will be
  updated. 





