网络环境所需的相关服务的安装shell

#公共部分
#!/bin/sh
export LANG=zh_CN.gbk
CURDIR=`pwd`
MYSQLPSW="lanmang"
WEBHOME="/var/www"
clear

echo "============Change yum-base============"
sleep 3
verinfo=`cat /etc/redhat-release | cut -d' ' -f3 | cut -d'.' -f1`
if [ $verinfo == '5' ];then
    mv /etc/yum.repos.d/CentOS-Base.{repo,repo.bak}
    cp ./CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
fi


echo "###########YUM Update###################"
#sleep 3
#yum -y update
yum -y install gcc
yum -y install gcc-c++
yum -y install flex
yum -y install curl
yum -y install curl-devel
yum -y install db4-devel
yum -y install expect
yum -y install bind
yum -y install bind-chroot
yum -y install pam-devel
yum -y install libtool
yum -y install tcl
yum -y install tclx
yum -y install tcl-devel

if   [ "$?" -eq 0 ]
then echo "Update Success"
else echo "Error!! Unfortunately!! Update is failure please run yum manual!"
fi
echo ""

echo "############Install Named################"
sleep 3
cd $CURDIR/named
cp named.conf /var/named/chroot/etc/
ln -s /var/named/chroot/etc/named.conf /etc/named.conf
cp etc/named.rfc1912.zones /var/named/chroot/etc/
cp var/named/* /var/named/chroot/var/named/

/etc/init.d/named start
chkconfig named on

echo "###########Install Openssl###############"
sleep 3
cd $CURDIR
tar zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config shared zlib && make && make test && make install
mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
rm /usr/lib/libssl.so
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
ln -sv /usr/local/ssl/lib/libssl.so.0.9.8  /usr/lib/libssl.so
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig -v

echo "###########Install Apache#############"
sleep 3
cd $CURDIR/apache
mkdir /var/www
groupadd -g 48 apache
useradd -u 48 -g apache -s /sbin/nologin -M apache -d $WEBHOME
tar zxvf httpd-2.0.63.tar.gz
cd httpd-2.0.63
./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so  --enable-modules=most --enable-mods-shared=most --docdir=$WEBHOME --enable-suexec --with-suexec-caller=nobody --with-suexec-docroot=$WEBHOME
make
make install

echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.local
ln -s /usr/local/apache/bin/apxs /usr/bin/

cd $CURDIR/apache
tar zxvf mod_bw-0.8.tgz
cd mod_bw
apxs -i -a -c mod_bw.c

cd $CURDIR/apache
tar jxvf mod_limitipconn-0.23.tar.bz2
cd mod_limitipconn-0.23
make install

cd $CURDIR/apache
tar zxvf mod_vhost_limit-0.2.tar.gz
cd mod_vhost_limit-0.2
chmod +x compile.sh
./compile.sh
mv mod_vhost_limit.so /usr/local/apache/modules/

echo "##############Install Ncurses###########"
sleep 3
cd $CURDIR/mysql
tar zxvf ncurses-5.5.tar.gz
cd ncurses-5.5
./configure && make && make install

echo "##############Install Mysql###########"
sleep 3
groupadd mysql
useradd -g mysql -s /bin/false -M mysql
cd $CURDIR/mysql
tar zxvf mysql-5.0.40.tar.gz
cd mysql-5.0.40
./configure --prefix=/usr/local/mysql --sysconfdir=/etc --enable-thread-safe-client --enable-local-infile --with-charset=gbk --with-extra-charsets="gbk gb2312 big5 utf8" --with-extra-charset=all --with-low-memory --with-apxs=/usr/local/apache/bin/apxs --localstatedir=/var/lib/mysql && make && make install
cp $CURDIR/mysql/my.cnf /etc/my.cnf
cd $CURDIR/mysql/mysql-5.0.40
cp support-files/mysql.server  /etc/rc.d/init.d/mysqld
chmod 700 /etc/rc.d/init.d/mysqld
touch /var/log/mysql.log
chown mysql:mysql /var/log/mysql.log

cd  /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql

chown -R mysql:mysql /var/lib/mysql

chkconfig --add mysqld
chkconfig --level 345 mysqld on
cp /usr/local/mysql/bin/mysql /usr/sbin/
cp /usr/local/mysql/bin/mysqladmin /usr/sbin/

service mysqld start
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
ldconfig
mysqladmin -u root password $MYSQLPSW

export PATH=$PATH:/usr/local/mysql/bin
mysqladmin -uroot -p$MYSQLPSW create blh5svr
mysql -uroot -p$MYSQLPSW blh5svr < $CURDIR/blh5svr.sql

mv /usr/lib/mysql /usr/lib/mysql.bk
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
mv /usr/include/mysql /usr/include/mysql.bk
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
rm /usr/bin/mysql_config
ln -s /usr/local/mysql/bin/mysql_config  /usr/bin/mysql_config


echo "##############Install Zlib#############"
sleep 3
cd $CURDIR/php
tar zxvf zlib-1.2.3.tar.tar
cd zlib-1.2.3
./configure &&
make &&
make install


echo "#############Install Libpng###########"
sleep 3
cd $CURDIR/php
tar jxvf libpng-1.2.23.tar.bz2
cd libpng-1.2.23/scripts/
mv makefile.linux ../makefile
cd ..
make &&
make install


echo "############Install Freetype############"
sleep 3
cd $CURDIR/php
tar zxvf freetype-2.2.1.tar.gz
cd freetype-2.2.1
./configure --prefix=/usr/local/freetype
make
make install
cp /usr/local/freetype/include/* /usr/include/
cp /usr/local/freetype/lib/pkgconfig/* /usr/lib/pkgconfig/
ln -s /usr/local/freetype/lib/libfreetype.so /usr/lib/libfreetype.so

echo "/usr/local/freetype/lib" >> /etc/ld.so.conf
ldconfig


echo "#############Install Jpeg############"
sleep 3
cd $CURDIR/php
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
JPEGPREFIX=/usr/local/jpeg6
./configure --prefix=$JPEGPREFIX --enable-shared --enable-static
make
make test
mkdir $JPEGPREFIX
mkdir $JPEGPREFIX/include
mkdir $JPEGPREFIX/lib
mkdir $JPEGPREFIX/man
mkdir $JPEGPREFIX/man/man1
mkdir $JPEGPREFIX/bin
make install-lib
make install


echo "#############Install GD############"
sleep 3
cd $CURDIR/php
tar zxvf gd-2.0.33.tar.tar
cd gd-2.0.33
./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6 --with-png=/usr/local/lib --with-zlib=/usr/local/lib --with-freetype=/usr/local/freetype
make
make install

echo "#################Install Libxml2###############"
sleep 3
cd $CURDIR/php
tar jxvf libxml2-2.6.23.tar.tar
cd libxml2-2.6.23
./configure --prefix=/usr/local/libxml2
make
make install

echo "#################Install MM#############"
sleep 3
cd $CURDIR/php
tar zxvf mm-1.3.1.tar.gz
cd mm-1.3.1
./configure
make
make install

echo "##################Install Libmcrypt#######"
sleep 3
cd $CURDIR/php
tar jxvf libmcrypt-2.5.8.tar.bz2
cd libmcrypt-2.5.8
./configure --disable-posix-threads --prefix=/usr/local/libmcrypt
make
make install

cd libltdl
./configure -enable-ltdl-install
make
make install
echo "/usr/local/libmcrypt/lib" >> /etc/ld.so.conf
ldconfig

echo "##################Install mhash#######"
sleep 3
cd $CURDIR/php
tar zxvf mhash-0.9.9.tar.gz
cd mhash-0.9.9/
./configure
make
make install
#ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2

#echo "##################Install mcrypt#######"
#sleep 3
#cd $CURDIR/php
#tar zxvf mcrypt-2.6.6.tar.gz
#cd mcrypt-2.6.6/
#./configure --with-libmcrypt-prefix=/usr/local/libmcrypt
#make
#make install

#echo "##################Install libiconv#######"
#sleep 3
#cd $CURDIR/php
#tar zxvf libiconv-1.11.tar.gz
#cd libiconv-1.11/
#./configure --prefix=/usr/local
#make
#make install
#echo "/usr/local/lib" >> /etc/ld.so.conf
#ldconfig

echo "##################Install BZip2#######"
sleep 3
cd $CURDIR/php
tar zxvf bzip2-1.0.5.tar.gz
cd bzip2-1.0.5
make
make install


echo "##################Install PHP#############"
sleep 3
cd $CURDIR/php
tar jxvf php-5.2.5.tar.bz2
cd php-5.2.5

./configure /
--prefix=/usr/local/php /
--with-apxs2=/usr/local/apache/bin/apxs /
--with-mysql=/usr/local/mysql /
--with-mysqli=/usr/local/mysql/bin/mysql_config /
--with-iconv /
--enable-mbstring /
--with-freetype-dir=/usr/local/freetype /
--enable-sockets /
--with-db4 /
--with-regex=php /
--with-bz2 /
--with-ttf /
--with-gd=/usr/local/gd2 /
--enable-gd-native-ttf /
--enable-gd-jis-conv /
--with-curl /
--disable-debug /
--enable-force-cgi-redirect /
--enable-ftp /
--with-zlib /
--with-png-dir /
--with-libxml-dir=/usr/local/libxml2 /
--with-jpeg-dir=/usr/local/jpeg6 /
--with-mcrypt=/usr/local/libmcrypt /
--with-mhash=/usr/local/mhash /
--enable-soap /
--enable-exif /
--disable-ipv6 /
--enable-fastcgi /
--enable-zip /
--enable-safe-mode
#--with-openssl

#sed -i 's/^EXTRA_LIBS.*$/& -liconv/' Makefile
make
make install
cp php.ini-dist /usr/local/php/lib/php.ini
ln -s /usr/local/php/bin/php /usr/bin/
ln -sv /usr/local/php/lib/php.ini /usr/local/php/lib/php/php.ini

echo "#############Start Apache and Mysqld#######################"
sleep 3
/usr/local/apache/bin/apachectl start
service mysqld restart

echo "#############Install ZendOptimizer#######################"
cd $CURDIR/php
tar zxvf ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.3.0a-linux-glibc21-i386
chmod +x ./install.sh
./install.sh  #php_path:/usr/local/php/lib

echo "###############Install phpMyAdmin#################"
sleep 3
cd $CURDIR/mysql
tar jxvf phpMyAdmin-2.11.5-rc1-all-languages.tar.bz2
mv phpMyAdmin-2.11.5-rc1-all-languages $WEBHOME/phpMyAdmin
sed "s/^[ /t]*/$cfg/['blowfish_secret'/][ /t]*=[ /t]*''[ /t]*;//$cfg['blowfish_secret'] = 'lanmang';/"  $WEBHOME/phpMyAdmin/config.sample.inc.php > $WEBHOME/phpMyAdmin/config.inc.php
cp $CURDIR/blh5svr.sql $WEBHOME
clear

echo "##############HTTPD.CONF##############"
sleep 3
cd $CURDIR/apache
mv /etc/httpd/httpd.conf /etc/httpd/httpd.confold
cp workers.properties /etc/httpd
cp mod_jk.conf /etc/httpd
cp httpd.conf /etc/httpd
cp webmail.conf /etc/httpd
cp lanmang.conf /etc/httpd

echo "###############Install Pam_Mysql###########"
sleep 3
cd $CURDIR/ftp
tar zxvf pam_mysql-0.5.tar.gz
cd pam_mysql
make
cp pam_mysql.so /lib/security
rm /etc/pam.d/ftp -f
cp $CURDIR/ftp/ftp /etc/pam.d/

echo "##############Install Proftpd#############"
sleep 3
cd $CURDIR/ftp
tar jxvf proftpd-1.3.1.tar.bz2
cd proftpd-1.3.1
./configure --prefix=/usr/local/proftpd /
--with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quotatab_sql /
--with-includes=/usr/local/mysql/include/mysql /
--with-libraries=/usr/local/mysql/lib/mysql
make
make install
cd ..
mv /usr/local/proftpd/etc/proftpd.conf /usr/local/proftpd/etc/proftpd.conf_bak
cp proftpd.conf /usr/local/proftpd/etc/
ldconfig
/usr/local/proftpd/sbin/proftpd
echo "/usr/local/proftpd/sbin/proftpd" >> /etc/rc.local

echo "##############Install Tomcat#############"
sleep

cd $CURDIR/tomcat
chmod +x jdk-1_5_0_15-linux-i586-rpm.bin
./jdk-1_5_0_15-linux-i586-rpm.bin
tar zxvf apache-tomcat-5.5.26.tar.gz
mv apache-tomcat-5.5.26 /usr/local/tomcat

tar zxvf apache-tomcat-5.5.26-admin.tar.gz
mv apache-tomcat-5.5.26/conf/Catalina/localhost/admin.xml /usr/local/tomcat/conf/Catalina/localhost/
mv apache-tomcat-5.5.26/server/webapps/admin /usr/local/tomcat/server/webapps/

export JAVA_HOME=/usr/java/jdk1.5.0_15
export CLASSPATH=/usr/java/jdk1.5.0_15/lib:/usr/java/jdk1.5.0_15/jre/lib
export PATH=$PATH:/usr/local/mysql/bin:/usr/java/jdk1.5.0_15/bin:/usr/java/jdk1.5.0_15/jre/bin
export TOMCAT_HOME=/usr/local/tomcat
echo "export JAVA_HOME=/usr/java/jdk1.5.0_15" >> /etc/rc.local
echo "export CLASSPATH=/usr/java/jdk1.5.0_15/lib:/usr/java/jdk1.5.0_15/jre/lib" >> /etc/rc.local
echo "export PATH=/$PATH:/usr/local/mysql/bin:/usr/java/jdk1.5.0_15/bin:/usr/java/jdk1.5.0_15/jre/bin" >> /etc/rc.local
echo "export TOMCAT_HOME=/usr/local/tomcat" >> /etc/rc.local

echo "export JAVA_HOME=/usr/java/jdk1.5.0_15" >> /etc/profile
echo "export CLASSPATH=/usr/java/jdk1.5.0_15/lib:/usr/java/jdk1.5.0_15/jre/lib" >> /etc/profile
echo "export PATH=/$PATH:/usr/local/mysql/bin:/usr/java/jdk1.5.0_15/bin:/usr/java/jdk1.5.0_15/jre/bin" >> /etc/profile
echo "export TOMCAT_HOME=/usr/local/tomcat" >> /etc/profile
source /etc/profile
mv /usr/local/tomcat/conf/{tomcat-users.xml,tomcat-users.xml_bak}
cp tomcat-users.xml /usr/local/tomcat/conf/tomcat-users.xml
mv /usr/local/tomcat/conf/{server.xml,server.xml_bak}
cp server.xml /usr/local/tomcat/conf/server.xml

/usr/local/tomcat/bin/startup.sh
echo "/usr/local/tomcat/bin/startup.sh" >> /etc/rc.local
cd $CURDIR/tomcat/
tar zxvf tomcat-connectors-1.2.23-src.tar.gz
cd tomcat-connectors-1.2.23-src/native
chmod 755 buildconf.sh
./buildconf.sh
./configure --with-apxs=/usr/local/apache/bin/apxs --with-java-home=/usr/java/jdk1.5.0_15 --enable-EAPI
make
make install



echo "##############Copy 探针###################"
sleep 3
clear
cp $CURDIR/test/index.* $WEBHOME
chmod +x $WEBHOME/index.cgi



echo "##############Install Postfix######################"
sleep 3
rpm -e sendmail --nodeps
groupadd -g 12345 postfix
useradd -u 12345 -g 12345 -c postfix -d/dev/null -s/sbin/nologin postfix
groupadd -g 54321 postdrop
groupadd -g 1000 vmail
useradd -u 1000 -g 1000 vmail

echo "##############Install Sasl########################"
sleep 3
mv /usr/lib/sasl2 /usr/lib/sasl2.rpm.bak
cd $CURDIR/mail
tar zxvf cyrus-sasl-2.1.22.tar.gz
cd cyrus-sasl-2.1.22
./configure --disable-anon -enable-plain --enable-login /
--with-authdaemond
make && make install
mv /usr/local/lib/sasl2/smtpd.conf /usr/local/lib/sasl2/smtpd.conf.bak
cp $CURDIR/mail/smtpd.conf /usr/local/lib/sasl2/smtpd.conf
ln -s /usr/local/lib/sasl2 /usr/lib/sasl2

echo "##############Install Postfix######################"
sleep 3
cd $CURDIR/mail
tar zxvf postfix-2.4.3.tar.gz
tar jxvf postfix-2.4.3-vda-ng.patch.tar.bz2
cd postfix-2.4.3
patch -Np1 < ../postfix-2.4.3-vda-ng.patch
make -f Makefile.init makefiles 'CCARGS=-DUSE_SASL_AUTH  -DUSE_CYRUS_SASL -DHAS_MYSQL -I/usr/local/mysql/include/mysql -I/usr/include/sasl -I/usr/local/include/sasl -I/usr/lib/sasl'  'AUXLIBS=-L/usr/local/mysql/lib/mysql -L/usr/local/lib/sasl2 -lmysqlclient -lsasl2 -lz -lm'
make && make install
mv /etc/aliases /etc/aliases.bak
ln -s /etc/postfix/aliases /etc/aliases
echo 'root: postfix'>>/etc/postfix/aliases
/usr/bin/newaliases
mv /var/mail /var/mail.bak
mkdir /var/mail
chown -R postfix:postfix /var/mail
mv /etc/postfix/main.cf /etc/postfix/main.cf.bak
cp $CURDIR/mail/main.cf /etc/postfix/
mkdir -p /etc/postfix/ext_mysql
cp $CURDIR/mail/ext_mysql/* /etc/postfix/ext_mysql/
mkdir /home/domains
chown vmail.vmail /home/domains

echo "##############Install Courier-Authlib####################"
sleep 3
cd $CURDIR/mail
tar jxvf courier-authlib-0.58.tar.bz2
cd courier-authlib-0.58
./configure --prefix=/usr/lib/authlib --without-authuserdb --without-authpam --without-authldap --without-authpwd --without-authshadow --without-authvchkpw --without-authpgsql --without-authcustom --with-mailuser=vmail --with-mailgroup=vmail --with-mysql-libs=/usr/local/mysql/lib/mysql/ --with-mysql-includes=/usr/local/mysql/include/mysql/ --with-redhat
make
make install
make install-migrate
make install-configure
cp /usr/lib/authlib/include/* /usr/include/
chown postfix.postfix /usr/lib/authlib/var/spool/authdaemon/
cp authmysqlrc /usr/lib/authlib/etc/authlib/
cp authdaemonrc /usr/lib/authlib/etc/authlib/
COURIERAUTHCONFIG=/usr/lib/authlib/bin/courierauthconfig
export COURIERAUTHCONFIG
echo "COURIERAUTHCONFIG=/usr/lib/authlib/bin/courierauthconfig" >> /etc/rc.local
echo "export COURIERAUTHCONFIG" >> /etc/rc.local


rm /usr/lib/libssl.so
ln -sv /usr/local/ssl/lib/libssl.so.0.9.8  /usr/lib/libssl.so

echo "##############Install Courier-Imap#######################"
sleep 3
cd $CURDIR/mail
tar jxvf courier-imap-4.1.0.tar.tar
cd courier-imap-4.1.0
./configure --prefix=/usr/lib/imapd --with-redhat --enable-unicode --disable-root-check --with-trashquota --without-ipv6 CPPFLAGS='-I/usr/lib/authlib/include' COURIERAUTHCONFIG='/usr/lib/authlib/bin/courierauthconfig'

make
make install
make install-configure
cp $CURDIR/mail/auth* /usr/lib/authlib/etc/authlib/
cd ..
mkdir -p /usr/lib/imapd/etc/
mv /usr/lib/imapd/etc/pop3d /usr/lib/imapd/etc/pop3d.bak
cp $CURDIR/mail/pop3d /usr/lib/imapd/etc/pop3d
mv /usr/lib/imapd/etc/imapd /usr/lib/imapd/etc/imapd.bak
cp $CURDIR/mail/imapd /usr/lib/imapd/etc/imapd
chmod +x /usr/lib/authlib/var/

echo "##############Install Pcre#######################"
sleep 3
cd $CURDIR/mail
groupadd vmail -g 1000
useradd vmail -u 1000 -g 1000
tar jxvf pcre-7.3.tar.bz2
cd pcre-7.3
./configure
make && make install

echo "##############Install Maildrop#######################"
sleep 3
cd $CURDIR/mail
tar jxvf maildrop-2.0.2.tar.bz2
cd maildrop-2.0.2
patch -Np1 < ../maildrop-2.0.2.patch
ln -s /usr/lib/authlib/bin/courierauthconfig /usr/bin/courierauthconfig
./configure --enable-sendmail=/usr/sbin/sendmail --enable-trusted-users='root vmail' --enable-syslog=1 --enable-maildirquota --enable-maildrop-uid=1000 --enable-maildrop-uid=1000 --with-trashquota --with-dirsync
make && make install
mv /etc/postfix/master.cf /etc/postfix/master.cf_bak
cp $CURDIR/mail/master.cf /etc/postfix/master.cf
cp $CURDIR/mail/courier-authlib /etc/init.d/
cp $CURDIR/mail/courier-imap /etc/init.d/
chmod +x /etc/init.d/courier-authlib
chmod +x /etc/init.d/courier-imap
chkconfig courier-authlib on
chkconfig courier-imap on
service courier-authlib start
service courier-imap start 

/usr/sbin/postfix start
echo "/usr/sbin/postfix start" >> /etc/rc.local
echo "service courier-authlib start" >> /etc/rc.local
echo "service courier-imap start" >> /etc/rc.local


echo "##############Install libesmtp################"
sleep 3
cd $CURDIR/mail
tar jxvf libesmtp-1.0.4.tar.bz2
cd libesmtp-1.0.4
./configure --enable-pthreads=no
make
make install
echo "/usr/local/lib/" >> /etc/ld.so.conf
ldconfig


echo "##############Install extmail###################"

cd $CURDIR/mail/extmail
mkdir -p /var/www/extsuite
tar zxvf extmail-1.0.4.tar.gz
mv extmail-1.0.4 /var/www/extsuite/extmail
cp webmail.cf /var/www/extsuite/extmail/

tar zxvf extman-0.2.4.tar.gz
mv extman-0.2.4 /var/www/extsuite/extman
mv /var/www/extsuite/extman/webman.{cf,cf_bak}
cp webman.cf /var/www/extsuite/extman/
sed -i 's//(.*/)value=root@extmail.org/(.*/)//1/2/'  /var/www/extsuite/extman/html/default/index.html
cp mysql_virtual/* /var/www/extsuite/extman/docs/

mkdir /tmp/extman
chown -R vmail:vmail /tmp/extman
chmod 777 /tmp/extman
chown -R vmail:vmail /var/www/extsuite/extmail
chown -R vmail:vmail /var/www/extsuite/extman

touch /var/log/maildrop.log
chown vmail.vmail /var/log/maildrop.log

echo "##############Install libart_lgpl###################"
cd $CURDIR/mail/extmail
tar jxvf libart_lgpl-2.3.19.tar.bz2
cd libart_lgpl-2.3.19
./configure
make
make install
cp /usr/local/lib/pkgconfig/libart-2.0.pc /usr/lib/pkgconfig/

echo "##############Install cgilib###################"
cd $CURDIR/mail/extmail
tar zxvf cgilib-0.6.tar.gz
cd cgilib-0.6
make
make install

echo "##############Install File-Tail###################"
cd $CURDIR/mail/extmail
tar zxvf File-Tail-0.99.3.tar.gz
cd File-Tail-0.99.3
perl Makefile.PL
make
make install

echo "##############Install rrdtool###################"
cd $CURDIR/mail/extmail
tar zxvf rrdtool-1.2.27.tar.gz
cd rrdtool-1.2.27
./configure --prefix=/usr/local/rrdtool
make
make install
cp -r /usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi/* /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/


echo "##############Start mailgraph_ext###################"

cp -r /var/www/extsuite/extman/addon/mailgraph_ext/ /usr/local/mailgraph_ext/
/usr/local/mailgraph_ext/mailgraph-init start
/usr/local/mailgraph_ext/qmonitor-init start
echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.d/rc.local
echo "/usr/local/mailgraph_ext/qmonitor-init start" >> /etc/rc.d/rc.local

echo "##############Install Unix-Syslog###################"
cd $CURDIR/mail/extmail
tar zxvf Unix-Syslog-1.1.tar.gz
cd Unix-Syslog-1.1
perl Makefile.PL
make
make install

echo "####################Install DBI#####################"
cd $CURDIR/mail/extmail
tar zxvf DBI-1.607.tar.gz
cd DBI-1.607
perl Makefile.PL
make
make install

echo "##############Install DBD-mysql###################"
cd $CURDIR/mail/extmail
tar zxvf DBD-mysql-4.007.tar.gz
cd DBD-mysql-4.007
perl Makefile.PL /
        --libs="-L/usr/local/mysql/lib/mysql -lmysqlclient -lz" /
        --cflags=-I/usr/local/mysql/include/mysql /
        --mysql_config=/usr/local/mysql/bin/mysql_config
make
make install


echo "##############Start Service###################"
sleep 3
/usr/local/apache/bin/apachectl restart
service mysqld restart

killall proftpd
/usr/local/proftpd/sbin/proftpd
/usr/local/tomcat/bin/shutdown.sh
/usr/local/tomcat/bin/startup.sh
/usr/sbin/postfix stop
/usr/sbin/postfix start

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值