一、下载相关软件包
cd /usr/local/src
Mysql(免编译版本): wget http://syslab.comsenz.com/downloads/linux/mysql-5.1.55-linux-i686-glibc23.tar.gz
Apache: wget http://syslab.comsenz.com/downloads/linux/httpd-2.2.16.tar.gz
PHP: wget http://syslab.comsenz.com/downloads/linux/php-5.3.10.tar.bz2
Zend Guard Loader(for php5.3): http://www.zend.com/en/products/guard/thank-you-zend-guard-loader-optimizer?package=419 PHP5.2及以前版本称为Zend Optimizer
二、安装Mysql
useradd mysql
tar -xvzf mysql-5.1.55-linux-i686-glibc23.tar.gz
mv mysql-5.1.55-linux-i686-glibc23 /usr/local/mysql
cd /usr/local/mysql
cp ./support-files/my-small.cnf /etc/my.cnf
chmod -R mysql:root /usr/local/mysql
./scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql
./bin/mysqld_safe &
查看是否已经启动 ./bin/mysql -uroot
二、安装apache
tar -xvzf httpd-2.2.16.tar.gz
cd httpd-2.2.16
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support --disable-userdir > temp.txt
make > temp.txt
make install > temp.txt
cd /usr/lcoal/apache2
./bin/apachectl start
看看有没有启动成功 http://domain/
三、安装php5.3.10
首先安装相关的包
(1)安装re2c
wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download
tar -zxvf re2c-0.13.5.tar.gz
cd re2c-0.13.5
./configure && make && make install
(2)
yum install libmcrypt libmcrypt-devel
yum install libjpep*
yum install libjpeg*
yum install freetype freetype-devel
tar -xvjf php-5.3.10.tar.bz2
cd php-5.3.10
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --enable-force-cgi-redirect --with-gd --with-ttf --with-openssl --enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-freetype-dir --with-zlib --with-gettext --with-curl --with-iconv --with-bz2 --with-mcrypt --enable-soap --enable-sockets --enable-mbstring=all --enable-bcmath --enable-ftp > temp.txt
make > temp.txt
make install > temp.txt
php安装完成,验证是否安装成功
vim /usr/local/apache2/conf/http.conf