In this section, I'm going to describe the basic installation procedures, document the syntax used and the steps to follow for common admin tasks. This will be specific to the current setup, but with this information and the general information available, it should be relatively easy to translate to other setups. The server (DEWEY) is a Mircosoft Windows 2003 Server, running APACHE 2.

Setting up PLONE (ZOPE)

  • Documentation (http://plone.org/documentation/how-to/read-documentation and http://plone.org/documentation/tutorial/plone-apache)
  • Basically you can follow the documentation, but you need to make sure you get the versions they state for each of the different module you use... this can become a pain in the future, as I found when trying to add database connectors. The cleanest solution for any installation of plone is to use the source version. The core to the problem I encounted was the fact I had multiple python installations. Plone installs one instance, if you already have python installed at this point, plone will ask if it can replace it in the registry - this is bad and will screw up everything else that uses python - why can't plone just make use of the pre-installed instance is beyond me. Though I think one way round this that might work (haven't tested it) is to install zope from the binary (it may be able to use an existing python install) then install plone from a tarball. This kind of setup is actually not much more complex. In our current setup (which seems to be working well) I first installed plone (from binary) without any preinstalled python, and then installed the trac (which is able to make use of an plone-installed python instance). For more on this issue see my notes under wiki:SqlAdapters.
  • Once a plone instance is up and running it needs configuring. To start with I changed the ports and made sure ftp and webdav were disabled. Both http and the manage ports were set to 8888. I called the plone instance oats and setup a virtualhostmonster so that I didn't have to open extra ports on our firewall. To confirm plone is working 127.0.0.1:8888/oats/ takes you to the oats plone instance and 127.0.0.1:8888/oats/manage/ takes you to zope management area for the oats instance. Next you need to tweak the apache configuration to link to the virtualhost monster ie. to tidy up the url... this is described below in the apache configuration section (and the documenation).
  • Adding plone to your apache htconf file
    <VirtualHost *:80>
         ServerName www.oatsoft.org
         RewriteEngine On
         # Exclude certain urls from rewritting... ie. webalizer is an alias to folder under htdocs not on the plone
         RewriteCond %{REQUEST_URI} !^(/trac|/svn|/webalizer).*$
         # Rewrite and proxy the plone traffic throught the virtualhostmonster
         RewriteRule ^/(.*) http://134.36.34.102:8888/oats/VirtualHostBase/http/www.oatsoft.org:80/VirtualHostRoot/$1 [L,P]
         ProxyVia on
         ...
    </VirtualHost>
    
  • Thats it, you should be up and running, and now you can customize the plone (described below) as you wish.

Setting up TRAC

  • Documentation (http://projects.edgewall.com/trac/wiki/TracGuide)
  • Basically you can follow the documentation, but you need to make sure you get the right versions of all the little modules needed. This is much simpler to get up and running in basic form, but the advanced stuff is a headache. One major issue I had with trac installation and its not really a trac issue, but a subversion one. Subversion when they changed to 1.2, the windows binary installers changed the berkley database library - this means you subversion repositories suddenly stop working.. and if like me, you switch from happy mode to "aghghgh what is happening!!!" mode. The solution required was to upgrade all the subversion repository databases, and any other libraries that talk to subversion ie. the python-svn link used by the trac. Few it worked :)... Anyway, this should not be an issue for the future, unless another weird upgrade happens at subversion.
  • Create an trac environment (this is the a per-project job, and currently is a manual process)
  • All the oats tracs are under the area c:\program files\subversion\trac\oats\{trac-project} - each project is in brackets
  • The subversion repositories that the oats trac links to are hosted at c:\program files\subversion\repositories\oats\{svn-repos}
  • Create the subversion repository too if not done so already) - i just explore to the top-level are ...repositories\oats create a new folder eg. oats and right click on it, and using tortoise-svn, select "create repository here".
  • Open a console at the python-scripts folder eg. C:\Program Files\Plone 2\Python\Scripts, and run the following command (eg. creates this oats trac)
     python trac-admin "c:\program files\subversion\trac\oats\oats" initenv
    
  • Answer the questions, and if necessary edit the configuration file under the {trac-project}\conf folder, this is currently a problem i have with trac, if we want to tweak anything on it, it has to be done via the console shell. It would appear that this is being addressed for a future release http://projects.edgewall.com/trac/ticket/11
  • Add trac to your htconf file (this is for multiple projects in a subdomain)
  • This means you only have to edit the htconf file once, not per project
  • All tracs must be stored under the same top level folder, in this case ...subversion\trac\oats\{trac-project}
    <VirtualHost *:80>
         ServerName trac.oatsoft.org
         # Create an alias to match the default trac configuration for hosting the images and stylesheets
         Alias /trac "C:\Program Files\Plone 2\Python\share\trac\htdocs"		
         RewriteEngine On	
         # Exclude the trac alias from being rewritten
         RewriteCond %{REQUEST_URI} !^(/trac).*$
         # Pass the 1st argument ie. 1st set of brackets to the trac-env ie. the actual trac eg. "oats";
         # Pass the 2nd argument ie. 2nd set of brackets to trac.cgi script ie. this be trac components eg. "wiki" 
         RewriteRule ^/([[:alnum:]]+)(/?.*) c:/program\ files/apache\ group/apache2/cgi-bin/trac.cgi$2 [E=TRAC_ENV:c:/program\ files/subversion/trac/oats/$1]
         # Handle trac project logins
         <LocationMatch "/[[:alnum:]]+/login">
    	AuthType Basic
    	AuthName "OATSoft TRAC Portal"
    	AuthUserFile .htpasswd
    	Require valid-user
         </LocationMatch>	
    </VirtualHost>