#!/bin/sh weist das System an, die Datei mit /bin/sh
auszuführen
#Automatic installation script for a ldap System in /usr/servers,
#the sourcecode in /usr/servers/sourcecode
#and the backup files in /usr/servers/backup
#Unzip the files in /usr/servers/sourcecode
cd /usr/servers/sourcecode | tee -a /usr/servers/install.log
#unzip OpenSSL
tar -xzvf ./openssl-0.9.6c.tar.gz | tee -a /usr/servers/install.log
#unzip OpenLDAP
tar -xzvf openldap-stable-20020215.tgz | tee -a /usr/servers/install.log
#unzip Samba
tar -xzvf samba-latest.tar.gz | tee -a /usr/servers/install.log
#unzip Squid
tar -xzvf squid-2.4.STABLE4-src.tar.gz | tee -a /usr/servers/install.log
#unzip Berkeley DB
tar -xzvf db-4.0.14.tar.gz | tee -a /usr/servers/install.log
#patch SQUID and Samba
patch -p1 -i group_ldap_auth.diff | tee -a /usr/servers/install.log
patch -p1 -i samba-2.2.3a-secret-pam-smbpass.dif | tee -a
/usr/servers/install.log
#change /usr/local during installation
mv /usr/local /usr/local_alt | tee -a /usr/servers/install.log
ln -s /usr/servers /usr/local | tee -a /usr/servers/install.log
#and enter /usr/servers in /etc/ld.so.config
mkdir /usr/servers/backup | tee -a
/usr/servers/install.log
cp /etc/ld.so.conf /usr/servers/backup/ld.so.conf | tee -a
/usr/servers/install.log
echo "/usr/servers" >> /etc/ld.so.conf | tee -a
/usr/servers/install.log
#Install Berkeley DB and OpenSSL first
cd ./db-4.0.14
../dist/configure
--prefix=/usr/servers | tee -a /usr/servers/install.log
make && make install | tee -a /usr/servers/install.log
cd ../openssl-0.9.6c | tee -a /usr/servers/install.log
./configure --prefix=/usr/servers | tee -a /usr/servers/install.log
make && make install | tee -a /usr/servers/install.log
#At last make ldconfig for the new libraries
ldconfig | tee -a /usr/servers/install.log
#Now install OpenLDAP
cd /usr/servers/sourcecode/openldap-2.0.23 | tee -a
/usr/servers/install.log
./configure --prefix=/usr/servers --with-tls | tee -a
/usr/servers/install.log
make depend && make && make test && make install
| tee -a /usr/servers/install.log
ldconfig | tee -a /usr/servers/install.log
#And now Samba
cd /usr/servers/sourcecode/samba-2.2.3a | tee -a
/usr/servers/install.log
./configure --prefix=/usr/servers --with-acl-support
--with-winbind=no --with-ssl --with-ssllib=/usr/servers/lib
--with-sslinc=/usr/servers/include/openssl --with-pam --with-ldapsam
--with-pam-smbpass | tee -a /usr/servers/install.log
make && make install | tee -a
/usr/servers/install.log
make pam_smbpass | tee -a /usr/servers/install.log
#And now Squid
cd /usr/servers/sourcecode/squid-2.4.STABLE4 | tee -a
/usr/servers/install.log
./configure --prefix=/usr/servers --sysconfdir=/usr/servers/etc/squid
--enable-carp --enable-icmp --enable-useragent-log --enable-snmp
--enable-arp-acl --enable-htcp --enable-auth-modules="GROUP_LDAP
LDAP MSNT PAM SMB YP" | tee -a
/usr/servers/install.log
make && make install | tee -a
/usr/servers/install.log
#Continue with backing up files
mkdir /usr/servers/backup/etcfiles | tee -a
/usr/servers/install.log
mkdir /usr/servers/backup/etcfiles/openldap | tee -a
/usr/servers/install.log
mkdir /usr/servers/backup/etcfiles/otheretc | tee -a
/usr/servers/install.log
mkdir /usr/servers/backup/etcfiles/otheretc/pam.d | tee -a
/usr/servers/install.log
cp -Rv /etc/openldap /usr/servers/backup/etcfiles/openldap/otheretc | tee -a
/usr/servers/install.log
cp -Rv /usr/servers/etc/openldap
/usr/servers/backup/etcfiles/openldap/fromserversetc | tee -a
/usr/servers/install.log
cp /etc/pam.d/login /usr/servers/backup/etcfiles/otheretc/pam.d/login | tee -a
/usr/servers/install.log
cp /etc/nsswitch.conf /usr/servers/backup/etcfiles/otheretc/nsswitch.conf | tee -a
/usr/servers/install.log
cp -Rv /usr/servers/etc /usr/servers/backup/newetcfiles | tee -a
/usr/servers/install.log