Skip to content

Rhaptos Software Development

Personal tools
You are here: Home » Members » lwilson's Home » Rhaptos Install on Debian with Plone 2.5

Rhaptos Install on Debian with Plone 2.5

Document Actions
How to do a Rhaptos Install on Debian from scratch

These instructions assume you're installing a basic Debian system at the "etch" stable distribution.

We've attempted to make this a "Cut & Paste HOWTO": most commands should work by directly cutting and pasting to a command prompt.

Some information to gather/decide up front:
What Unix user will your zope/plone install run as?
These notes assume www-data. We should move to the debian standard 'zope' user eventually.
Standalone Zope, or split FE/BE (Zope/ZEO)?
These instructions set up a split system.
What database name?
default: repository
What database dba username?
default: rhaptos_dba
What database daily use username?
default: rhaptos
Security
You're going to need root access to the server to install and configure packages. All command examples here are run as root. Some of these server application configs have security implications. Note that our production instances have additional safeguards (IP level filtering, etc.) to alleviate some of these problems.

Debian sources config

Using a root shell, Edit your /etc/apt/sources.list and add these lines:

deb http://rhaptos.org/debian binary/
deb http://www.backports.org/debian etch-backports main contrib non-free

Then Run

apt-get update # This will generate an error: NO_PUBKEY

Then Run

apt-get install debian-backports-keyring

Then Run

apt-get update

Configure Debian and install packages

Core packages

apt-get -t etch-backports install postgresql-8.3

apt-get install cvs zope2.9 # Required server software: zope2.9 will bring in python2.4.

apt-get install python-imaging python-libxslt1 python-libxml2 # various python bindings for needed libraries

apt-get install python-psycopg # additional python DB bindings

apt-get install python2.4-pycvs connexions-xml # Rhaptos provided python cvs wrapper, and CNXML support files

apt-get install subversion # needed for new development work, or installing from svn, only

Needed for print system (PDF generation) support

(Note that on Ubuntu, there is a transition from tetex to texlive as the base latex distribution. This may install other packages)

apt-get install gif2png gs-gpl cjk-latex tetex-extra latex-ucs

apt-get install latex-ucs-contrib hbf-kanji48

apt-get install xsltproc make

Needed for word processor document import support

apt-get install xvfb xfonts-base openoffice.org

Needed for LaTeX import support (added by Jenn, 5/20/08)

apt-get install imagemagick tralics unzip libxml2-utils

Configure postgresql

The initial Rhaptos install needs access to a PostgreSQL DBA level 'superuser' account. Daily operations do not need such access.

Create rhaptos postgresql users.

su postgres -c 'createuser -s rhaptos_dba'
su postgres -c 'createuser -SdR rhaptos'

Modify pg_ident.conf (which is in /etc/postgresql/8.3/main), adding lines:

rhaptosusers www-data rhaptos_dba
rhaptosusers www-data rhaptos

Modify pg_hba.conf (also in /etc/postgresql/8.3/main) to give these users access to the databases. Initially, only via socket connections. Add:

local template1 rhaptos,rhaptos_dba ident rhaptosusers
local repository rhaptos,rhaptos_dba ident rhaptosusers

Before the line:

local all all ident sameuser

Restart/reload postgres

/etc/init.d/postgresql-8.3 restart

Configure CVS

Create the CVS repository used by Rhaptos, if not already present

cvs -d /var/lib/cvs init
mkdir /var/lib/cvs/xmlpages

Check out the "cvswrappers" file:

cd /tmp
cvs -d /var/lib/cvs co CVSROOT/cvswrappers
cd CVSROOT

Edit cvswrappers to add:

*.gif -k 'b'
*.png -k 'b'
*.jpg -k 'b'
*.exe -k 'b'
*.dll -k 'b'
*.llb -k 'b'
*.vi -k 'b'

Commit the file to CVS and cleanup:

cvs commit -m"Specified binary types."
cd ..
rm -rf CVSROOT

Set permissions on the xmlpages dir in CVS: (group writable is a dev convenience)

chown -R www-data:www-data /var/lib/cvs/xmlpages
chmod -R g+rw /var/lib/cvs/xmlpages

Configure Zope

Create a Zope instance (enter an admin login and password for zope)

export INSTNAME=rhaptos
/usr/lib/zope2.9/bin/mkzopeinstance.py -d /opt/instances/$INSTNAME \
--user admin:PASSWORDHERE --service-user www-data:www-data

Convert config file to ZEO front end. This comments out the direct ZODB access and uncomments the example ZEO access.

Cut and paste in one block, as two lines: the line break is significant.

sed -ie '\:^<zodb_db main>:,\:^</zodb_db>:s/^/#/
\:^# <zodb_db main>:,\:^# </zodb_db>:s/^# //' /opt/instances/$INSTNAME/etc/zope.conf

And matching ZEO backend

/usr/lib/zope2.9/bin/mkzeoinstance.py /opt/instances/$INSTNAME

Download and install Plone-2.5.5

cd /usr/local/src
wget --no-check-certificate https://launchpad.net/plone/2.5/2.5.5/+download/Plone-2.5.5.tar.gz
tar xzvf Plone-2.5.5.tar.gz
cd Plone-2.5.5
mv * /opt/instances/$INSTNAME/Products

Download and install Rhaptos

There are two approaches, you can install a tarball of the system that comes with an install.sh script that will do most of the configuration for you. Or, you can check out the source via SVN and do the configuration by hand (as described below).

Option1: Install using tarball

Download either the latest known working version, or use one of the nightly builds from here.

Un-tar the tarball

cd into the rhaptos directory and run the install.sh. This performs all the configuration steps described below except the svn checkout.

Option2: Check out Rhaptos using SVN

Checkout Rhaptos into Zope Products directory (accept certs permanently)

cd /opt/instances/$INSTNAME/Products
svn export https://software.cnx.rice.edu/svn/Rhaptos-with-depends/branches/rhaptos25-install Rhaptos

Note that copies of external Rhaptos dependencies are now kept in the Rhaptos SVN, and are present in this bundle.

cd /opt/instances/$INSTNAME/Products
for P in $(awk ' $1 == "-" {print $2}' Rhaptos/CONTENTS.txt); do ln -s Rhaptos/$P $P; done

make sure everything is owned by www-data:

chown -R www-data:www-data .

To allow the site to start automatically when the machine boots, do the following steps:

Create the home directory for www-data

mkdir /var/www
chown www-data:www-data /var/www

Edit the instance name in the oolaunch.init script to be your instance name.

Edit the file /opt/instances/$INSTNAME/Products/CNXMLTransforms/Extensions/oolaunch.init.debian

edit the line:

INSTANCE=cnx
to
INSTANCE=instance_name

Make symlinks in init.d:

ln -s /opt/instances/$INSTNAME/bin/zeoctl /etc/init.d/zeo
ln -s /opt/instances/$INSTNAME/bin/zopectl /etc/init.d/zope
ln -s /opt/instances/$INSTNAME/Products/CNXMLTransforms/Extensions/oolaunch.init.debian /etc/init.d/oolaunch

Update the rc.d directories:

update-rc.d zeo defaults
update-rc.d zope defaults
update-rc.d oolaunch defaults

Start Zope instance

Regardless of which option you chose above, now you need to start the new services.

/etc/init.d/zeo start
/etc/init.d/zope start
/etc/init.d/oolaunch start

Access the Zope Management Interface (ZMI)

To access the ZMI go to this URL in a browser:

http://[name of machine]:9673/manage

This will prompt for your Zope administrator login and password which were defined in the Configure Zope section above.

Create and Run Rhaptos Site

Create a Rhaptos site using ZMI by selecting the Rhaptos Site entry from the add pull down menu on the root folder in ZMI.

Enter Data in the following fields:

ID: any short name (rhaptos is suggested)
Accept the database defaults.

Click the Add Rhaptos Site button. After grinding a bit, your base site should be installed.

To access the new rhaptos site go to this URL in a browser:

http://[name of machine]:9673/rhaptos (or the ID value you entered above)

Redirect:

A VirtualHostMonster object with the id virtual_hosting is installed in the root of any default Zope site. This will allow you to redirect all accesses into the rhaptos site. The simplest way is to navigate to /virtual_hosting and click on the Mappings tab (/virtual_hosting/manage_edit) Add a line YOURHOSTNAME/rhaptos will now cause all browser access to YOURHOSTNAME:9673 to be redirected into the rhaptos site. If you do this, modify the directions below by removing the /rhaptos component of each URL.

Basic Rhaptos Config

From this point, it is best to log out of the top-level zope authentication (admin) by closing your browser, and log directly into the rhaptos interface. E.g., log in to localhost:9673/rhaptos instead of localhost:9673.

Currently, Rhaptos only supports the 'email an activation link' method of account creation. This requires a valid SMTP email configuration.

Log in to the Rhaptos Site with your top level Zope admin login.
Click the "site settings" link at the extreme upper right of the page.
Click Mail Settings and configure an SMTP server that will accept email from your machine
Return to Site Setup (after Save) and click Portal Settings
Make sure the Site 'From' address is acceptable to your SMTP server

You may now create Rhaptos user accounts via either the 'Get an account' link in the login box, or the 'join' link from the status bar.

Configure Collection Printing

If you wish to have collection printing in your system, as opposed to just module printing, you will need to configure the Collection Printing system.

Currently, the Collection print system requires some additional configuration, in both the ZMI and the filesystem.

ZMI

In the ZMI, click on the rhaptos portal object.

Create an Asynchronous Collection Printer by selecting Asynchronous Collection Printer from the add pull down menu. Accept the default Id of RCPrinter, correct the Portal Path to be the full path to the Rhaptos object (/rhaptos, if you're using the default name), enter a path for the Makefile Path of /opt/instances/rhaptos/Products/RhaptosCollection/printing/Makefile and click add

Click on the 'rhaptos' object to get back to the ZMI listing for the portal. Click on portal_properites and select rhaptos_collection_print_config

Set the servicehost to the hostname:port values appropriate to reach your site (localhost:9673 might do it) and servicepath to the path to the Asynchronous Collection Printer we just created: /rhaptos/RCPrinter

File System

We need to edit the Makefile installed with the printing subsystem in RhaptosCollection

cd /opt/instances/rhaptos/Products/RhaptosCollection/printing
sed -i "s:PRINT_DIR = /opt/printing:PRINT_DIR = $PWD:" Makefile
sed -i "s;HOST = http://localhost:8080;HOST = http://localhost:9673/rhaptos;" Makefile

NOTE: This Makefile is executed by the system when printing is requested, so no further commands are necessary

Created by lwilson
Last modified 2008-12-02 09:56