CentOS 5.5安装Apache2.2.6 mysql5.1.51 PHP5.2.14

一、Apache安装
下载apache ()到tmp
解压,tar –zxvf httpd-2.2.6.tar.gz
cd httpd-2.2.6
mkdir /usr/local/apache2
./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=all --enable-rewrite --enable-cache
make
make install
安装apache完成,输入命令 #/usr/local/apache2/bin/apachectl -k start
启动Apache
service httpd start

二、Mysql安装
这里下载mysql RPM(service和client),
MySQL-server-community-5.1.51-1.rhel5.i386.rpm    安装服务端
MySQL-client-community-5.1.51-1.rhel5.i386.rpm     安装客户端
MySQL-devel-community-5.1.51-1.rhel5.i386.rpm     用于php的mysql安装
rpm –ivh MySQL-server-community-5.1.51-1.rhel5.i386.rpm
rpm –ivh MySQL-client-community-5.1.51-1.rhel5.i386.rpm
rpm –ivh MySQL-devel-community-5.1.51-1.rhel5.i386.rpm

三、 PHP准备的tar包安装
安装php之前要准备:
curl-7.15.0.tar.gz
freetype-2.3.5.tar.gz
gd-2.0.35.tar.gz
gettext-0.16.1.tar.gz
jpegsrc.v6b.tar.gz
libpng-1.2.31.tar.bz2
libxml2-2.6.31.tar.gz
t1lib-5.0.0.tar.gz
tiff-3.8.2.tar.gz
zlib-1.2.3.tar.gz

3.1 安装curl-7.15.0.tar.gz
      #tar zxvf curl-7.15.0.tar.gz
      #cd curl-7.15.0
      #mkdir /usr/local/crul
      #./configure --prefix=/usr/local/curl
      #make clean
      #make
      #make install
3.2 jpegsrc.v6b.tar.gz
      #mkdir -pv /usr/local/jpeg/{,bin,lib,include,man/man1,man1}
      #./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
      #make clean
      #make
      #make install
3.3 libxml2-2.6.31.tar.gz
      #tar zxvf libxml2-2.6.31.tar.gz
      #cd libxml2
      #mkdir usr/local/libxml2
      #./configure --prefix=/usr/local/libxml2
      #make clean
      #make(时间可能稍长些)
      #make install
      #cp xml2-config /usr/bin
3.4 PDFlib-7.0.3-Linux-php.tar.gz
      #tar xvf PDFlib-7.0.3-Linux-php.tar.gz
      #cd pdflib
      #cp bind/php5/php520mt/libpdf-php.so /usr/local/lib/
      (上面的php520mt目录的同级目录中有php503,php510,php520目录,不知道是不是版本的区别)
3.5 t1lib-5.0.0.tar.gz
      #tar zxvf t1lib-5.0.0.tar.gz
      #cd t1lib
      #mkdir /usr/local/t1lib
      #./configure --prefix=/usr/local/t1lib
      #make without-doc
      #make install
3.6 freetype-2.3.5.tar.gz
      #tar zxvf freetype-2.3.5.tar.gz
      #cd freetype
      # mkdir /usr/local/freetype
      #./configure --prefix=/usr/local/freetype
      #make clean
      #make
      #make install
3.7 zlib-1.2.3.tar.gz
      #tar zxvf zlib-1.2.3.tar.gz
      #cd zlib-1.2.3
      #./configure --shared
      #make clean
      #make
      #make install
3.8 libpng-1.2.26.tar.gz
      #tar zxvf libpng-1.2.26.tar.gz
      #cd libpng
      #cp scripts/makefile.linux ./makefile
      #mkdir /usr/local/libpng
      #./configure --prefix=/usr/local/libpng
      #make clean
      #make
      #make install
3.9 gettext-0.16.tar.gz
      #tar zxvf gettext-0.16.tar.gz
      #cd gettext
      #mkdir /usr/local/gettext
      #./configure --prefix=/usr/local/gettext
      #make clean
      #make
      #make install(时间稍长)
3.10 gd-2.0.35.tar.gz
      #tar zxvf gd-2.0.35.tar.gz
      #cd gd
      #./configure --with-png=/usr/local/lib --with-zlib=/usr/local/lib --with-freetype=/usr/local/freetype/lib --with-jpeg=/usr/local/jpeg/lib
      #make clean
      #make
      #make install

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wygsgf.html