#!/bin/bash
# BY kerryhu
# QQ:263205768
#
MAIL:king_819@163.com
# BLOG:[url]http://kerry.blog.51cto.com[/url]
#
Please manual operation yum of before Operation.....
# yum install ntp vim-enhanced gcc gcc-c++ flex bison autoconf \
#
automake bzip2-devel ncurses-devel libjpeg-devel libpng-devel \
#
libtiff-devel freetype-devel pam-devel kernel netconfig
#########################################
ntpdate time.nist.gov
cd
/opt
#########################################
# INSTALL mysql-5.0.27
cd
/opt
tar -zxf mysql-5.0.27.tar.gz
cd mysql-5.0.27
./configure
--prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql
--with-extra-charsets=gbk
make
make install
groupadd mysql
useradd
mysql -d /dev/null -g mysql -s
/sbin/nologin
/usr/local/mysql/bin/mysql_install_db
chown -R mysql.mysql
/var/lib/mysql
chown -R mysql.mysql /usr/local/mysql/
cp
/usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
cp
/opt/mysql-5.0.27/support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod
700 /etc/rc.d/init.d/mysqld
/usr/local/mysql/bin/mysqld_safe --user=mysql
&
/etc/rc.d/init.d/mysqld
start
#########################################
# INSTALL zlib-1.2.3
cd
/opt
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
--prefix=/usr/local/zlib
make
make install
#########################################
# INSTALL openssl
cd
/opt
tar zxvf openssl0.9.7g.tar.gz
cd openssl0.9.7g
./config
--prefix=/usr/local/openssl
make
make test
make install
#########################################
# INSTALL httpd
cd
/opt
tar zxvf httpd-2.0.58.tar.gz
cd httpd-2.0.58
./configure
--prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl
--with-ssl=/usr/local/openssl --enable-track-vars --enable-rewrite
make
make install
echo "/usr/local/apache/bin/apachectl start" >>
/etc/rc.d/rc.local
#########################################
# INSTALL
libpng-1.2.14
cd /opt
tar zxvf libpng-1.2.14.tar.gz
cd
libpng-1.2.14
cp scripts/makefile.linux makefile
make
make install
#########################################
# INSTALL freetype-2.1.10
cd /opt
tar -zvxf freetype-2.1.10.tar.gz
cd freetype-2.1.10
mkdir -p /usr/local/freetype
./configure --prefix=/usr/local/freetype
make;make install
#########################################
# INSTALL jpegsrc.v6b
mkdir
-p /usr/local/jpeg6
mkdir -p /usr/local/jpeg6/bin
mkdir -p
/usr/local/jpeg6/lib
mkdir -p /usr/local/jpeg6/include
mkdir -p
/usr/local/jpeg6/man
mkdir -p /usr/local/jpeg6/man1
mkdir -p
/usr/local/jpeg6/man/man1
#安装
cd /opt
tar zxvf jpegsrc.v6b.tar.gz
cd
jpegsrc.v6b
./configure --prefix=/usr/local/jpeg6/ --enable-shared
--enable-static
make
make install
make install-lib
#########################################
#INSTALL libxml2-2.6.19
cd
/opt
tar -zxf libxml2-2.6.19.tar.gz
cd libxml2-2.6.19
mkdir -p
/usr/local/libxml2
./configure --prefix=/usr/local/libxml2
make; make
install
cp xml2-config /usr/bin
#########################################
# INSTALL GD-2.0.33
cd
/opt
tar -zvxf gd-2.0.33.tar.gz
mkdir -p /usr/local/gd2
cd
gd-2.0.33
./configure --prefix=/usr/local/gd2
--with-jpeg=/usr/local/jpeg6/ --with-png=/usr/local/lib/
--with-zlib=/usr/local/zlib/ --with-freetype=/usr/local/freetype/
make;make install
############################################
#
INSTALL php
cd /opt
tar -zxvf php-5.2.5.tar.gz
mkdir -p
/usr/local/php
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-libxm-dir=/usr/local/libxml2 --with-png-dir=/usr/local/lib
--with-jpeg-dir=/usr/local/jpeg6 --with-zlib=/usr/local/zlib
--with-freetype-dir=/usr/local/freetype --with-gd=/usr/local/gd2
--enable-mbstring=all --enable-ftp --with-config-file-path=/usr/local/php
--with-pdo-mysql=/usr/local/mysql
make
make install
cp php.ini-dist
/usr/local/php/php.ini
#########################################
# INSTALL ZendOptimizer
cd
/opt
tar -zxvf ZendOptimizer-3.2.0-linux-glibc21-i386.tar.gz
cd
ZendOptimizer-3.2.0-linux-glibc21-i386
./install
echo "LINUX+MYSQL+APACHE2+PHP5+ZEND INSTALL OK"