*** empty log message ***

This commit is contained in:
alba 2002-08-03 19:48:31 +00:00
parent bbfcfe5db8
commit 1fec52bfba
5 changed files with 301 additions and 39 deletions

View File

@ -1,3 +1,7 @@
=======================================
Installation
=======================================
2002-08-03
Installation of lampadas is a bloody mess.
@ -7,54 +11,90 @@ alexander.bartolich@gmx.at
Tested with Red Hat 7.3, Debian 3.0r0 and SuSE 7.3.
=============
Documentation
=============
Directory 'doc' holds some related plain text files.
'doc/INSTALL.ancient' are the original notes from David Merill.
'doc/INSTALL.mandrake' is the diary of a successful installation
'doc/INSTALL.redhat' are special steps required on Red Hat 7.x
on Mandrake 8.2. (FIXME: by whom?)
=============
Outline
=============
The process can be summarized like this:
A summary of the process:
0. Copy/extract lampadas files
1. Install a lot of tools, modules, packages
2. Build documentation in directory 'doc'
3. Install postgresql database
4. Install Apache with mod_python and python 2.x
Reading this file means you somehow accomplished this step.
Note that lampadas does not require compilation and copying of
resulting files to some destination directory. Move the whole
directory to the final location, e.g. /opt/lampadas.
=======================================
0. Copy/extract lampadas files
=======================================
1. Install postgresql database
Reading this file means you somehow accomplished this step.
Note that lampadas does not require compilation and copying of
resulting files to some destination directory. Move the whole
directory to the final location, e.g. /opt/lampadas.
This directory can be operated read-only after configuration.
All major distributions provide pre-fabricated packages of
postgresql. You still need to create user accounts and configure
authentication, though.
=======================================
1. Install a lot of tools, modules, packages
=======================================
2. Install Apache with mod_python and python 2.x
The prefered way to verify this step is with a bash script you'll
find in this directory:
FIXME
./configure
x. Install a zillion requisites.
./configure should help in identifying some of them.
The script is very dump. It tries to identify your distribution
and then checks whether files exist in the usual places.
x. Use ./configure to patch some values of your configuration.
Manually edit bin/setenv.sh and conf/lampadas.conf
I don't like third-party RPMs and unstable DEBs. My philosophy
is to use as much standard packages as possible, and compile
everything else manually. In this case:
=============
Postgresql
=============
wt2db-0.5
pypgsql-2.1
mod_python-2.7.8 (only Red Hat)
Please contact me if your distribution is unusual or you prefer
to compile all things from scratch. And please read all of this
document before you install missing things.
If all tests are passed ./configure will patch a few text files
with correct path names. This is not fool proof. Please check at
least the files 'bin/setenv.sh' and 'conf/lampadas.conf'.
=======================================
2. Build documentation in directory 'doc'
=======================================
This step is very optional. First of all it's just documenation,
nothing vital. And then the installation kit (lampadas-*.tar.gz)
already contains all rendered HTML.
It's a nice way to test some tools from step #1, though.
And developers accessing CVS should really give it a try.
cd doc
make clean
make
=======================================
3. Install postgresql database
=======================================
All major distributions provide pre-fabricated packages of postgresql.
You still need to create user accounts and configure authentication,
though. Local accounts are the easiest case since that requires no
passwords or network control.
Usually there is only one priviledged account (called 'postgres')
with access to the postmaster. You will need two other local accounts.
One for database management, one for the webserver.
with access to the postmaster. You will need two other accounts.
One for database management, one for the webserver. See for
'bin/setenv.sh' for the value of LAMPADAS_WWW_USER. It should have
been set by ./configure.
To grant another local account access, do this as root (since postgres
has no set password).
To grant another account access, do the following (as root, since
user postgres has no password set):
su - postgres -c 'createuser -A -d alba'
@ -69,9 +109,38 @@ Test the result:
psql lampadas
=============
Apache
=============
To create tables and insert default values use 'bin/lampadasdb'.
This tool requires some environment variables defined by 'bin/setenv.sh'.
Please read the comments in that file.
Please run the webserver under a separate account like 'apache',
not under a shared account like 'nobody'.
. bin/setenv.sh
bin/lampadasdb create
bin/lampadasdb insert
=======================================
4. Install Apache with mod_python and python 2.x
=======================================
This is a problem on Red Hat 7.x, where '/usr/bin/python' is a
Python 1.x. Read 'doc/INSTALL.redhat' how to roll your own.
On the other hand Red Hat has no problems with compilation of
pypgsql-2.1. My experience on both Debian 3.0r0 and SuSE 7.3
is that 'python setup.py build' breaks because of missing header
files. Just add the result of
pg_config --includedir
to variable C_INCLUDE_PATH. In the simpliest case this means
export C_INCLUDE_PATH=`pg_config --includedir`
On SuSE 7.3 another directory is required, i.e.
export C_INCLUDE_PATH=/usr/include/pgsql:/usr/lib/apache/include/python2.1
I also found that you can safely ignore the message
gcc: unrecognized option `-R/usr/local/pgsql/lib'
and just continue with 'python setup.py install'.

View File

@ -51,6 +51,20 @@ check_which()
check "$1" "$2" "Can't find $2 in \$PATH" which_test "$2"
}
#
# check_www_user
#
check_www_user()
{
WWW_USER=$1
echo -n "Checking for user ${WWW_USER} in /etc/passwd ... "
grep "^${WWW_USER}:" /etc/passwd > /dev/null && echo "Ok." && return 0
echo "No."
echo "Is apache installed?"
CHECK_ERROR=$( expr ${CHECK_ERROR} + 1 )
return 1
}
#
# identify_dist
#
@ -102,6 +116,8 @@ check_dist_redhat()
HTML_DOCBOOK=${dir}/docbook.xsl
check_file ${mode} ${HTML_DOCBOOK} "${error}"
check_www_user apache
}
#
@ -127,6 +143,8 @@ check_dist_debian()
HTML_DOCBOOK=${dir}/docbook.xsl
check_file ${mode} ${HTML_DOCBOOK} "${error}"
check_www_user www-data
}
#
@ -158,10 +176,12 @@ check_dist_suse()
HTML_DOCBOOK=${dir}/docbook.xsl
check_file ${mode} ${HTML_DOCBOOK} "${error}"
check_www_user wwwrun
}
#
#
# check_perl_module
#
check_perl_module()
{
@ -199,6 +219,22 @@ check_html_parser()
return 1
}
#
# check_postgres
#
check_postgres()
{
check_which count psql "Can't find package 'postgresql'"
if ! check_which count pg_config; then
case ${DIST_NAME} in
debian) pkg=postgresql-dev ;;
redhat) pkg=postgresql-devel ;;
suse) pkg=postgresql-devel ;;
esac
[ -n "${pkg}" ] && error="The package is called '${pkg}'."
fi
}
#
# check_xsltproc
#
@ -256,7 +292,6 @@ check_python()
#
check_python_import()
{
PYTHON=python
for module in "$@"; do
echo -n "Checking python module ${module} ... "
${PYTHON} -c "import ${module}" 2> /dev/null
@ -300,6 +335,7 @@ patch_setenv()
echo -n "Patching ${file} ... "
sed -e "s|\(${prefix}XML_DTD_412=\).*|\1\"${XML_DTD_412}\"|" \
-e "s|\(${prefix}XML_ISO_NUM=\).*|\1\"${XML_ISO_NUM}\"|" \
-e "s|\(${prefix}WWW_USER=\).*|\1\"${WWW_USER}\"|" \
${file} > ${file}.tmp
if [ $? != 0 ] || ! mv -f ${file}.tmp ${file}; then
echo "No."
@ -317,9 +353,12 @@ echo "Identified this installation as '${DIST_NAME}'."
cat ${DIST_FILE}
check_dist_${DIST_NAME} "count"
for app in iconv m4 make perl psql sed tar; do
for app in iconv m4 make perl sed tar; do
check_which count ${app}
done
check_postgres
check_xsltproc
check_html_parser
check_which count wt2db
@ -334,4 +373,7 @@ fi
echo "No errors."
patch_xsl || exit -1
patch_setenv bin/setenv.sh || exit -1
sed -e 's/^export/setenv/' -e 's/=/ /' bin/setenv.sh > bin/setenv.csh
echo -e "Creating bin/setenv.csh ... "
sed -e 's/^export/setenv/' -e 's/=/ /' bin/setenv.sh \
> bin/setenv.csh \
&& echo "Ok."

View File

@ -0,0 +1,44 @@
NOTE: Installation is being reworked, but this is how it works now:
Installation from the tarball or .tar.gz, or from CVS, uses standard
Makefiles. run `make` to build the few things that need to be built,
primarily the documentation. Then run `make install` as root to install
files.
Files are installed into the following locations by default. To change
them, edit the Makefiles.
binaries: /usr/local/bin
man pages: /usr/share/man/man5
/usr/share/man/man8
Lampadas.pth: /usr/local/lib/site-python
python modules: /usr/local/lib/site-python/Lampadas
html, png, css: /usr/local/share/lampadas/www
SQL scripts: /usr/local/share/lampadas/sql
If you want to use other directories, edit the Makefiles before
running install.
Requirements
------------
Python, of course
PostgreSQL (I think 6.x is okay, but have not tested it).
xsltproc for xml/xslt stylesheet processing
wt2db 0.4 or later for WikiText conversions
texi2db for Texinfo conversions
jade or openjade for LinuxDoc conversions
xmllint for SGML to XML conversions and validation
docbook-to-man for manpage generation
docbook dtds
docbook xsl stylesheets from Norm Walsh
docbook dsssl stylesheets
linuxdoc dtds
linuxdoc dsssl stylesheets
tar for .tar and .tar.gz archive support
gunzip for .gz archive support
make for publishing static content
lynx for text output support
iconv for charset encoding translations
scrollkeeper to generate series ids

View File

@ -0,0 +1,78 @@
Installation Notes on Mandrake 8.2
----------------------------------
Python
Already installed. No changes required
PostgreSQL
If you have chosen database packages during installation, this is installed.
Still have to use chkconfig to start the postgresql server automatically
xsltproc
Not installed by default.
It requires
libxml2, libxml2-devel, libxslt1, libxslt1-devel packages
libxml2, libxml2-devle, libxslt1 are installed by default
Download libxslt1-devel
wget ftp://speakeasy.rpmfind.net/linux/Mandrake/8.2/i586/Mandrake/RPMS/libxslt1-devel-1.0.12-1mdk.i586.rpm
Install it
rpm -i libxslt1-devel-1.0.12-1mdk.i586.rpm
Download libxslt-proc
wget ftp://speakeasy.rpmfind.net/linux/Mandrake/8.2/i586/Mandrake/RPMS/libxslt-proc-1.0.12-1mdk.i586.rpm
Install it
rpm -i libxslt-proc-1.0.12-1mdk.i586.rpm
wt2db, texi2db
Check http://www.tldp.org/downloads/ for the current versions.
For both the packages unpack, move to the proper directory and
Generate Makefile
perl ./Makefile.PL
Build the package:
make
Install the files in the appropriate locations:
make install
jade or openjade for LinuxDoc conversions
Already installed
xmllint for SGML to XML conversions and validation
Already installed
docbook-to-man for manpage generation
Get docbook-to-man
wget http://www.oasis-open.org/docbook/tools/dtm/docbook-to-man.tar.gz
Uncompress it
tar zxvf docbook-to-man.tar.gz
It doesn't compile by default.
Remove lines 708, 807 in file Instant/tptregexp/regexp.c
Make and install it
make
su
make install
Change the dtd and dcl settings in /usr/local/bin/docbook-to-man script
as
ROOT=/usr
SGMLS=$ROOT/share/sgml
DOCBOOK=$SGMLS/docbook/sgml-dtd-3.1
..
..
CATALOG=$DOCBOOK/catalog
DECL=$DOCBOOK/docbook.dcl
docbook dtds
Version 3.1 is installed by default.
docbook xsl stylesheets from Norm Walsh
Get from docbook sourceforge site.
wget http://telia.dl.sourceforge.net/sourceforge/docbook/docbook-xsl-1.51.1.tar.gz
Uncompress and move to a proper location like /usr/share/sgml
tar zxvf docbook-xsl-1.5.1.1.tar.gz
su
mv docbook-xsl-1.5.1.1.tar.gz /usr/share/sgml/docbook
ln -s /usr/share/sgml/docbook/docbook-xsl-1.5.1.1.tar.gz
/usr/share/sgml/docbook/docbook-xsl
Change the xsl:import statement in the xsl stylesheets in xsl directory
docbook dsssl stylesheets
Already installed
linuxdoc dtds
linuxdoc dsssl stylesheets
I am not sure whether this is needed or not. I downloaded the noarch
rpm and put it in /usr/share/sgml
wget ftp://speakeasy.rpmfind.net/linux/yellowdog/old_releases/champion-1.2/ppc/YellowDog/RPMS/linuxdoc-1.0-1.noarch.rpm
tar for .tar and .tar.gz archive support
gunzip for .gz archive support
make for publishing static content
lynx for text output support
Already installed

View File

@ -0,0 +1,29 @@
Lampadas needs mod_python and python 2.x.
Unfortunately '/usr/bin/python' is a Python 1.x. on Red Hat 7.x.
And we can't just replace that package, since a lot of GUI tools
depend on it. Even worse the package 'mod_python' is compiled with
that Python 1.x, so we have to build that one, too.
My recommendation:
Remove shipped 'mod_python', if present.
Install package 'apache-devel'
Install package 'python2' shipped since Red Hat 7.2.
You can also compile your own and install it in a separate
(but arbitrary) location like '/opt/Python-2.2'.
/usr/bin/python is a hard link to /usr/bin/python1.5, check with
ls -li /usr/bin/python*
Temporarily remove /usr/bin/python and create a link to /usr/bin/python2
cd /usr/bin
rm python
ln python2 python
Compile mod_python and module pyPgSQL. They will both search for
'python' in $PATH during 'python setup.py build', but only to
retrieve the library path. If found that you can savely reverse
the link of /usr/bin/python and mod_python will still work.