How I built this machine

David Mudrak
david.mudrak@pedf.cuni.cz
This document describes how I built the server titan.pedf.cuni.cz. It is based on Linux Slackware 11.0 with Python, MySQL, Apache, PHP, PostgreSQL, and Subversion compiled from source codes.

This is already outdated document. Recently, I have switched to Gentoo. I will leave these notes here hoping they might help to somebody sometimes. -- David Mudrak, 04/08/2008

Operating system

Linux Slackware 11.0. Full installation with following packages excluded: I have also configured and compiled my own kernel from vanilla sources.

Python

CFLAGS="-O3 -march=pentium4" ./configure --prefix=/usr/local/python-2.3 --enable-unicode=ucs4
Add the binaries path into /etc/profile
PATH="$PATH:/usr/local/python-2.3/bin"

MySQL

CFLAGS="-O3 -march=pentium4" CXX=gcc CXXFLAGS="-O3 -march=pentium4 -felide-constructors \ 
-fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static --with-charset=utf8 --with-extra-charsets=latin1,latin2,cp1250 \
--with-collation=utf8_czech_ci
Add the binaries path into /etc/profile
PATH="$PATH:/usr/local/mysql/bin"

PostgreSQL

./configure CFLAGS='-O3 -march=pentium4' --with-openssl --with-python
Add the binaries path into /etc/profile
PATH="$PATH:/usr/local/pgsql/bin"

Apache

SSL_BASE="SYSTEM" CFLAGS="-O3 -march=pentium4" ./configure --prefix=/usr/local/apache2 \
--enable-so --with-mpm=prefork --enable-rewrite=shared --enable-ssl=shared \
--enable-proxy=shared --enable-cache=shared --enable-disk-cache=shared --enable-deflate=shared
Add the binaries path into /etc/profile
PATH="$PATH:/usr/local/apache2/bin"

PHP

The configuration of PHP is mostly tuned for
Moodle and other database driven applications.
CFLAGS="-O3 -march=pentium4" ./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--prefix=/usr/local/php --with-mysql=/usr/local/mysql/ --with-pgsql=/usr/local/pgsql \
--with-gd --with-jpeg-dir=/usr --with-freetype-dir=/usr/lib --with-t1lib-dir=/usr/lib,/usr/include \
--enable-gd-native-ttf --with-zlib=/usr --with-iconv --with-png-dir=/usr --with-xml --with-openssl \
--with-mhash --enable-bcmath --with-bz2 --with-pic --enable-calendar --enable-ctype --with-gdbm \
--with-db3 --enable-dbase --enable-ftp --with-exif --enable-exif --with-gd --with-expat-dir=/usr \
--enable-wddx --enable-trans-sid --enable-shmop --enable-sockets --with-regex=php --enable-sysvsem \
--enable-sysvshm --enable-yp --enable-memory-limit --with-tsrm-pthreads --enable-shared \
--disable-debug --enable-mbstring --enable-mbregex --with-tidy=/usr/local --with-ldap
Add the binaries path into /etc/profile
PATH="$PATH:/usr/local/php/bin"

Subversion aka SVN server

CFLAGS="-O3 -march=pentium4" ./configure --enable-dav

Zope Products and other needed tools

I downloaded and installed Zope version 2.8.8.
./configure --prefix=/usr/local/zope --with-python=/usr/local/python-2.3/bin/python2.3 --optimize

MySQL connector

Usual installation of MySQL-python-1.2.1_p2 and ZMySQLDA-2.0.8.

PostgreSQL connector

Usual installation of psycopg2-2.0.5.1:
python setup.py build
python setup.py install
Usual installation of ZPsycopgDA (included with psycopg2).

TextIndexNG3

Usual installation of TextIndexNG3-3.1.13.tar.gz

Plone

I tried to install Plone-2.1.4 but it does not seem to work with Zope-2.8.8:
...
  File "/srv/zope/Products/CMFPlone/CatalogTool.py", line 27, in ?
    from Products.CMFPlone.utils import base_hasattr
ImportError: cannot import name base_hasattr
So I had to download and install Plone-2.1.3 which works fine.

pdftohtml

pdftohtml is a utility which converts PDF files into HTML and XML formats. It is used by PortalTransforms. I have installed pdftohtml-0.39.tar.gz.

Gentoo: emerge -av app-text/poppler

rtf-converter

rtf-converter is a command line RTF to HTML converter application written in C++. It removes specific font and font-size references leaving only the basic paragraph styles and bold, italic etc. It is used by PortalTransforms. I have installed rtf-converter_1.1.

rtf2xml

I have installed rtf2xml-1.33. It is used by PortalTransforms.

PIL

wget http://effbot.org/downloads/Imaging-1.1.6.tar.gz

vwHtml

Is probably used to index Microsoft Word documents. I have installed wv-1.2.4 utilities (http://wvware.sourceforge.net/).
./configure
make
make install