下面是我以前在做php程序员的时候编写的一个在Linux/FreeBSD上手动编译gmake/perl/python/apache/bind/dhcp/mysql/openssl/openssh/pgsql/proftpd/pureftpd/qmail/samba/squid/sudo/vsftpd/vpopmail的脚本程序。
程序的原理就是在当前目录下搜索以指定名称开头的压缩包,然后解开并编译安装到指定目录。
这个脚本默认不安装任何软件包,想安装那个软件,就把“#软件包”一节后面相应包的注释去掉,如要安装gmake,就把 #gmake='make-' 改成gmake='make-',然后把gmake安装包拷贝到当前目录,然后运行脚本。
本脚本以前在其他网站上发布过,这个是最后修改的脚本。



#!/bin/sh

#################################################
#
#   名称:   Unix/Linux软件包安装脚本
#   作者:   王文俊
#   时间:   2004-3-14(最近一次修改时间)
#
#################################################

# 获得当前路径
current=`/bin/pwd`

# 安装目标路径
target='/data/app'

# 定义安装要使用的make
make='/usr/bin/make'

# 软件包
#gmake='make-'
#perl='perl-'
#python='Python-'
#apache='apache_'
#apache2='httpd-'
#bind='bind-'
#dhcp='dhcp-'
#libmcrypt='libmcrypt-'
#mysql='mysql-'
#openssl='openssl-'
#openssh='openssh-'
#pgsql='postgresql-'
#proftpd='proftpd-'
#pureftpd='pure-ftpd-'
#qmail='qmail-'
#samba='samba-'
#squid='squid-'
#sudo='sudo-'
#vsftpd='vsftpd-'
#vpopmail='vpopmail-'

# php安装方式
#phpdso='php-'
#phpcgi='php-'
#phpcli='php-'

# 编译php的选项
#with_apache="--with-apxs=$target/apache/bin/apxs"
with_apache2="--with-apxs2=$target/apache/bin/apxs"
with_mcrypt="--with-mcrypt"
with_mysql="--with-mysql=$target/mysql"
with_pgsql="--with-pgsql=$target/pgsql"

enable_calendar='--enable-calendar'
enable_ftp='--enable-ftp'
enable_magic_quotes='--enable-magic-quotes'
enable_memory_limit='--enable-memory-limit'
enable_safe_mode='--enable-safe-mode'
enable_sockets='--enable-sockets'
disable_debug='--disable-debug'
with_zlib="--with-zlib"
with_bz2="--with-bz2"
with_gettext="--with-gettext"
with_readline="--with-readline"


#################################################
#
#   定义函数
#
#################################################

# 获得文件类型的函数,gzip返回0,bzip2返回1,tar返回2,其他的返回3
gettype(){
    if [ "x$1" = "x" ] ; then
      return 3
    fi
    type=`echo "$1" | grep .gz$`
    if [ "x$type" != "x" ] ; then
        return 0
    fi
    type=`echo "$1" | grep .tgz$`
    if [ "x$type" != "x" ] ; then
        return 0
    fi
    type=`echo "$1" | grep .bz2$`
    if [ "x$type" != "x" ] ; then
        return 1
    fi
    type=`echo "$1" | grep .tar$`
    if [ "x$type" != "x" ] ; then
        return 2
    fi
    return 3
}

# 解压软件包的函数
expandsource(){
  if [ "x$1" = "x" ] ; then
    echo '->>Source file name is empty !'
    return 1
  fi
  for source in $1*
    do
      if [ -f $source ] ; then
        echo "->>Found source file $source,EXPAND !"
      else
        echo "->>Can not find source file $source ! "
        return 1
      fi
    done
  gettype $source
  case "x$?" in
    "x3")
      return 1 ;;
    "x0")
      gzip -dc $source | tar xf - ;;
    "x1")
      bzip2 -dc $source | tar xf - ;;
    "x2")
      tar -xf $source ;;
  esac
  # 解压之后检测结果
  if [ "x$?" != "x0" ] ; then
    echo "->>EXPAND $source ......ERROR !"
    return 1
  fi
  # 获得解压后的目录名
  for getdir in $1*
    do
      if [ -d $getdir ] ; then
                expanddir=$getdir
                echo "->>EXPAND $source ......OK !"
                return 0
      else
        echo "->>EXPAND $source ......ERROR !"
        return 1
      fi
    done
}

# 删除临时目录的函数
deltemp() {
  for tmpdir in $1*
    do
      if [ -d $tmpdir ] ; then
        echo "->>Clear temp source dir $tmpdir !"
        rm -fr $tmpdir
       if [ "x$?" = "x0" ] ; then
          echo "->>DELETE temp dir $tmpdir ......OK !"
          return 0
        else
          echo "->>DELETE temp dir $tmpdir ......ERROR !"
          return 1
        fi
      fi
    done
}

##########    安装软件的函数    ##########

# 安装 gmake的函数
inst_gmake(){
  cd $current
  deltemp
  expandsource  $gmake
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $gmake !"
    return 1
  else
    gmake=$expanddir
    cd $current/$gmake
    echo "##########   Install $gmake   ##########"
    ./configure
    $options
    $make
    $make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $gmake ......OK !"
    ln -fs /usr/local/bin/make /usr/local/bin/gmake
    ln -fs /usr/local/bin/make /usr/bin/gmake
    make='/usr/bin/gmake'
  else
    echo "->>Install $gmake ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 perl的函数
inst_perl(){
  cd $current
  deltemp
  expandsource  $perl
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $perl !"
    return 1
  else
    perl=$expanddir
    cd $current/$perl
    echo "##########   Install $perl   ##########"
    ./Configure -de
    $options
    $make
    $make test
    $make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $perl ......OK !"
  else
    echo "->>Install $perl ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 python的函数
inst_python(){
  cd $current
  deltemp
  expandsource  $python
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $python !"
    return 1
  else
    python=$expanddir
    cd $current/$python
    echo "##########   Install $python   ##########"
    ./configure
    $options
    $make
    $make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $python ......OK !"
  else
    echo "->>Install $python ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 apache的函数
inst_apache(){
  cd $current
  deltemp
  expandsource  $apache
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $apache !"
    return 1
  else
    apache=$expanddir
    cd $current/$apache
    echo "##########   Install $apache    ##########"
    ./configure --prefix=$target/apache --enable-module=so "
                --enable-shared=max --enable-rule=SHARED_CORE
    $options
    $make
    $make install
    cp -fr $target/apache/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $apache ......OK !"
  else
    echo "->>Install $apache ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 apache2的函数
inst_apache2(){
  cd $current
  deltemp
  expandsource  $apache2
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $apache2 !"
    return 1
  else
    apache2=$expanddir
    cd $current/$apache2
    echo "##########    Install $apache2    ##########"
    ./configure --prefix=$target/apache --enable-module=so "
                --enable-shared=max --enable-rule=SHARED_CORE
    $make
    $make install
    cp -fr $target/apache/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $apache2 ......OK !"
  else
    echo "->>Install $apache2 ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 bind的函数
inst_bind(){
  cd $current
  deltemp
  expandsource  $bind
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $bind !"
    return 1
  else
    bind=$expanddir
    cd $current/$bind
    echo "##########    Install $bind   ##########"
    ./configure --prefix=$target/bind
    $options
    $make
    $make install
    cp -fr $target/bind/man/* /usr/local/man/
      mkdir $target/bind/etc
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $bind ......OK !"
  else
    echo "->>Install $bind ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 dhcp的函数
inst_dhcp(){
  cd $current
  deltemp
  expandsource  $dhcp
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $dhcp !"
    return 1
  else
    dhcp=$expanddir
    cd $current/$dhcp
    echo "##########    Install $dhcp   ##########"
    ./configure
    $make
    $make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $dhcp ......OK !"
  else
    echo "->>Install $dhcp ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 libmcrypt的函数
inst_libmcrypt(){
  cd $current
  deltemp
  expandsource  $libmcrypt
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $libmcrypt !"
    return 1
  else
    libmcrypt=$expanddir
    cd $current/$libmcrypt
    echo "##########   Install $libmcrypt   ##########"
    ./configure --disable-posix-threads
    $make
    $make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $libmcrypt ......OK !"
  else
    echo "->>Install $libmcrypt ......ERORR !"
  fi
  cd $current
 deltemp
}

# 安装 mysql的函数
inst_mysql(){
  cd $current
  deltemp
  expandsource  $mysql
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $mysql !"
    return 1
  else
    mysql=$expanddir
    cd $current/$mysql
    echo "##########   Install $mysql   ##########"
    ./configure --prefix=$target/mysql  --with-charset=gb2312
    $make
    $make install
    # 添加用户和组
    pw groupdel mysql
    pw groupadd mysql
    pw userdel mysql
    pw useradd mysql -g mysql
    pw lock mysql
    $current/$mysql/scripts/mysql_install_db
    chown -R mysql:mysql $target/mysql/var
    cp -fr $target/mysql/lib/mysql/* /usr/local/lib/
    cp -fr $target/mysql/include/mysql/* /usr/local/include/
    cp -fr $target/mysql/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $mysql ......OK !"
  else
    echo "->>Install $mysql ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 openssl的函数
inst_openssl(){
  cd $current
  deltemp
  expandsource  $openssl
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $openssl !"
    return 1
  else
    openssl=$expanddir
    cd $current/$openssl
    echo "##########   Install $openssl   ##########"
    ./config
    $make
    $make test
    $make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $openssl ......OK !"
  else
    echo "->>Install $openssl ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 openssh的函数
inst_openssh(){
  cd $current
  deltemp
  expandsource  $openssh
  if [ "x$?" != "x0" ] ; then
    echo "Some erorr occured ,skip install $openssh !"
    return 1
  else
    openssh=$expanddir
    cd $current/$openssh
    echo "##########   Install $openssh   ##########"
    ./configure --prefix=$target/openssh
    $make
    $make install
    cp -fr $target/openssh/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $openssh ......OK !"
  else
    echo "->>Install $openssh ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 postgresql的函数
inst_pgsql(){
  cd $current
  deltemp
  expandsource  $pgsql
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $pgsql !"
    return 1
  else
    pgsql=$expanddir
    cd $current/$pgsql
    echo "##########   Install $pgsql   ##########"
    ./configure --prefix=$target/pgsql --enable-multibyte=EUC_CN
    $make
    $make install
    # 添加用户和组
    pw groupdel pgsql
    pw groupadd pgsql
    pw userdel pgsql
    pw useradd pgsql -g pgsql
    pw lock pgsql
    mkdir $target/pgsql/data
    chown -R pgsql:pgsql $target/pgsql/data
    su - pgsql -c "$target/pgsql/bin/initdb -D $target/pgsql/data"
    cp -fr $target/pgsql/lib/* /usr/local/lib/
    cp -fr $target/pgsql/include/* /usr/local/include/
    cp -fr $target/pgsql/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $pgsql ......OK !"
  else
    echo "->>Install $pgsql ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 php as DSO的函数
inst_phpdso(){
  cd $current
  deltemp
  expandsource  $phpdso
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $phpdso !"
    return 1
  else
    phpdso=$expanddir
    cd $current/$phpdso
    echo "##########   Install $phpdso   ##########"
    ./configure --prefix=$target/php  $with_apache  $with_apache2 "
      $enable_ftp $enable_magic_quotes  $enable_memory_limit  $enable_safe_mode "
      $enable_sockets $disable_debug  $enable_calendar  $with_zlib  "
      $with_bz2 $with_gettext $with_readline  $with_mcrypt  "
      $with_mysql $with_pgsql
    $make
    $make install
    echo "AddType application/x-httpd-php .php" >> $target/apache/conf/httpd.conf
    if [ ! -d $target/php/lib ]; then
        mkdir $target/php/lib
      fi
      cp -fr $current/$phpdso/php.ini-dist $target/php/lib/php.ini
      cp -fr $target/php/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
      echo "->>Install $phpdso ......OK !"
  else
      echo "->>Install $phpdso ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 php as CGI的函数
inst_phpcgi(){
  cd $current
  deltemp
  expandsource  $phpcgi
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $phpcgi !"
    return 1
  else
    phpcgi=$expanddir
    cd $current/$phpcgi
    echo "##########   Install $phpcgi   ##########"
    ./configure  --prefix=$target/phpcgi --enable-cgi $enable_ftp "
      $enable_magic_quotes  $enable_memory_limit  $enable_safe_mode "
      $enable_sockets $disable_debug  $enable_calendar  "
      $with_zlib  $with_bz2 $with_gettext $with_readline  "
      $with_mcrypt  $with_mysql $with_pgsql
    $make
    $make install
    cp -fr $current/$phpcgi/php.ini-dist $target/phpcgi/lib/php.ini
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $phpcgi ......OK !"
  else
    echo "->>Install $phpcgi ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 php as CLI的函数
inst_phpcli(){
  cd $current
  deltemp
  expandsource  $phpcli
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $phpcli !"
    return 1
  else
    phpcli=$expanddir
    cd $current/$phpcli
    echo "##########   Install $phpcli   ##########"
    ./configure  --prefix=$target/phpcli --enable-cli --enable-cgi "
      $enable_ftp $enable_magic_quotes  $enable_memory_limit  $enable_safe_mode "
      $enable_sockets $disable_debug  $enable_calendar  $with_zlib  "
      $with_bz2 $with_gettext $with_readline  $with_mcrypt  "
      $with_mysql $with_pgsql
    $make
    $make install
    $make install-cli
    cp -fr $current/$phpcli/php.ini-dist $target/phpcli/lib/php.ini
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $phpcli ......OK !"
  else
    echo "->>Install $phpcli ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 proftpd的函数
inst_proftpd(){
  cd $current
  deltemp
  expandsource  $proftpd
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $proftpd !"
    return 1
  else
    proftpd=$expanddir
    cd $current/$proftpd
    echo "##########   Install $proftpd   ##########"
    ./configure   --prefix=$target/proftpd
    $make
    $make install
    cp -fr $target/proftpd/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $proftpd ......OK !"
  else
    echo "->>Install $proftpd ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 pureftpd的函数
inst_pureftpd(){
  cd $current
  deltemp
  expandsource  $pureftpd
  if [ "x$?" != "x0" ] ; then
    echo "Some erorr occured ,skip install $pureftpd !"
    return 1
  else
    pureftpd=$expanddir
    cd $current/$pureftpd
    echo "##########   Install $pureftpd   ##########"
    ./configure  --prefix=$target/pureftpd "
      --with-ftpwho --with-largefile "
      --with-welcomemsg --with-throttling "
      --with-ratios --with-quotas "
      --with-altlog --with-puredb "
      --with-tls  "
      --with-mysql=$target/mysql "
      --with-pgsql==$target/pgsql "
      --with-everything
    $make
    $make install
    cp -fr $target/pureftpd/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $pureftpd ......OK !"
  else
    echo "->>Install $pureftpd ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 qmail的函数
inst_qmail(){
  cd $current
  deltemp
  expandsource  $qmail
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $qmail !"
    return 1
  else
    qmail=$expanddir
    cd $current/$qmail
    echo "##########   Install $qmail   ##########"
    rm -fr /var/qmail
    mkdir /var/qmail
    # 添加用户和组
    pw groupdel nofiles
    pw groupadd nofiles
    pw groupdel qmail
    pw groupadd qmail
    pw userdel alias
    pw useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent -m
    pw userdel qmaild
    pw useradd qmaild -g nofiles -d /var/qmail -s /nonexistent
    pw userdel qmaill
    pw useradd qmaill -g nofiles -d /var/qmail -s /nonexistent
    pw userdel qmailp
    pw useradd qmailp -g nofiles -d /var/qmail -s /nonexistent
    pw userdel qmailq
    pw useradd qmailq -g qmail -d /var/qmail -s /nonexistent
    pw userdel qmailr
    pw useradd qmailr -g qmail -d /var/qmail -s /nonexistent
    pw userdel qmails
    pw useradd qmails -g qmail -d /var/qmail -s /nonexistent
    $make setup check
    rm -fr /var/qmail/control/*
    ./config-fast localhost
    echo 'root' > /var/qmail/alias/.qmail-mailer-daemon
    echo 'root' > /var/qmail/alias/.qmail-postmaster
    echo 'root' > /var/qmail/alias/.qmail-root
    chmod 644 ~alias/.qmail*
    rm -f /usr/sbin/sendmail
    ln -fs /var/qmail/bin/sendmail /usr/sbin/sendmail
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $qmail ......OK !"
  else
    echo "->>Install $qmail ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 samba的函数
inst_samba(){
  cd $current
  deltemp
  expandsource  $samba
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $samba !"
    return 1
  else
    samba=$expanddir
    cd $current/$samba/source
    echo "##########   Install $samba   ##########"
    ./configure --prefix=$target/samba
    $make
    $make install
    cp $current/$samba/examples/smb.conf.default    $target/samba/lib/
    if [ -f $current/samba.sh ] ; then
      cp $current/samba.sh  $target/samba/bin/
        chmod 755 $target/samba/bin/samba.sh
    fi
    cp -fr $target/samba/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $samba ......OK !"
  else
    echo "->>Install $samba ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 squid的函数
inst_squid(){
  cd $current
  deltemp
  expandsource  $squid
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $squid !"
    return 1
  else
    squid=$expanddir
    cd $current/$squid
    echo "##########   Install $squid   ##########"
    ./configure --prefix=$target/squid
    $make all
    $make install
    cp -fr $target/squid/man/* /usr/local/man/
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $squid ......OK !"
  else
    echo "->>Install $squid ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 sudo的函数
inst_sudo(){
  cd $current
  deltemp
  expandsource  $sudo
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $sudo !"
    return 1
  else
    sudo=$expanddir
    cd $current/$sudo
    echo "##########   Install $sudo   ##########"
    ./configure
    $make
    $make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $sudo ......OK !"
  else
    echo "->>Install $sudo ......ERORR !"
  fi
  cd $current
  deltemp
}

# 安装 vsftpd的函数
inst_vsftpd(){
  cd $current
  deltemp
  expandsource  $vsftpd
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $vsftpd !"
    return 1
  else
    vsftpd=$expanddir
    cd $current/$vsftpd
    echo "##########   Install $vsftpd   ##########"
    ./configure
    $make
    $make install
    mkdir /usr/share/empty
    cp -fr $current/$vsftpd/EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf   /etc
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $vsftpd ......OK !"
  else
    echo "->>Install $vsftpd ......ERORR !"
  fi
 cd $current
  deltemp
}

# 安装 vpopmail的函数
inst_vpopmail(){
  cd $current
  deltemp
  expandsource  $vpopmail
  if [ "x$?" != "x0" ] ; then
    echo "->>Some erorr occured ,skip install $vpopmail !"
    return 1
  else
    vpopmail=$expanddir
    cd $current/$vpopmail
    echo "##########   Install $vpopmail   ##########"
    echo "未安装"
    #$make all
    #$make install
  fi
  if [ "x$?" = "x0" ] ; then
    echo "->>Install $vpopmail ......OK !"
  else
    echo "->>Install $vpopmail ......ERORR !"
  fi
  cd $current
  deltemp
}

#################################################

# 测试目标目录是否存在,不存在则建立目录
if [ ! -d $target ] ; then
  mkdir $target
  if [ "x$?" != "x0" ] ; then
    echo "Target path $target is not exist and can't create it!"
    exit 1
  fi
fi

# 显示开始编译的时间
time=`date "+%Y-%m-%d %H:%M:%S"`
echo "#################################################"
echo
echo "Build soft begin in $time !"
echo
echo "-------------------------------------------------"

deltemp

# 安装 gmake
if [ "x$gmake" != "x" ] ; then
  inst_gmake
fi

# 安装 perl
if [ "x$perl" != "x" ] ; then
  inst_perl
fi

# 安装 python
if [ "x$python" != "x" ] ; then
  inst_python
fi

# 安装 apache
if [ "x$apache" != "x" ] ; then
  inst_apache
fi

# 安装 apache2
if [ "x$apache2" != "x" ] ; then
  inst_apache2
fi

# install bind
if [ "x$bind" != "x" ] ; then
  inst_bind
fi

# install dhcp
if [ "x$dhcp" != "x" ] ; then
  inst_dhcp
fi

# 安装 libmcrypt
if [ "x$libmcrypt" != "x" ] ; then
  inst_libmcrypt
fi

# 安装 mysql
if [ "x$mysql" != "x" ] ; then
  inst_mysql
fi

# install openssl
if [ "x$openssl" != "x" ] ; then
  inst_openssl
fi

# install openssh
if [ "x$openssh" != "x" ] ; then
  inst_openssh
fi

# 安装 postgresql
if [ "x$pgsql" != "x" ] ; then
  inst_pgsql
fi

# install php as DSO
if [ "x$phpdso" != "x" ] ; then
  inst_phpdso
fi

# install php as CGI
if [ "x$phpcgi" != "x" ] ; then
  inst_phpcgi
fi

# install php as CLI
if [ "x$phpcli" != "x" ] ; then
  inst_phpcli
fi

# install proftpd
if [ "x$proftpd" != "x" ] ; then
  inst_proftpd
fi

# install pure-ftpd
if [ "x$pureftpd" != "x" ] ; then
  inst_pureftpd
fi

# install qmail
if [ "x$qmail" != "x" ] ; then
  inst_qmail
fi

# install samba
if [ "x$samba" != "x" ] ; then
  inst_samba
fi

# install squid
if [ "x$squid" != "x" ] ; then
  inst_squid
fi

# install sudo
if [ "x$sudo" != "x" ] ; then
  inst_sudo

fi

# install vsftpd
if [ "x$vsftpd" != "x" ] ; then
  inst_vsftpd
fi

# install vpopmail
if [ "x$vpopmail" != "x" ] ; then
  inst_vpopmail
fi

deltemp

# 显示编译完成的时间
time=`date "+%Y-%m-%d %H:%M:%S"`
echo "-------------------------------------------------"
echo
echo "Build soft end in $time !"
echo
echo "#################################################"

posted on 2008-04-15 14:14  一切随缘  阅读(526)  评论(0编辑  收藏  举报