# =========================================================
# Header details
#
# Copyright ........: Frank Schulte (fschulte\@hightek.com)
# Module/method ....: ./sourceforge.net/doc/install-sourceforge.html
# Version ..........: 00001
# CVS ..............: $Id: index.html,v 1.1.1.1 2001/07/18 01:50:47 fschulte Exp $
# Analyst ..........: FS
# Developers .......: FS  - Frank Schulte (fschulte\@hightek.com)
# Description ......: Documentation HowTo setup a production grade sourceforge.net System for internal use
#
#  LastAmended Name
#  ----------- -------------------------------------------------------------
#
# History ..........:
#
# Vers.     Date    SSR   By  Reason
# ----- ----------- ---- ---- ------------------------------
# 00001 19.12.2000  n/a  FS   Begin Documentation of installation process
# 00002 21.02.2001  n/a  FS   Move changelog into a seperate file.
# =========================================================
0. Changelog: here

1.1. Preparations

Setup the basic Variables and folders by hand.

telnet install-host
normaluser
<password>

# Set this path to a location for the installation process. Systax is for bash compatible unix shells. We use as example:

BASE_SOURCES=/home/mitarbeiter/fschulte/work/system/sourceforge.net
export BASE_SOURCES

mkdir -p ${BASE_SOURCES}
cd ${BASE_SOURCES}
 

Now you have to think about some folders and usernames. Please write them down. You will need them in the make config; make setup steps below after we got the sources for sf-genericinst. We will use our pathnames and user/groups. Please adapt to your needs.
 
 

# This path is the system wide installation path of our own local installation packages.
# We use this to distinguish between OS Distribution Packages and our own installed Packages
PKG=/home/system/pkg/sourceforge.net
export PKG

# This is the system wide path for variable data used by the PKG packages. This should be a seperate Filesystem
VAR=/home/system/var/sourceforge.net
export VAR

We use this two folders to organize our files of the whole sourceforge.net system. We try to seperate all programs and sources from the underlying unix distribution to don't interfere with it. Now follows an example of the choosen structure:

Software Binaries    ${PKG}/pkgname/release
example:                    ${PKG}/apache/1.3.14

variable Data            ${VAR}/pkgname
example:                    ${VAR}/log


# Create the directory structure we use in installation process:
mkdir -p ${BASE_SOURCES}/sourceforge.net-binaries-needed-software  \
                  ${BASE_SOURCES}/sourceforge.net-binaries-archives/archive
 

This section of variables will be removed from the documenation in the future because we will ask interactively in the make config; make setup steps. At this time (01.03.2001) this new feature is only in the beginning steps, so I left this in the documentation to have a little guide for you. I know that this can be irritating. But I hope this improves in a fews days.

# Admin E-Mail address for the sourceforgesystem
EMAIL_ADMIN=admin@users.sourceforge.sofa.arxes.de
export EMAIL_ADMIN

# Domain under wich we operate the sourceforge.net service internaly
SF_DOMAIN=sourceforge.sofa.arxes.de
export SF_DOMAIN

# Apache user/group infos
APACHE_USER=sf-apache
APACHE_GROUP=sf-apache
export APACHE_USER APACHE_GROUP

# unix group of the users for all project groups
PROJECTS_GROUP=users
export PROJECTS_GROUP

# Ftp installation user/group
FTP_USER_RUN=sf-proftpd
FTP_GROUP_RUN=sf-proftpd

FTP_USER=sf-proftpd
FTP_GROUP=sf-proftpd

# Dummy user for database dumps and created controlfiles
DUMMY_USER=sf-dummy
DUMMY_GROUP=sf-dummy

# for cvs scurity feature
CVSADMIN_USER=cvsadmin
CVSADMIN_GROUP=cvsadmin

# the postgres database administrator
POSTGRES_ADMIN_USER=postgres
POSTGRES_ADMIN_GROUP=daemon

# the mailman owner
MAILMAN_USER=sf-mailman
MAILMAN_GROUP=sf-mailman

1.2. Get sf-genericinst Sources

You need the sf-genericinst package you can find on sourceforge.net. You can get a released tarball of a stable version from the "Files" section or you can follow the "CVS" link to get the sources by anonymous CVS. Please follow this link to get the needed information:

    http://sourceforge.net/projects/sf-genericinst/

On the CVS page use as "modulename" the string "sf-genericinst". So you can get the latest CVS version.

1.2.1. Step by step how to get the sf-genericinst cvs revision:

PLEASE NOTE: AS OF 01.03.2001 THIS CVS MODULE CONTAINS A COPY OF A WORKING AND SOMEWATH TESTED LATEST CVS VERSION OF THE SOURCEFORGE SOURCES CALLED webdev/alexandria.

WE DO NOT REQUIRE TO GET A alexandria CVS SOURCES UNTIL YOU WANT TO WORK YOURSELF ON THE INTEGRATION OF THE SF TEAM CHANGES AND ADD ONS.
 

# Login into the CVS server. Hit return when you are asked for a password.

cvs -d:pserver:anonymous@cvs.sf-genericinst.sourceforge.net:/cvsroot/sf-genericinst login

# Retreive the sourcecode. This will create a directory "sf-genericinst" in your current working path.
# The "-z3" option asks for a compressed transfer and is usefull for slow connections to the internet.

cvs -z3 -d:pserver:anonymous@cvs.sf-genericinst.sourceforge.net:/cvsroot/sf-genericinst checkout sf-genericinst

cd sf-genericinst

1.2.2. Step by step how to get the sf-genericinst tarball:

Point your browser to

    http://sourceforge.net/projects/sf-genericinst/

and click on the "Files" menue on top of the page. Choose a release distribution and click the filename. Save the file to the local path we setup before in ${BASE_SOURCES}. As Example we choose the filename:

    sf-genericinst-020.tgz

# Unpack the distribution.
gzip -d sf-genericinst-020.tgz | tar -xf -

# Now you have a new directory in your path:
cd sf-genericinst

1.3. Get Sourceforge.net Sources from CVS

NOTES: YOU ONLY NEED THIS IN CASE YOU WANT TO TRY THE LATEST CVS VERSION OF SOURCEFORGE THAT IS NOT CONTAINED IN THE sf-genericinst CVS TREE !!!

Get by anonymous CVS the actual source tree of SF. This will create the folder

    alexandria

containing the SourceForge Sources.

cd ${BASE_SOURCES}/sf-genericinst/src
mv alexandria alexandria.bak

#!/bin/sh
echo "When asked type "smoke123" as password !"
echo
echo "arg1 = cvs command = $1"
echo "arg2 = cvs command argument = $2"
echo

cvs -d:pserver:anonymous@webdev.sourceforge.net:/home/cvsroot login

cvs -d:pserver:anonymous@webdev.sourceforge.net:/home/cvsroot checkout alexandria

1.4.  make setup

Before this please review if all variables and pathes are
matching your needs and matching your settings in conf/local.inc.cvs-read.

The most needed path to be created is the sfcache path. Without setup
the main page of the sourceforge.net installation will fail to load !

Please look into

${BASE_SOURCES}/sf-genericinst/scripts/setup.sh
and set all needed things there up. You know you wrote them down above ?

Now we can start the setup to bring the basic things to work:

cd ${BASE_SOURCES}/sf-genericinst

make clean
make config
make setup

This runs the modification script setup.sh. Please follow the steps that are printed by this program.

2. Download all needed Software sources:

# Get the Sources from the internet.

# We archive all binary packages in this path to seperate them from the path we configure and make the packages. As benefit we have them beside our feeds.
cd ${BASE_SOURCES}/sourceforge.net-binaries-archives/archive
 

http://www.engelschall.com/sw/mm/

mm-1.1.3
http://www.php.net/downloads.php
php-4_0_4pl1
http://www.modssl.org/source/
mod_ssl-2.8.0-1.3.17
http://www.openssl.org/
openssl-0.9.6
http://www.postgresql.org/devel-corner/docs/postgres/anoncvs.htm
Get CVS Version of PostgreSQL that we need !

Today that should be 7.1beta1

cvs -d :pserver:anoncvs@postgresql.org:/home/projects/pgsql/cvsroot login
enter 'postgresql' as password when prompted

cvs -z3 -d :pserver:anoncvs@postgresql.org:/home/projects/pgsql/cvsroot co -P pgsql


http://www.apache.org/

apache_1.3.17
http://www.cvshome.org/
ftp://ftp.cvshome.org/pub/cvs-1.11/
cvs-1_11_tar.gz
http://stud.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi/
 http://stud.fh-heilbronn.de/~zeller/download/cvsweb-1.93.tar.gz

cvsweb-1_93_tar.gz

You can get the latest revision always via CVS at
  cvsroot:
         :pserver:anonymous@cvs.stud.fh-heilbronn.de:/cvsroot/public
 Password:
         anonymous
  Module:
         cvsweb

# Perl 5.6.0 at the time of this writing
http://www.cpan.org/src/stable.tar.gz

# For perl CPAN.pm it is recommended to use:
http://www.ncftp.com/ncftp/
ftp://ftp.ncftp.com/ncftp/ncftp-3.0.2-src.tar.gz
 

# ProFtpd
ftp://ftp.proftpd.net/pub/proftpd/proftpd-1.2.0rc2.tar.gz
http://www.proftpd.net/docs/complex-virtual.conf

# GNU Mailman
http://sourceforge.net/projects/mailman
ftp://ftp.gnu.org/gnu/mailman/mailman-2.0.tar.gz
http://download.sourceforge.net/mailman/mailman-2.0.1.tgz

# Python:
http://sourceforge.net/projects/python/
http://download.sourceforge.net/python/Python-2.0.tar.gz

# nss-mysql authentification
# We use this to not have /etc/passwd, /etc/group and /etc/shadow
# files created in a batch process. This is a critical lock situation we
# want to avoid.

http://sourceforge.net/project/showfiles.php?group_id=9050+
nss_mysql-0.22.tar.gz

# Openldap:
http://www.OpenLDAP.org/
ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-2.0.7.tgz

# LDAP Maintaince with PHP4 and LDAPExplorer and PERL with LDAPInterface
http://igloo.its.unimelb.edu.au/LDAPExplorer/
ftp://igloo.its.unimelb.edu.au/pub/LDAPExplorer/LDAPExplorer-1.16.tar.gz
ftp://igloo.its.unimelb.edu.au/pub/LDAPInterface

# If you do not want to use sendmail as MTA:

# Exim
http://sourceforge.net/projects/exim

# Postfix (has database modules)
ftp://ftp3.informatik.uni-bonn.de/pub/software/postfix/index.html
 

3. Unpack all downloaded archive files
 

cd ${BASE_SOURCES}/sourceforge.net-binaries-archives/archive

cp -rf * ${BASE_SOURCES}/sourceforge.net-binaries-needed-software/.

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

gzip -d *.gz

find . -type f -print | grep "tar$" | xargs -n 1 tar -xf

ls -1 | grep "tar$" | xargs -n 1 rm -f

4. Installation:

su - normaluser
cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

4.0 Programming Languages

4.0.1 Perl-5.6.0:

We need Perl for many scripts in the Backendpart. So we install the latest one in our own Base tree. We do NOT install this Perl binary as sitewide perl for this system. We only use it localy in our sourceforge.net Installation path. We do so to not interfere with the default system installation of perl because there can be many special perl modiles be installed we do not want or do not need.

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

cd perl-5.6.0
rm -f config.sh Policy.sh

sh Configure -Dprefix=${PKG}/perl -Uinstallusrbinperl

# Now answer the questions: In this expmple we are on a linux system
# Accept the defaults be pressing <return>
# We only show questions that we will not answer with the default
Q: Use which C compiler= [cc] gcc

# You will be asked several times that an directory doesn't exist and if you want to continue.
# Enter in those situatuins "y" to continue.
Q: Directory /home/system/pkg/sourceforge.net/perl doesn't exist. Use that name anyway? [n] y

Q: Do you want to install perl as /usr/bin/perl? [n] <return>

# type here the contens of ${SF_DOMAIN}
Q: What is you domain name? 8.local] ${SF_DOMAIN}

# type here the contens of ${EMAIL_ADMIN}
Q: What is you e-mail address? [xxx@yyy] ${EMAIL_ADMIN}

# type here the contens of ${EMAIL_ADMIN}
Q: Perl administrator e-mail address [www@rrrr] ${EMAIL_ADMIN}

make depend

make

make test

# You will probably get an error on lfs operation because you have not enough space in your
# filesystem to create a 5 GB file for testing if the big files support is working or not. You can
# ignore this error.

su
<root-password>

make install

# Now you can run our SF perl from
/home/system/pkg/sourceforge.net/perl/bin/perl -V

4.0.1.1. Install NcFTP client

It is possible that this software is not realy needed. You can skip this.

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

cd ncftp-3.0.2

./configure --prefix=${PKG}/ncftp/3.0.2
make

su -
<root-password>

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

cd ncftp-3.0.2

mkdir -p ${PKG}/ncftp/3.0.2

make install
 

4.0.1.2. Configure and install CPAN.pm module

If we are running behind a firewall we can possibly not use the CPAN.pm module to retreive the module extensions. So we must get the extension elsewhere and do then the installation by hand. But if you can arrange to have suiteable internet connection you can do modul installation interactively.

But if you know the URL of your local ftp and http proxies then you can use CPAN.pm.

# Do as root user

${PKG}/perl/bin/perl -MCPAN -e shell

Q: Are you ready for manual configuration? [yes] <return>
Q: CPAN build and cache directory? [/root/.cpan] ${PKG}/perl/.cpan <return>
Q: Cache size for build directory (in MB)? [10] 100 <return>
Q: Perform cache scanning (atstart or never)? [atstart] never <return>
Q: Policy on building prerequisites (follow, ask or ignore)? [follow] ask <retrun>

Now you will be aked for several programs. You can find out on root prompt if those programs are accessible for you. Try

    which gzip

    /usr/bin/gzip

to get the information you need.

Q: Where is your ncftpget program? [] /home/system/pkg/sourceforge.net/ncftp/3.0.2/bin/ncftp <return>

Q: Parameters for the 'perl Makefile.PL' command? [] <return>
Q: Parameters for the 'make' command? [] <return>
Q: Parameters for the 'make install' command? [] <return>
Q: Timeout for inactivity during Makefile.PL;? [0] <return>

# Now we get an real interesting setting to get ftp and http connection to outside if we reside behind a firewall
# If you do have an ftp_proxy and/or http_proxy then enter URL for access to it and hit <return>
# In this example we expect to have direct interent connection and press <return> without entering the ftp
# proxy URL.

Q: Your ftp_proxy? <return>
Q: Your http_proxy? <return>
Q: Your no_proxy? [localhost] <return>

# We are by example in Europe / Germany and want all ftp servers there to contact:
Q: Select your continent (or several nearby continents) [] 5 <return>
Q: Select your country (or several nearby countries) [] 10 <return>
Q: Select as many URLs as you like [] 1 2 3 4 5 6 7 8 9 10
Q: Enter another URL or RETURN to quit: [] <return>

Q: Your favorite WAIT server? [...] <return>

install Bundle::CPAN

Ahh, I see you already have installed libnet before.

Q: Do you want to modify/update your configuration (y|n) ? [no] y <return>
Q: Do you want me to perform hostname lookups (y|n) [yes] <return>

Q: Enter a list of available NNTP hosts : [] news.you-know.com
Q: Enter a list of available SMTP hosts : [] mail.you-know.com
Q: Enter a list of available POP3 hosts : [] pop3.you-know.com
Q: Enter a list of available SNPP hosts : [] <space> <return>
Q: Enter a list of available PH Hosts : [] <space> <return>
Q: Enter a list of available TIME Hosts : [] <space> <return>
Q: Enter a list of available DAYTIME Hosts : [] <space> <return>

# If you are behind a forewall set the apropriate settings:
Q: Do you have a firewall/ftp proxy between your machine and the internet

If you use a SOCKS firewall answer no

(y|n) ? [no] <return>

Q: Should all FTP connections be passive (y|n) ? [no] y <return>

Q: What is you local internet domain name : [] ${SF_DOMAIN}

Q: Do you want me to run these tests (y|n) ? [yes] <return>

Q: What host can I use : [] download.sourceforge.net

At this point I got errors because I choosed ftp Server that did not allow uploads. So I must use this after the stop of installation:

force install Bundle::libnet

install Bundle::CPAN
 

So now we have a complete working CPAN module and we are ready to install other modules !
 

4.0.2 Python-2.0:

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

cd Python-2.0

./configure --prefix=${PKG}/python/2.0
make
make test

su -
<root-password>

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

cd Python-2.0

mkdir -p ${PKG}/python/2.0

make install
 

4.1. PostgreSQL (7.1beta1)

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

mkdir postgresql-7.1beta1-cvs
cd postgresql-7.1beta1-cvs

# get cvs module pgsql from postgresql:
cvs -d :pserver:anoncvs@postgresql.org:/home/projects/pgsql/cvsroot login
enter 'postgresql' as password when prompted

cvs -z3 -d :pserver:anoncvs@postgresql.org:/home/projects/pgsql/cvsroot co -P pgsql

cd pgsql

su -
<root-password>

# user/group setup for postgres should be done by running make setup. If not do this steps.

# test if unix group "daemon" exist
grep daemon /etc/group

# if not create it
groupadd daemon

# delete user postgres in case the Linux distribution has this user defined but postgresql is not installed
userdel -r postgres

# create missing path
mkdir -p ${PKG}/postgres

# create user postgres
               -g daemon -c "Postgres Database Administrator Account" -m -d ${PKG}/postgres/pgsql postgres

passwd postgres
<postgres-password>

exit

su -
<root-password>

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

cd postgresql-7.1beta1-cvs
 

PATH=/home/system/pkg/sourceforge.net/perl/bin:/home/system/pkg/sourceforge.net/python/2.0/bin:${PATH} ./configure --prefix=${PKG}/postgres/7.1beta1 --localstatedir=${VAR} --with-perl --enable-odbc --with-tcl --with-python

gmake
gmake check # => fails, I do not know why !

gmake install

# Add line at end of file
# ${PKG}/postgres/7.1beta1/lib
vi /etc/ld.so.conf
/sbin/ldconfig

# Initialize the ORDBMS
su - postgres
mkdir data
${PKG}/postgres/7.1beta1/bin/initdb -D ${PKG}/postgres/pgsql/data

# You then get the Output:
#Success. You can now start the database server using:
#
#       ${PKG}/postgres/7.1beta1/bin/postmaster -D ${PKG}/postgres/pgsql/data
#or
#        ${PKG}/postgres/7.1beta1/bin/pg_ctl -D ${PKG}/postgres/pgsql/data start

# Start PostgreSQL Server instance
${PKG}/postgres/7.1beta1/bin/pg_ctl -D ${PKG}/postgres/pgsql/data start

# Create test Database and test create table, insert table and select table
${PKG}/postgres/7.1beta1/bin/createdb test
${PKG}/postgres/7.1beta1/bin/psql test

create table test ( first_field int, last_field varchar(20) );
insert into test values ( 10, 'test' );
select * from test;

# Create sourgeforge_net Database
${PKG}/postgres/7.1beta1/bin/createdb sourceforge_net

# Add Startupscript to System startup services

# Edit file ${BASE_SOURCES}/sf-genericinst/etc/init.d/postgres-7.1beta1-suse-7.0 for the SuSe 7.0 Distribution.
# Change the three path variables for H (postmaster), LOGFILE and DATADIR and then install the file under /etc/init.d.
# For Suse you have to install it under /sbin/init.d. We reccommend to add a symbolic link to match the
# path like solaris or RedHat.
#
# You can also set POSTGRES_LOGFILE, POSTGRES_DATADIR, POSTGRES_OPTIONS in /etc/rc.config on SuSe 7.0
# to set the needed environment.
#
# To start the postgres service on Startup do this:
#
# First add link to make SuSe 7.0 more like RedHat ot Solaris
#

cd /etc
ln -s /sbin/ini.d init.d

cd ${BASE_SOURCES}/sf-genericinst/etc/init.d
vi postgres-7.1beta1-suse-7.0

su
<root-password>

cp postgres-7.1beta1-suse-7.0 /etc/init.d/postgres

cd /etc/init.d/rc2.d
ln -s ../postgres S20postgres
ln -s ../postgres K10postgres

cd /etc/init.d/rc3.d
ln -s ../postgres S20postgres
ln -s ../postgres K10postgres

# create log dir for sourceforge.net
mkdir -p ${VAR}/log

# Add or set START_POSTGRES="yes" to /etc/rc.config file for SuSe 7.0 Linux Distribution
#  to activate the start of PostgreSQL on startup.

# Test to start the Database
/etc/init.d/postgres stop
/etc/init.d/postgres start
/etc/init.d/postgres status

cat /home/system/var/sourceforege.net/log/postgres

# Test connection:

su - postgres
<postgres-password>

${PKG}/postgres/7.1beta1/bin/psql test
select * from test;
=>     10   test
\q

# Now the Database should be up and running.

4.1.1. Installing perl5 Pg interface

If not done automatically you can do this:

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd postgres-7.1beta1-cvs/pgsql/src/interfaces/perl5

PATH=${PKG}/perl/bin:${PATH} gmake clean
PATH=${PKG}/perl/bin:${PATH} gmake
PATH=${PKG}/perl/bin:${PATH} gmake install

4.1.1.1 Verify perl5 Pg interface

Not implemented yet.

4.1.2. Installing perl DBI DBD::Pg interface

POSTGRES_INCLUDE=${PKG}/postgres/7.1beta1/include
POSTGRES_LIB=${PKG}/postgres/7.1beta1/lib

export POSTGRES_INCLUDE POSTGRES_LIB

# Now create a user that is capable of testing the DBD module.
# FOR SECURITY REASONS THIS SHOULD NOT BE THE root USER !!!

su - postgres
<postgres-password>

${PKG}/postgres/7.1beta1/bin/createuser <normaluser>

Q: Shall the new user be allowed to create databases? (y/n) y <return>
Q: Shall the new user be allowed to create more new users? (y/n) y <return>

exit

# Begin installation of DBD::Pg

su -
<root-password>

${PKG}/perl/bin/perl -MCPAN -e shell

cpan> m /Pg/

We choose

cpan> install Bundle::DBI

# Here we got error with the DBD::Proxy and DBI::ProxyServer modules.
# But we don't want to use DBD::Proxy so we ignore this errors.

cpan> install DBD::Pg

# Here we got error that the test for DBD::Pg is failing.
# Because of this we test and install the DBD::Pg module by hand

cpan> q

su - normaluser
<normaluser-password>

cd ${PKG}/perl/.cpan/build/DBD-Pg-0.95

make test

# This should do fine without errors

exit

su -
<root-passsword>

cd ${PKG}/perl/.cpan/build/DBD-Pg-0.95

make install

exit

su - normaluser
<normaluser-password>

${PKG}/perl/bin/perl ${PKG}/perl/.cpan/build/DBD-Pg-0.95/test.pl

# This should also give no error.

# If so we have a working DBD::Pg module !!!
 

4.1.2.1. Verify the Perl DBI DBD::Pg connection

su - normaluser
<normaluser-password>

# This user should have the permission to connect to the Pg Database (see 4.1.2. Installing Perl DBI DBD::Pg Module)

cd sf-genericinst

./scripts/test.db.pg.perl.dbi.dbd.pg.pl.sh
 

4.1.3. Installing Python interface

If not done automatically you can do this:

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd postgres-7.1beta1-cvs/pgsql/src/interfaces/python

PATH=${PKG}/python/bin:${PATH} gmake clean
PATH=${PKG}/python/bin:${PATH} gmake
PATH=${PKG}/python/bin:${PATH} gmake install

4.1.3.1. Verify the Python DB connection

su - normaluser
<normaluser-password>

# This user should have the permission to connect to the Pg Database (see 4.1.2. Installing Perl DBI DBD::Pg Module)

cd sf-genericinst

./scripts/test.db.pg.py.sh

5. Install tool libraries needed for varius packages

5.1. OpenSSL

# please read description in mod_ssl/INSTALL file why we are doing like this

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

$ cd openssl-0.9.6
$ sh config no-idea -fPIC --prefix=${PKG}/openssl/0.9.6
$ make
$ make test
$ su -
<root-password>
$ make install
$ exit
$ cd ..

5.2. MM

# please read description howto in mod_ssl/INSTALL file why we are doing like this

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

$ cd mm-1.1.3
$ ./configure --disable-shared --prefix=${PKG}/mm/1.1.3
$ make
$ make test
$ su -
<root-password>
$ make install
$ exit
$ cd ..

5.3. Install OpenLDAP

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd openldap-2.0.7

./configure --prefix=${PKG}/openldap/2.0.7

make depend
make
make test

su -
<root-password>

make install

5.3.1. Config and start new LDAP server

Then you have to shut down existing LDAP Servers and install the init.d script for automatic startup on boot time:

/etc/init.d/ldap stop

Now we install the sourceforge.schema for LDAP and the slapd.conf file and the new /etc/init.d/ldap startup file:

cd ${PKG}/openldap/2.0.7/etc/openldap
mv slapd.conf slapd.conf.orig

cp ${BASE_SOURCE}/sf-genericinst/conf/config.openldap-2.0.7.slapd.conf ${PKG}/openldap/2.0.7/etc/openldap/slapd.conf

cp ${BASE_SOURCE}/sf-genericinst/conf/config.ldap.sf-genericinst.schema

cp ${BASE_SOURCE}/sf-genericinst/etcv/init.d/ldap-2.0.7-suse-7.0 /etc/init.d/ldap

On SuSe Linux 7.0 you must set the variable:

START_LDAP="yes"

in the /etc/rc.config file so your LDAP server gets started on bootup of the system.

Restart the new LDAP server:

/etc/init.d/ldap start
 
 

5.3.2. Test the new LDAP server by creating the initial LDAP Directory

cd ${BASE_SOURCES}
cd sf-genericinst/scripts/test/openldap
 

./test.sf.ldap.sh

This sould create the LDAP Directory.

/etc/init.d/ldap stop
/etc/init.d/ldap start

Restart the LDAP Service

./scripts/serach

Should output the initial LDAP Directory.
 

6. WebSite relatet installations
 

6.1. Apache

# First create a seperate user the sourceforege.net Apache server will run as:

su -
<root-password>

groupadd ${APACHE_GROUP}
useradd -g ${APACHE_GROUP} -c "Sourceforge.net Apache Process Owner" -m -d ${PKG}/apache ${APACHE_USER}

passwd sf-apache
<sf-apache-password>

exit

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

# Install the layout sourceforge.net from the conf directory:

$ cd apache-1.3.17
$ mv config.layout config.layout.orig
$ cp ${BASE_SOURCES}/sf-genericinst/conf/config.layout.apache.1.3.17 config.layout

# Or add this layout to the conf.layout file

##
##  config.layout -- APACI Pre-defined Installation Path Layouts
##
##  Hints:
##  - layouts can be loaded with APACI's --with-layout=ID option
##  - when no --with-layout option is given, the default layout is `Apache'
##  - a trailing plus character (`+') on paths is replaced with a 
##    `/' suffix where  is the the argument from 
##    option --target (defaults to `httpd').
##

#   Classical Apache path layout.
# F.S.: 21.02.2001, Installationlayout for sourceforge.net

    prefix:        ${PKG}/apache
    exec_prefix:   $prefix/1.3.17
    bindir:        $exec_prefix/bin
    sbindir:       $exec_prefix/sbin
    libexecdir:    $exec_prefix/libexec
    mandir:        $prefix/man
    sysconfdir:    $prefix/conf
    datadir:       $prefix/share
    iconsdir:      $datadir/icons
    htdocsdir:     $datadir/htdocs
    cgidir:        $datadir/cgi-bin
    includedir:    $prefix/include
    localstatedir: ${VAR}/apache
    runtimedir:    $localstatedir/run
    logfiledir:    $localstatedir/logs
    proxycachedir: $localstatedir/proxy
Now move to mod_ssl.

6.2. mod_ssl

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software

cd mod_ssl-2.8.0-1.3.17
less INSTALL

Führe alle in diesem Dokument aufgeführten Arbeiten aus !

Auf unserem System befanden sich folgende Versionen:

perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:

gzip --version
gzip 1.2.4 (18 Aug 93)
Compilation options:
DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H ASMV

# Applying the mod_ssl source patches to Apache
./configure --with-apache=${BASE_SOURCES}/system/sourceforge.net-binaries-needed-software/apache-1.3.17

# reconfigure Apache
cd ${BASE_SOURCES}/system/sourceforge.net-binaries-needed-software/apache-1.3.17

SSL_BASE=${PKG}/openssl/0.9.6 EAPI_MM=${PKG}/mm/1.1.3 ./configure --with-layout=sourceforge.net --enable-module=all --enable-shared=max --server-uid=sf-apache --server-gid=sf-apache --enable-module=ssl --enable-shared=ssl --enable-rule=SSL_SDBM --enable-rule=EAPI

make

We only create a test certificate. After we decide to go productive we will get a real certificate !

Answer the questions with RETURN to get the defaults. On STEP 2, 6. Common Name please fill the domainname in under which the sourceforge system will run. It is not harmfull to leave the default, but you will see an Waring in the mod_ssl engine logs that the domainname does not match the certificate name.

# Enter as PEM Pathphrase: TEST

make cretificate TYPE=test ALGO=RSA

make install
 

6.3. PHP 4

We use a target subdirectorys to build the PHP apache module and the standalone PHP binary. This will work with GNU make, which all Linux systems have. Please install GNU make on other systems if you don't have it.

# Change to root because as normaluser we can not read the apache directorys
su -
<root-password>

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd php-4.0.4pl1

# create the target directorys for apache module and standalone binary:
mkdir _apxs
mkdir _cgi

6.3.1. make/install Apache module version of PHP

Please note: DO NOT USE   --with-openssl=${PKG}/openssl/0.9.6

If I used this for PHP the apache webserver craches when accessing by ssl. The browse gives an Error message about security problems or network problems. In the mod_ssl logfiles is an entry about the browser uses an old pice of an encrypted certificate or uses an false en/decryption algorithm. Only after I recompile and install PHP without this option all is fine !!!
 

cd _apxs

../configure --prefix=${PKG}/php/4.0.4pl1 --with-apxs=${PKG}/apache/1.3.17/sbin/apxs --with-pgsql=${PKG}/postgres/7.1beta1 --enable-track-vars --enable-discard-path --with-config-file-path=${PKG}/apache/conf --with-ldap=${PKG}/openldap/2.0.7 --enable-rule=EAPI

make
make install

# Add lib pathes of openssl and openldap to system /etc/ld.so.conf
echo "${PKG}/openssl/0.9.6/lib" >> /etc/ld.so.conf
echo "${PKG}/openldap/2.0.7/lib" >> /etc/ld.so.conf

ldconfig

cp php.ini-dist ${PKG}/apache/conf/php.init

# Add PHP4 Parsing to httpd.conf
# Outcomment PHP Parsing or add lines below:
#
# AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
#
vi ${PKG}/apache/conf/httpd.conf

# Restart Apache Servef
${PKG}/apache/1.3.17/sbin/apachectl stop
${PKG}/apache/1.3.17/sbin/apachectl start

# Add test PHP4 Script for testing
echo "<? phpinfo(); ?>" >> ${PKG}/apache/share/htdocs/test_php4.php

# Browse to this url and you should see PHP4 informations !
http://localhost/test_php4.php

6.3.2. make/install standalone PHP binary

From Paul D. Smith and a little bit modified:

All the cron jobs in the sourceforge cronjobs directory are written in
php, so you need to build a standalone PHP to use them. As far as
we know at least some of them do important things (for example,
cronjobs/db_project_sums.php is the thing which updates the
counts of bugs, mailing lists, etc. that are displayed on the project
homepages; without running this these will always be 0).

cd _cgi

../configure --prefix=${PKG}/php/4.0.4pl1 --with-pgsql=${PKG}/postgres/7.1beta1 --enable-track-vars --enable-discard-path --with-config-file-path=${PKG}/apache/conf --with-ldap=${PKG}/openldap/2.0.7 --enable-rule=EAPI
 

make

cp php ${PKG}/php/4.0.4pl1/bin

That should do it.

6.3.3. Test PHP script:

echo "#!${PKG}/php/4.0.4pl1/bin/php" > test.php
echo "<?php> phpinfo(); <php?>" >> test.php

./test.php

Now you should get the PHP info output.

6.4. Apache SSL config and test:

cp ${BASE_SOURCES}/sf-genericinst/conf/httpd.conf.ssl.apache.1.3.14 ${PKG}/apache/conf/httpd.conf
${PKG}/apache/1.3.14/sbin/apachectl stop
${PKG}/apache/1.3.14/sbin/apachectl startssl

<certificate-passphrase>

Type "TEST"

https://localhost:8443/test_php4.php

Answer all questions with yes.
 

7. Sourceforge.net Installation: WebSite
 

7.1. Configure the Apache httpd.conf

Comment: DO NOT use different ports than 80 (http) and 443 (https) because this is today hardcoded in the code of sourceforge !!!

Copy our httpd.conf to apache installation:

cp ${BASE_SOURCES}/sf-genericinst/conf/httpd.conf.ssl.apache.1.3.14 ${PKG}/apache/conf/httpd.conf
 

7.2. Install php.ini file:

cd ${BASE_SOURCE}/sf-genericinst/conf
cp php.ini.php.4.0.3pl1 ${PKG}/apache/conf/php.ini
 

7.3. Install DNS-Server zone Files

At this time we don't have seperate DNS-Server zonefiles. Actually we put this into the /etc/hosts file to get an initial sourceforge Setup running. Please modify it to contain all Addresses you need from you original /etc/hosts file.

cd ${BASE_SOURCE}/sf-genericinst/conf
cp hosts.sourceforge.net.cvs-read /etc/hosts
 

7.4. Restart the apache Server

${PKG}/apache/1.3.17/sbin/apachectl stop
${PKG}/apache/1.3.17/sbin/apachectl startssl
<enter SSL passphrase>

7.5. Install SF  database structure and default values:

We are now installing the database tables for Sourceforge.net into the Database. We also try to create a database user named "stats". If this user already exists you will find an ERROR in the ERROR log. You can ignore this ERROR.

To go further you need to verify this conditions:

1. Stop the Apache server wich holds open connections to the prostgres database server

${PKG}/apache/1.3.17/sbin/apachectl stop
2. stop all other programs with open connections to the postgres database because otherwise we get in serius trouble. As we drop the SF database and recreate a fresh and clean database we get stuck if there has any program a connection to the database currently open.

QUIT ALL CONNECTIONS TO THE DATABASE !!!!

If you do not, you will get a huge logfile filling up the complete space left on your harddrive.

su -
<root-password>

cd ${BASE_SOURCE}/sf-genericinst

Today (16.02.2001) I have fixed all Database ERRORS that where left in the last version.
Today (20.02.2001) I have added all changes for CVS Update from 19.02.2001 and now I have an ERROR back creating an existing user "stats". I think you can ignore this ERROR.
Today (01.03.2001) I added the fix for None group and the fix for the sequences. Now I create admin and none user and admin, news, stats, none groups automatically.

YOU MUST DO AN UPDATE OF THE alexandria CVS SOURCES BEFORE RUNNING THIS WITHOUT ERRORS !!! AND YOU MUST DO AN

make clean
make config
make setup
to get the fresh database.

If  the script encounters database errors you will see on stdout and in the logfile an error summary about that. In this 1.3 version you only see this error summary if an error is encountered.

You see lines like this:

# === ./fill_db.sh V : 1.5 $ === START AT Mon Feb 19 16:13:55 CET 2001 ===

Start SF Database initial setup:

# === SF admin default user configuration ===========
#
# We create a first user with sitewide admin rights
# with the login information:
#
#       user:   admin
#       pass:   admin1
#
# Login with this information and change at first the
# password of this admin account because it is the
# SUPER system account.
#
#====================================================

Setting up the sourceforge_net with all tables and default values ...
Drop the Database =sourceforge_net= ...
Create the Database =sourceforge_net= ...
Fixing \connect tperdue and change to \connect postgres ...
Creating the tables and default values ...
-- DOING: db file =SourceForge.sql= ...
-- DOING: db file =language.sql= ...
-- DOING: db file =sqlchanges20010219.sql= ...
        create tables activity_log_old and activity_log_old_old from the definition of table activity_log
-- DOING: db file =artifact-man.sql= ...
-- DOING: db file =DefaultValues.sql= ...
-- DOING: ADMIN user setup ...
                Get intended language
                Insert SF Sitewide ADMIN user account
                Create first admin group
                Give SF Sitewide ADMIN user account admin rights in admin group that is the first group
-- DOING: db file =artifact-fkeys.sql= ...
-- DOING: db file =trove_defaults.sql= ...
-- DOING: db file =themes.sql= ...
-- DOING: db file =sfdocs.sql= ...
-- DOING: db file =sqlchanges20001220.sql= ...
-- DOING: db file =sqlchanges20010109.sql= ...
-- DOING: db file =sqlchanges20010112.sql= ...
-- DOING: db file =sqlchanges20010126.sql= ...
-- DOING: db file =sqlchanges20010206.sql= ...
Database setup finished !

-- ERROR SUMMARY: START
-- DOING: db file =SourceForge.sql= ...
-- DOING: db file =language.sql= ...
-- DOING: db file =sqlchanges20010219.sql= ...
ERROR:  CREATE USER: user name "stats" already exists
-- DOING: db file =artifact-man.sql= ...
-- DOING: db file =DefaultValues.sql= ...
-- DOING: ADMIN user setup ...
-- DOING: db file =artifact-fkeys.sql= ...
-- DOING: db file =trove_defaults.sql= ...
-- DOING: db file =themes.sql= ...
-- DOING: db file =sfdocs.sql= ...
-- DOING: db file =sqlchanges20001220.sql= ...
-- DOING: db file =sqlchanges20010109.sql= ...
-- DOING: db file =sqlchanges20010112.sql= ...
-- DOING: db file =sqlchanges20010126.sql= ...
-- DOING: db file =sqlchanges20010206.sql= ...
-- ERROR SUMMARY: STOP

# === ./fill_db.sh === STOP AT Mon Feb 19 16:15:05 CET 2001 ===

And by running this it will create a log right beside the script file itself.

cat ./scripts/setup/fill_db.sh.log

Restart the apache server again:

${PKG}/apache/1.3.17/sbin/apachectl startssl

7.6. Test Access the website:

http://sourceforge.sofa.arxes.de/

You should now be able to login as super user with

    user: admin
    pass: admin1

and this user has SUPER USER rights.

Please change the password of this account imedeately !

7.6.1. Upgrade a Database

If you have a database for SF running you are on your own. I have not performed any upgrade of an existing database version. You should look into the

./alaxandria/db
folder and look for newer sqlchangesyyymmdd.sql files.

And at any time do an update of the SF alexandria sources from CVS !

7.7. Register a new user

7.8. Answer the registration confirmation E-Mail

7.9. Setup Site admin privilages for the first user:

If you need more SYSADMINS you cann add the Admin rights to users like this:

${PKG}/postgres/7.1beta1/bin/psql sourceforge_net postgres

Determin the admin_id
> select user_id from users;

Setup Sitewide admin rights for first user
> insert into user_group (user_id, group_id, admin_flags) values (<admin_id>, 1, 'A');

Or follow this documentation:

                      By: cbayle ( Christian BAYLE )
                      RE: SF2.5 admin account, no admin privelages. [ reply ]
                     2001-Jan-02 02:11
                     First you have to find in the database
                     What is your id
                     then
                     insert into user_group (user_id, group_id, admin_flags) values (<admin_id>, 1, 'A')
                     admin_id depends on the
                     CREATE SEQUENCE "users_pk_seq" start 1
                     that you can find in db/SourceForge.sql and
                     when you created admin user

                     Hope this helps you

7.10. Setup $sys_news_group in /etc/local.inc to get a Sitewide NEWS Project running

On a SourceForge Site there is one MAIN NEWS project / group for Sitewide news. In setting up your own SF you should create one first group/project that will be your MAIN Sitewide Project (on the original sourceforge.net site the alexandria group is that one). And you should setup a second initial Project/Group to be the Sitewide NEWS group.  Get the group_id from the Database of this group and set the $sys_news_group in /etc/local.inc to that group_id.

Probably I will add the automatic setup of the Sitewide NEWS Project/Group to the fill_db.sh script so this is nothing someone should be worring about.
 

                 BY: bigdisk
                 DATE: 2001-Feb-07 08:27
                 SUBJECT: RE: Helpful hint to avoid pitfall/gotcha

                 There is no doc on this - but there should be. You basically need to register a new group, get that group_id, and then set your /etc/local.inc $sys_news_group var to that group_id.

                                By: bepear02 ( Brian Pearson )
                                 RE: Helpful hint to avoid pitfall/gotcha [ reply ]
                                2001-Feb-07 09:22
                                Which is exactly what I did.

                                Just wanted to make certain that there wasn't a specific group_id value expected by other parts of the SF code, as is the case for group_id 1.
 

# ============================

8. Sourceforge.net Installation: Backend

8.1. CVS Server:

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd cvs-1.11

8.1.1. Apply needed CVSRoot patch

This will modify to src/root.c file to have a regexp test if the CVS Root directorys is allowed or not. You will find the original files unter src/root.c.orig.

cd src

cp root.c root.c.orig.cvs-1.11

cat ${BASE_SOURCES}/sf-genericinst/patches/cvs_patch.diff | patch -p1

8.1.2. Build CVS

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd cvs-1.11

./configure --prefix=${PKG}/cvs/1.11

make

su
<root-password>

make install
 

8.1.3. Configure CVS

su -
<root-password>

grouadd cvsadmin

Add this line to /etc/ined.conf or modify it or outcomment it:
 

cvspserver  stream  tcp nowait  root    /usr/sbin/tcpd  ${PKG}/cvs/1.11/bin/cvs --allow-root=${VAR}/cvs pserver


Restart inted by identifying the PID of the inted dameon and sending it the -HUP siganl:

ps -ax | grep inetd
kill -HUP <inetd-pid>
 

FS: 14.02.2001, we got this information about pserver and version 1.11

Betrifft:
       [alexandria - SF Offsite Talk] RE: Next: anon pserver
 Datum:
       Wed, 14 Feb 2001 11:44:17 -0800
   Von:
       nobody <nobody@sourceforge.net>
    An:
       noreply@sourceforge.net
 
 
 

Read and respond to this message at:
http://sourceforge.net/forum/message.php?msg_id=110040
By: psmith

OK, I figured it out; I used strace to look at what

the cvs command that inetd was starting was doing.
 

For some reason you must provide the -f flag on

the cvs invocation line in 1.11, while you don't need

to in 1.10.8.  I was using exactly the same command

line, except substituting the cvs command from 1.11

and 1.10.8, and the former failed while the latter worked.
 

The strace revealed that 1.11 was trying to access the

.cvsrc file, while 1.10.8 wasn't, so I added -f and now

1.11 works as well.
 

Weird, but I hope it helps someone else.

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge and visit:
http://sourceforge.net/forum/monitor.php?forum_id=21304

# ================================

Betrifft:
       [alexandria - SF Offsite Talk] right fix (was: RE: Next: anon pserver)
 Datum:
       Fri, 16 Feb 2001 18:54:48 -0800
   Von:
       nobody <nobody@sourceforge.net>
    An:
       noreply@sourceforge.net
 
 
 

Read and respond to this message at:
http://sourceforge.net/forum/message.php?msg_id=111210
By: psmith

OK, I _really_ figured it out this time.  The -f won't solve

the problem I was having (although it is a very slight

efficiency improvement: it saves at least one system

call in 1.11, which is evident from the strace output).
 

However, I was mistaken that this actually fixed my

problem: some fat-fingerage.
 

I did a real debug session and found the real problem: the

patch we are using to allow --allow-root to use subdirs is

too aggressive: it breaks --allow-root with normal dirs.

If you apply it and try to access a CVSROOT in the same

directory as specified by --allow-root, it fails; the patch

_requires_ that you specify a directory above that.  That

seems broken to me, and definitely screwed up my

installation, so I changed it.  I'll upload a replacement

patch to the alexandria web site for those that want it.
 
 

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge and visit:
http://sourceforge.net/forum/monitor.php?forum_id=21304
 
 

# Setup CVS and set permissions

CVSROOT=${VAR}/cvs
export CVSROOT

${PKG}/cvs/1.11/bin/cvs init

chgrp ${PROJECTS_GROUP} ${PKG}/cvs
chmod g+w ${PKG}/cvs
 

8.2. CVSWeb

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd cvsweb

8.2.1. Apply needed patch to CVSWeb

This will modify file cvsweb.cgi to work with the projects CVS root directorys.

cp cvsweb.cgi cvsweb.cgi.orig.1.93

cat ${BASE_SOURCES}/sf-genericinst/patches/cvsweb_patch.diff | patch

8.2.2. Configure and Install CVSWeb

su -
<root-password>

# Install cgi script
cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd cvsweb

cp cvsweb.cgi ${PKG}/apache/share/cgi-bin/.
chown ${APACHE_USER}:${APACHE_GROUP} ${PKG}/apache/share/cgi-bin/cvsweb.cgi
chmod u+x,g=,o=  ${PKG}/apache/share/cgi-bin/cvsweb.cgi

# Install configuration file
cd ${BASE_SOURCES}/sf-genericinst
cd conf

cp cvsweb.conf.1.93 ${PKG}/apache/conf/cvsweb.conf

8.2.3. Setup annotate: Why not ?

The annotate function/program needs the right to write to CVSROOT/history and wants to save a lock-File.

cvs-1.11 is spoken about to have a LockDir option to have all lock-files in only ONE place outsite the repository. But we can't find out how to set/use this option.

8.2.4. CVSWeb Open todo:

Download is not working because the cvsweb.cgi has no writepermissions in the CVSROOT directory.
 

8.3. ProFtpd Installation

8.3.1. Introduction

SourceForge need a ftp server to handle the file releases. As for the genuine SF, we are going to use proftpd. Basically, we need to create an incoming directory and an anonymous ftp space for each project. At this time, we only support the ftp incoming directory.

8.3.2. Making

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd proftpd-1.2.0rc2

su -
<root-password>

groupadd ${FTP_GROUP_RUN}
groupadd ${FTP_GROUP}

useradd -m -d ${PKG}/proftpd -g ${FTP_GROUP_RUN} ${FTP_USER_RUN}

# If should not be needed to create the ${FTP_USER} because this is always created by normal Unix distributions. But please check !
#
# useradd -d ${VAR}/lib/${FTP_USER} -g ${FTP_GROUP} ${FTP_USER}

CFLAGS="-I/home/system/pkg/sourceforge.net/postgres/7.1beta1/include -I/home/system/pkg/sourceforge.net/postgres/7.1beta1/lib" install_user=sf-proftpd install_group=sf-proftpd ./configure --prefix=/home/system/pkg/sourceforge.net/proftpd/1.2.0rc2 --sysconfdir=/home/system/pkg/sourceforge.net/proftpd/etc --localstatedir=/home/system/var/sourceforge.net/log/proftpd --with-modules=mod_ldap:mod_linuxprivs:mod_pgsql:mod_quota:mod_ratio --enable-autoshadow
 

make

make install

8.3.3. Configure ProFtpd

1. Outcomment line/s with "ftp" at first charachters in /etc/inetd.conf to disable distribution ftp server. If in the used unix distribution the ftp service is not started by inetd but started standalone you have to disable the startup of this ftp server deamon.

Restart now the inetd deamon with the changed config file.

ps -ax | grep inetd

kill -HUP <inetd-pid>

2. Install the sourceforge.net configuration file:

cd ${PKG}/proftpd/etc
mv proftpd.conf proftpd.conf.orig

cp ${BASE_SOURCE}/sf-genericinst/conf/proftpd.conf.proftpd.1.2.0rc2 proftpd.conf

chown ${FTP_USER_RUN}:${FTP_GROUP_RUN} proftpd.conf

mkdir -p ${VAR}/ftp/incoming
chown -R ${FTP_USER_RUN}:${FTP_GROUP_RUN} ${VAR}/ftp
chmod u+rwx,g+rwx ${VAR}/ftp/incoming

3. Setup welcome.msg and .message

echo "Welcome to the ftp server for domain ${DOMAIN}" >> ${VAR}/ftp/welcome.msg
echo "Please note: only READ access !" >> ${VAR}/ftp/.message
echo "Please note: file WRITE access activated. Issue the command passive before uploading files !" >> ${VAR}/ftp/incoming/.message

chown ${FTP_USER_RUN}:${FTP_GROUP_RUN} ${VAR}/ftp/welcome.msg ${VAR}/ftp/.message ${VAR}/ftp/incoming/.message

4. Install the startupfile

cd /etc/init.d

cp ${BASE_SOURCE}/sf-genericinst/etc/init.d/proftpd.1.2.0rc2 proftpd

cd /etc/init.d/rc2.d
ln -s ../proftpd S20proftpd
ln -s ../proftpd K10proftpd

cd /etc/init.d/rc3.d
ln -s ../proftpd S20proftpd
ln -s ../proftpd K10proftpd

5. Activate the proftpd for SuSe Linux 7.0

Add lines to /etc/rc.config to include the Startup of Proftpd:

echo "#" >> /etc/rc.config
echo "# Should the proftpd Server be started at startup ?" >> /etc/rc.config
echo "#" >> /etc/rc.config
echo "START_PROFTPD=\"yes\"" >> /etc/rc.config

But check before if this is already in there.

6. Start the ProFtpd Service

/etc/init.d/proftpd start

7. Test the connection

ftp localhost
<username>
<pass>

should work.

ftp localhost
anonymous
<your@email>

should bring you in the anonymous account.

cd incoming
passive
put filename

should work in incoming folder.
 
 

8.4. Install Mailman

su -
<root-password>

# create mailman user/group
groupadd ${MAILMAN_GROUP}

useradd -m -g ${MAILMAN_GROUP} -d ${PKG}/mailman ${MAILMAN_USER}

8.4.1. setup directorys and permissions

This is absolutly needed. And it is absolutly needed that you do this very carefull.

mkdir -p ${PKG}/mailman/2.0.1
cd ${PKG}/mailman/2.0.1
chgrp ${MAILMAN_GROUP} .
chmod a+rx,g+ws .

mkdir -p ${VAR}/mailman
cd ${VAR}/mailman
chgrp ${MAILMAN_GROUP} .
chmod a+rx,g+ws .

8.4.2. Find out the DefaultUser the sendmail MTA runs wrapper programs

find /etc -type f -print | grep sendmail.cf

> /etc/sendmail.cf     # for my system

grep -i defaultuser /etc/sendmail.cf

> O DefaultUser=daemon:daemon

# Because of this finding we set --with-mail-gid=daemon

8.4.3. Making

su - normaluser

cd ${BASE_SOURCES}/sourceforge.net-binaries-needed-software
cd mailman-2.0.1

./configure --prefix=${PKG}/mailman/2.0.1 --localstatedir=${VAR}/mailman --with-username=${MAILMAN_USER} --with-groupname=${MAILMAN_GROUP} --with-python=${PKG}/python/2.0/bin/python --with-var-prefix=${VAR}/mailman --with-mail-gid=daemon --with-cgi-gid=${APACHE_GROUP}

make depend
make
make test

su -
<root-password>

make install

>> We get an error from the template folder that it can not move the *.html and *.txt files to *.html.prev and *.txt .prev

8.4.4. Test Installation

cd ${PKG}/mailman/2.0.1

./bin/check_perms

> no problems found => OK !

8.4.5. Setup Apache config:

Add or change the ScriptAlias for the lists virtual server:

ScriptAlias /mailman/ ${PKG}/mailman/2.0.1/cgi-bin/
Copy the mailman images to the Apache global images folder:
cp  ${PKG}/mailman/2.0.1/icons/* ${PKG}/apache/share/icons/.
Add Alias and Directory entrys in apache httpd.conf
Alias /pipermail/ ${VAR}/mailman/archives/public/

<Directory ${VAR}/mailman/archives/public>

AllowOverride None
Options FollowSymLinks
Order allow,deny
Allow from all
</Directory
<Directory ${PKG}/mailman/2.0.1/cgi-bin>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Restart Apache Server:
${PKG}/apache/1.3.14/sbin/apachectl startssl
<certificate-passphrase>
8.4.6. Setup mailman crontab

su - ${MAILMAN_USER}
<password>

cd ${PKG}/mailman/2.0.1/cron
crontab crontab.in

8.4.7. Setup system aliases in sendmail

su -
<root-password>

echo "#" >> /etc/aliases
echo "# === START === Mailman 2.0.1 System aliases" >> /etc/aliases
echo "#" >> /etc/aliases
echo "mailman: ${ADMIN_EMAIL}" >> /etc/aliases
echo "mailman-owner: mailman" >> /etc/aliases
echo "#" >> /etc/aliases
echo "sf-mailman: mailman" >> /etc/aliases
echo "#" >> /etc/aliases
echo "# === END === Mailman 2.0.1 System aliases" >> /etc/aliases

newaliases

ps -ax | grep sendmail

kill -HUP sendmail-pid

8.4.8. Set Default Mailman values

echo "DEFAULT_HOST_NAME=lists.sofa.arxes.de" >> ${PKG}/mailman/2.0.1/Mailman/mm_cfg.py
echo "DEFAULT_URL="http://lists.sofa.arxes.de/mailman" >> ${PKG}/mailman/2.0.1/Mailman/mm_cfg.py

8.4.9. Set site password

${PKG}/mailman/2.0.1/bin/mmsitepass <mailman-password>

For testing we choose: TEST
 

8.5. Backend changes:

# Create user that holds the dummy dump files we work with
groupadd sf-dummy
useradd -m -g sf-dummy -d ${VAR}/dummy sf-dummy

8.6. How to setup Mailman Archives in Pipermail for SF:

Betrifft:
       [alexandria - SF Offsite Talk] RE: geocrawler
 Datum:
       Mon, 19 Feb 2001 22:20:49 -0800
   Von:
       nobody <nobody@sourceforge.net>
    An:
       noreply@sourceforge.net
 
 
 

Read and respond to this message at:
http://sourceforge.net/forum/message.php?msg_id=112459
By: psmith

I just fixed this up yesterday.  It's not hard (except, as

always with SourceForge, to find it in the first place :).

Mailman comes with its own archive capability, called

pipermail.  This is a limited capability in that it has _no_

search engine at all.  Other than that it's pretty nice; it

archives by month and lets you view by thread, subject,

author, or date, or download the raw mail text file.
 

If you want to get fancier, Mailman is supposed to integrate

nicely with mhonarc but I've not tried that.
 

Anyway, to get rid of the geocrawler stuff you need to do

two things:
 

First, in the utils/mailing_list_create.pl script (anyway, this

is the script I use in cron to set up my mailing lists) near

the bottom, comment out the last two system() commands

that deal with geocrawler (this keeps you from adding a

geocrawler archiver to your mailing list, and from trying

to set up a new list on geocrawler itself).
 

Second, in www/mail/index.php, change the URL constructor

for the archive to use pipermail instead of geocrawler; I

changed this line:
 

  echo '<A HREF="http://www.geocrawler.com/redir-sf.php3?list='.
 

to this:
 

  echo '<A HREF="http://'.$sys_lists_host.'/pipermail/'.
 

(where $sys_lists_host is defined in your /etc/local.inc to be

your email server).
 
 

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge and visit:
http://sourceforge.net/forum/monitor.php?forum_id=21304
 

9. Sendmail:

9.1. Basic alias file

Some alias are predefined on Sourceforge, you can find them in SF_ROOT/backend/zones/aliases.zone. This file is a good start to make your own alias file.
 

TODO:

- Add relocatable patches to the SF website code like kevin_koch does:

Betrifft:
       [alexandria - SF Offsite Talk] How we solved navbar issues
 Datum:
       Wed, 07 Feb 2001 12:52:12 -0800
   Von:
       nobody <nobody@sourceforge.net>
    An:
       noreply@sourceforge.net
 
 
 

Read and respond to this message at:
http://sourceforge.net/forum/message.php?msg_id=106727
By: kevin_koch

What we did in /etc/sourceforge.inc was define
 

$sys_sf_path_root="/home/httpd/html/sourceforge";

$sys_sf_html_root="/sourceforge/";
 

and use these variables wherever a hardcoded path used to be.

- Add LDAP COnfiguration HowTo

Betrifft:
       [alexandria - SF Offsite Talk] RE: SF 2.5 - LDAP schema elements
 Datum:
       Thu, 08 Feb 2001 01:40:29 -0800
   Von:
       nobody <nobody@sourceforge.net>
    An:
       noreply@sourceforge.net
 
 
 

Read and respond to this message at:
http://sourceforge.net/forum/message.php?msg_id=106961
By: osvaldsson

I made the following in /usr/local/etc/openldap/schema/sourceforge.schema

Wich I then included in the slapd.conf
 

# Sourceforge Project's directory schema items

# by Olafur Osvaldsson (osvaldsson@users.sourceforge.net)

#

# depends upon:

#       core.schema

#       cosine.schema

#       inetorgperson.schema

#       nis.schema

#

attributetype ( 1.1.2.2.2 NAME 'x-cvsShell'

        DESC 'The path to the CVS login shell'

        EQUALITY caseExactIA5Match

        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 

objectclass ( 1.1.2.2.1 NAME 'x-sourceforgeAccount' SUP posixAccount

        DESC 'Abstraction of a Sourceforge account'

        MAY ( x-cvsShell ) )
 

# ===

Betrifft:
       [alexandria - SF Offsite Talk] RE: projects not being associated with troves
 Datum:
       Thu, 15 Feb 2001 17:23:33 -0800
   Von:
       nobody <nobody@sourceforge.net>
    An:
       noreply@sourceforge.net
 
 
 

Read and respond to this message at:
http://sourceforge.net/forum/message.php?msg_id=110722
By: mogul

Awesome timing... I was just about to start debugging this.  I'm noticing that
there are similar problems where scripts assume there is already a LOT of live
data... For example rotate_activity.php assumes that you already have
activity_log_old and activity_log_old_old; if you don't the rotation transaction
is cancelled.  Watch out for that!  I'll be submitting a couple other minor
patches soon.

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge and visit:
http://sourceforge.net/forum/monitor.php?forum_id=21304
 

# ===
 
 

- Setup DNS-Server to work with autogenerated zonefiles. Setup DNS-Server for sofa.arxes.de

- Setup the backend cronjobs to do their jobs

- Setup sendmail backend

- Paul Legatos PATCH tp get SF running

Betrifft:
       [alexandria - SF Offsite Talk] RE: SF 2.5 cron
 Datum:
       Mon, 19 Feb 2001 15:53:33 -0800
   Von:
       nobody <nobody@sourceforge.net>
    An:
       noreply@sourceforge.net
 
 
 

Read and respond to this message at:
http://sourceforge.net/forum/message.php?msg_id=112369
By: pjlegato

Hi,

I've spent the last few weeks trying to get everything up and running with
SourceForge. I must say the documentation is abysmal and the 2.5 release is
definately not an out-of-the-box piece of software. The dump files are made
by a Perl script called backend/DatabaseDump.pl, but this doesn't work without
extensive modifications. I made a patch of everything I've done to it. CVS works
and project creation works, and not much else. Feel free to give it a try, however.
It's at
http://www.arrayservices.com/~pjlegato/SF-update.patch .. Made with "diff -Nur
SF2.5-original/ SourceForge2.5/ >SF-update.patch". It will require some editing
still since everything there is set up for our site, but maybe it'll help..

Good luck,

-Paul

pjlegato@arrayservices.com

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge and visit:
http://sourceforge.net/forum/monitor.php?forum_id=21304
 

# === END ===

# GOOD Documentation of an SF 2.0 Installation

http://www.zoy.org/~guillaum/SF/
 

# Example Documentation of an SF 2.0 Installation
 

                 BY: garyshi
                 DATE: 2000-Aug-06 23:30
                 SUBJECT: my notes of sourceforge installation

                 * /etc/local.inc -> SFHOME/www/include/local.inc
                 <?PHP
                 $sys_dbhost = "localhost";
                 $sys_dbname = "sourceforge";
                 $sys_dbuser = "sourceforge";
                 $sys_dbpasswd = "sfpasswd";
                 $sys_server = "mysql";

                 $sys_name = "forge";
                 $sys_urlroot = "/home/sourceforge/www/";
                 $sf_cache_dir = '/home/sourceforge/cache/';
                 $sys_default_domain = "forge.itrans.com.cn";
                 $sys_lists_host = 'forge.itrans.com.cn';
                 $sys_download_host = 'forgedl.itrans.com.cn';

                 $FTPINCOMING_DIR = '/home/ftp/incoming/';
                 ?>

                 * mkdir SFHOME/cache
                 chown nobody.nobody SFHOME/cache
                 mkdir SFHOME/download
                 make a download virtual host entry to SFHOME/download

                 * https -> http changes
                 - account/change_email-confirm.php, line 22
                 - account/login.php, line 80
                 - account/lostpw-confirm.php, line 24
                 - account/register.php, line 66, 112

                 * docman fix
                 - docman/display_doc.php:
                 require('doc_utils.php') -> require('./doc_utils.php');
                 - docman/index.php:
                 require('doc_utils.php') -> require('./doc_utils.php');
                 - docman/new.php:
                 require('doc_utils.php') -> require('./doc_utils.php');

                 * download "clear.gif" from www2.valinux.com to www/images, and fix link:
                 include/pre.php, "http://www2.valinux.com/clear.gif"; -> "/images/clear.gif"

                 * include/menu.php
                 - add function menu_siteadmin():
                 function menu_siteadmin() {
                 menuhtml_top('Site Administrator');
                 print '
                 <A class=menus href="/admin/">Main entry</A><BR>
                 <A class=menus href="/admin/grouplist.php">Group Admin</A><BR>
                 <A class=menus href="/admin/approve-pending.php">Approve Pending Projects</A><BR>
                 <A class=menus href="/admin/trove/trove_cat_list.php">Trove Cat List</A><BR>
                 <A class=menus href="/admin/trove/trove_cat_add.php">Trove Cat Add</A>
                 ';
                 menuhtml_bottom();
                 }

                 * include/pre.php
                 - "require('/etc/local.inc')" -> "require('local.inc')"
                 - site admin menu, line 244:
                 if (user_is_super_user())
                 echo menu_siteadmin();

                 * other fixes
                 diff -r sourceforge/www/mail/admin/index.php SF1.5/www/mail/admin/index.php
                 97,99c97
                 < <BR><B>projectname-listname@';
                 < echo $GLOBALS['sys_lists_host'];
                 < echo '</B>
                 ---
                 > <BR><B>projectname-listname@<?php echo $GLOBALS['sys_lists_host']; ?></B>
                 112,114c110
                 < <B>'.group_getunixname($group_id).'-<INPUT TYPE="TEXT" NAME="list_name" VALUE="" SIZE="10" MAXLENGTH="12">@';
                 < echo $GLOBALS['sys_lists_host'];
                 < echo 'lists.sourceforge.net</B><BR>
                 ---
                 > <B>'.group_getunixname($group_id).'-<INPUT TYPE="TEXT" NAME="list_name" VALUE="" SIZE="10" MAXLENGTH="12">@lists.sourceforge.net</B><BR>185,187c181
                 < <TD><A href="http://';
                 < echo $GLOBALS['sys_lists_host'];
                 < echo '/mailman/admin/'
                 ---
                 > <TD><A href="http://".<?php echo $GLOBALS['sys_lists_host']; ?>."/mailman/admin/'

                 diff -r sourceforge/www/softwaremap/trove_list.php SF1.5/www/softwaremap/trove_list.php
                 16c16
                 < if (!$form_cat) $form_cat = 1;
                 ---
                 > if (!$form_cat) $form_cat = 18;

                 * my SFHOME/scripts: include.pl and db_filerelease.pl
                 - include.pl is copied from ../backend with several lines added at top:
                 $sys_dbhost = "localhost";
                 $sys_dbname = "sourceforge";
                 $sys_dbuser = "sourceforge";
                 $sys_dbpasswd = "sfpasswd";
                 $sys_server = "mysql";

                 $sys_urlroot = "/home/sourceforge/www/";
                 $sys_name = "forge";

                 $sf_cache_dir = "/home/sourceforge/cache/";
                 $sys_default_domain = "192.168.0.253";
                 $FTPINCOMING_DIR = '/home/ftp/incoming/';
                 and changed $config{'hostname'} to 'forge'.
                 and a new sub: db_connect
                 sub db_connect {
                 $dbh = DBI->connect("DBI:mysql:$sys_dbname:$sys_dbhost", "$sys_dbuser", "$sys_dbpasswd");
                 }
                 - a new file "db_filerelease.pl" to support sourceforge file releases:
                 (should be in cron, run every 2 minutes)

                 #!/usr/bin/perl
                 use DBI;

                 require "include.pl";
                 $sys_download_dir = '/home/sourceforge/download';

                 &db_connect;

                 $fr = $dbh->prepare("SELECT filerelease_id,group_id,filename FROM filerelease WHERE status='N'");
                 $group = $dbh->prepare("SELECT unix_group_name FROM groups WHERE group_id=?");
                 $update = $dbh->prepare("UPDATE filerelease SET status='A' WHERE filerelease_id=?");

                 $fr->execute();
                 while (($fr_id,$fr_group,$fr_file) = $fr->fetchrow()) {
                 $group->execute($fr_group);
                 $group->rows || next;
                 ($unix_group_name) = $group->fetchrow();
                 if (-e "$sys_download_dir/$unix_group_name") {
                 -d "$sys_download_dir/$unix_group_name" || next;
                 } else {
                 mkdir("$sys_download_dir/$unix_group_name",0755) || next;
                 }
                 system("mv $FTPINCOMING_DIR/$fr_file $sys_download_dir/$unix_group_name");
                 $update->execute($fr_id);
                 }