==========下载安装包===========
所有安装包下载到 /usr/local/src 目录下
安装GD库和GD库所需的环境
zlib
#wget
jpeg
freetype
#wget
png
#wget
GD
#wget
libxml
#wget
安装apache 需要的环境
#wget -c
#wget -c
#wget -c
#wget -c
phpmyadmin2.11.5.2
#wget v2.11.5.2.rar
Zend3.3
#wget
php5.2.5
#wget
mysql5.051
#wget -free.net/mysql_mirror/Downloads/MySQL-5.0/mysql-5.0.51a.tar.gz
=================== 安装 mysql ==============
1.先安装ncurses-devel-5.5-24.20060715.i386.rpm
#rpm -ivh ncurses-devel-5.5-24.20060715.i386.rpm
2.编译mysql
#groupadd mysql
#useradd -g mysql mysql
#cd /usr/local/src
#tar xzvf mysql-5.0.51a.tar.gz
#cd mysql-5.0.51a
#./configure --prefix=/usr/local/mysql --datadir=/usr/local/mysql/data
#make && make install
#cp support-files/my-medium.cnf /etc/my.cnf
(修改 bin/mysql_install_db 如下 :指定 ldata=/infowarelab/mysql/data)
#cd /usr/local/mysql
#bin/mysql_install_db --user=mysql
#chown -R root .
#chown -R mysql data
#chgrp -R mysql .
#cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
#chmod +x /etc/init.d/mysql
(修改 /etc/init.d/mysql 如下:
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data)
#chkconfig --add mysql
#chkconfig --level 345 mysql on
================ 安装 apache2.2.9 ==================
1.安装openssl
#rpm -ivh zlib-devel-1.2.3-3.i386.rpm
#cd /usr/local/src
#tar xzvf openssl-0.9.8g.tar.gz
#cd openssl-0.9.8g
#./config --openssldir=/usr/local/openssl \
shared \
zlib \
threads
#make && make install
#cp /usr/local/openssl/lib/libssl.so.0.9.8 /lib
#cp /usr/local/openssl/lib/libcrypto.so.0.9.8 /lib/
2.安装 apr
#cd /usr/local/src
#tar zxfv apr-1.3.2.tar.gz
#./configure --prefix=/usr/local/apr \
--enable-threads
#make && make install
3.安装 apr-util
#cd /usr/local/src
#tar zxfv apr-util-1.3.2.tar.gz
#cd apr-util-1.3.2
#./configure --prefix=/usr/local/apr-util \
--with-apr=/usr/local/apr
#make && make install
4.安装 apache
#cd /infowarelab/src
#tar zxfv httpd-2.2.9.tar.gz
#cd httpd-2.2.9
#./configure \
--prefix=/usr/local/apache2 \
--enable-so \
--enable-rewrite \
--enable-vhost-alias=shared \
--enable-cache=shared \
--enable-file-cache=shared \
--enable-disk-cache=shared \
--enable-mem-cache=shared \
--enable-proxy=shared \
--enable-proxy-http=shared \
--enable-proxy-ajp=shared \
--enable-proxy-balancer=shared \
--enable-proxy-connect=shared \
--disable-proxy-ftp \
--disable-userdir \
--disable-asis \
--enable-ssl \
--with-ssl=/usr/local/openssl \
--with-mpm=worker \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util
#make && make install
5.创建一个httpd启动脚本,内容如下:
#cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
#vi /etc/init.d/httpd
在第三行添加以下两行内容
#chkconfig:345 85 15
#description: Start and stops the Apache HTTP Server.
#chmod +x /etc/rc.d/init.d/httpd
#chkconfig --add httpd
============== 安装GD,PNG,PHP ===============
1.安装ZLIB2
#tar zxvf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure --prefix=/usr/local/zlib
#make && #make install
2.安装PNG
#tar zxvf libpng-1.2.29.tar.gz
#cd libpng-1.2.29
#./configure --prefix=/usr/local/libpng
#make && make install
3.安装freetype
#tar xzvf freetype-2.3.5.tar.gz
#cd freetype-2.3.5
#./configure
#make && make install
4.安装JPEG6
#tar zxvf jpegsrc.v6b.tar.gz
#cd jpeg-6b
#mkdir -pv /usr/local/jpeg/{,bin,lib,include,man/man1,man1}
#./configure --prefix=/usr/local/jpeg --enable-shared --enable- static
#make && make install
5:安装GD
#tar zxvf gd-2.0.35.tar.gz
#cd gd-2.0.35
#./configure --prefix=/usr/local/gd --with-zlib=/usr/local/zlib/
--with-png=/usr/local/libpng --with-jpeg=/usr/local/jpeg/
--with-freetype=/usr/local/freetype/
#make && make install
6.安装LIBXML
#tar zxvf libxml2-2.6.31.tar.gz
#cd libxml2-2.6.31
#./configure --prefix=/usr/local/libxml2
#make && make install
7.安装PHP5.2.5
#cd /usr/local/mysql/lib/mysql/
#ln -s libmysqlclient.so.15.0.0 libmysqlclient_r.so
#tar zxvf php-5.2.5.tar.gz
#cd php-5.2.5
#./configure --prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-jpeg-dir=/usr/local/jpeg \
--with-freetype-dir=/usr/local/include/freetype \
--with-zlib \
--with-png-dir=usr/local/libpng \
--with-libxml-dir=/usr/local/libxml \
--with-gd \
--enable-ftp \
--enable-sockets
#make
#make test
#make install
配置
#cp php.ini-dict /usr/local/php/lib/php.ini
编辑httpd.conf
#vi /usr/local/apache2/conf/httpd.conf
加上下面3行
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
8. 安装zend
#tar xzvf ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz
#cd ZendOptimizer-3.3.0a-linux-glibc21-i386
#./install
阅读(1799) | 评论(0) | 转发(0) |