All pastes #948494 Raw Edit

Stuff

public shellscript v1 · immutable
·published 2008-03-19 04:40 UTC
rendered paste body
#!/bin/bash# Basic setupmkdir -p /web /web/src /web/support /web/support/lib /web/support/etcexport LD_LIBRARY_PATH=/web/support/lib# Downloadspushd /web/src# Freetype (prereq for GD)wget -c "http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.bz2"# LibJPEG (prereq for GD)wget -c "http://freshmeat.net/redir/libjpeg/5665/url_tgz/jpegsrc.v6b.tar.gz"# LibPNG (prereq for GD)wget -c "http://superb-west.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.25.tar.bz2"# GD (prereq for PHP)wget -c "http://www.libgd.org/releases/gd-2.0.35.tar.bz2"# Mcrypt (prereq for PHP)wget -c "http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.bz2?modtime=1171868442&big_mirror=0"wget -c "http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.7.tar.gz?modtime=1194463373&big_mirror=0"# Mhash (prereq for PHP)wget -c "http://downloads.sourceforge.net/mhash/mhash-0.9.9.tar.bz2?modtime=1175740797&big_mirror=0"# OpenSSLwget -c "http://www.openssl.org/source/openssl-0.9.8g.tar.gz"# PostgreSQLwget -c "http://ftp7.us.postgresql.org/pub/postgresql//source/v8.3.0/postgresql-8.3.0.tar.bz2"# IODBC (Database connector for postgres)wget -c "http://www.iodbc.org/downloads/iODBC/libiodbc-3.52.6.tar.gz"wget -c "http://ftp7.us.postgresql.org/pub/postgresql//odbc/versions/src/psqlodbc-08.03.0100.tar.gz"# OpenLDAPwget -c "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.8.tgz"# PHPwget -c "http://us3.php.net/get/php-5.2.5.tar.bz2/from/us.php.net/mirror"# eAcceleratorwget -c "http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2"# Lighttpd (Web Server)wget -c "http://www.lighttpd.net/download/lighttpd-1.4.19.tar.bz2"# DoveCot (IMAP Server)wget -c "http://dovecot.org/releases/1.0/dovecot-1.0.12.tar.gz"popd# FreeTypepushd /web/srctar xvjf freetype-2.3.5.tar.bz2cd freetype-2.3.5./configure --prefix=/web/support --enable-shared --enable-staticmake && make installpopd# LibPNGpushd /web/srctar xvjf libpng-1.2.25.tar.bz2cd libpng-1.2.25./configure --prefix=/web/support --enable-shared --enable-staticmake && make installpopd# LibJPEGmkdir -p /web/support/man/man1pushd /web/srctar xvzf jpegsrc.v6b.tar.gzcd jpeg-6b./configure --prefix=/web/supportmake && make install && make install-libpopd# GDpushd /web/srctar xvjf gd-2.0.35.tar.bz2cd gd-2.0.35CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/support --without-x --without-xpm --without-fontconfig \--enable-shared --enable-static --with-jpeg=/web/supportautoconfautomakemake && make installpopd# MHashpushd /web/srctar xvjf mhash-0.9.9.tar.bz2cd mhash-0.9.9./configure --prefix=/web/support --enable-shared --enable-static make && make installpopd# libMCryptpushd /web/srctar xvjf libmcrypt-2.5.8.tar.bz2cd libmcrypt-2.5.8./configure --prefix=/web/support --enable-shared --enable-static make && make installpopd# MCryptpushd /web/srctar xvzf mcrypt-2.6.7.tar.gzcd mcrypt-2.6.7CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/support --enable-shared --enable-static make && make installpopd# OpenSSLpushd /web/srctar xvzf openssl-0.9.8g.tar.gz./config --prefix=/web/support zlib sharedmake && make installpopd# Install PostgreSQLpushd /web/srctar xvjf postgresql-8.3.0.tar.bz2cd postgresql-8.3.0CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/support --enable-shared \--with-includes=/web/support/include --with-libraries=/web/support/lib --without-tcl --without-perl --without-pythongmake && gmake installpopd# PHPpushd /web/srctar xvjf php-5.2.5.tar.bz2cd php-5.2.5CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/php --enable-shared --enable-static \--enable-fastcgi --enable-force-cgi-redirect --enable-discard-path --with-layout=GNU --with-freetype-dir=/web/support --with-gd=/web/support \--with-jpeg-dir=/web/support --with-png-dir=/web/support --with-mcrypt=/web/support --with-mhash=/web/support --with-openssl-dir=/web/support \--with-pgsql=/web/support --includedir=/web/support/include# Make sure that support is the first pathcat Makefile | sed 's/-I\/usr\/include -I\/web\/support\/include/-I\/web\/support\/include -I\/usr\/include/g' > Makefile.newrm -f Makefilemv Makefile.new Makefilemake && make install# PHP.inirm -f /web/php/etc/php.inicat php.ini-recommended | grep -v extension_dir > /web/php/etc/php.iniecho "include_path = \".:/web/php/share/pear\"" >> /web/php/etc/php.inipopd# eAcceleratorpushd /web/srctar xvjf eaccelerator-0.9.5.2.tar.bz2cd eaccelerator-0.9.5.2CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} /web/php/bin/phpizeCFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/support --enable-shared --enable-static \--enable-eaccelerator=shared --with-php-config=/web/php/bin/php-configmake && make installpopd# eAccelerator PHP.inicat >> /web/php/etc/php.ini <<EOF  extension="eaccelerator.so"  eaccelerator.shm_size="64"  eaccelerator.cache_dir="/web/cache/eaccelerator"  eaccelerator.enable="1"  eaccelerator.optimizer="1"  eaccelerator.check_mtime="1"  eaccelerator.debug="0"  eaccelerator.filter=""  eaccelerator.shm_max="0"  eaccelerator.shm_ttl="0"  eaccelerator.shm_prune_period="0"  eaccelerator.shm_only="0"  eaccelerator.compress="1"  eaccelerator.compress_level="9"EOF# IODBCpushd /web/srctar xvzf libiodbc-3.52.6.tar.gz cd libiodbc-3.52.6CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/support --enable-shared --enable-static \--with-iodbc-inidir=/web/support/etcmake && make installpopd# IODBC Postgresql driverpushd /web/srctar xvzf psqlodbc-08.03.0100.tar.gzcd psqlodbc-08.03.0100CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/support --enable-shared --enable-static \--with-iodbc --with-odbcinst=/web/support/etcmake && make installpopd# OpenLDAPpushd /web/srctar xvzf openldap-2.4.8.tgzcd openldap-2.4.8CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/openldap --enable-shared --enable-static \--enable-slapd --disable-cleartext --enable-sql --without-cyrus-sasl --disable-bdb --enable-cryptmake dependmake && make installpopd# Lighttpdpushd /web/srctar xvjf lighttpd-1.4.19.tar.bz2cd lighttpd-1.4.19CFLAGS=-I/web/support/include LDFLAGS=-L/web/support/lib PATH=/web/support/bin:${PATH} ./configure --prefix=/web/lighttpd --enable-shared --enable-static \--with-attr --with-pcre --with-fam --with-ldapmake && make installpopdmkdir -p /web/lighttpd/etccp -af res/lighttpd.conf /web/lighttpd/etccp -af res/start.sh /web/lighttpd# Directories and permissionsmkdir -p /web/sites /web/cache /web/logs /web/cache/compress /web/cache/eacceleratoruseradd --home-dir /web/lighttpd lighttpdchown -R lighttpd:lighttpd /web/lighttpd /web/sites