列一下我要安装的所有东西:
mysql,php,apache,gd2,jpegsrc,freetype,libpng,zlib
安装顺序
1,apache:
官网有下。首先要看你的机子是否以前有了httpd了,有的话我们可以用,也可以不用,我是不用的,不用的话就要删除。
chkconfig | grep httpd
看看有没有,有的话就要删除。
yum -remove httpd
它会寻找关联文件,一并删除,我们只管按Y就行了。好了,接下来就安装吧。进入download文件夹,
tar zxvf httpd-2.2.17.tar.gz
cd httpd-2.2.17
./configure –prefix=/usr/local/work/apache -enable-so -enable-rewrite
make
make install
安装好了。我们测试一下,/usr/local/work/apache/bin/apachectl -t,只要输出为 Syntax OK 就能正常启动apache了。
然后
添加到自启动 #cp /usr/local/work/apche/bin/apachectl /etc/rc.d/init.d/httpd
然后 vi /etc/rc.d/init.d/httpd 添加(#!/bin/sh下面)
#chkconfig: 2345 10 90
# description: Activates/Deactivates Apache Web Server
最后,运行chkconfig把Apache添加到系统的启动服务组里面:
# chkconfig –add httpd
# chkconfig httpd on
重新起一下,然后在浏览器中打开localhost看,it works 就说明成功了。
2.mysql
我下载的是官网的general包,名字是MySQL-5.5.10-1.linux2.6.i386.tar。
解压缩出来,双击这些rpm包,它就会自动安装,装好了,在终端中输入mysql,他进去了,就说明安好了。
3.freetype
tar zxvf freetype-2.4.4.tar.gz
cdfreetype-2.4.4
./configure –prefix=/usr/local/work/freetype
make
make install
4.jpeg
tar zxvf jpegsrc.v8c.tar.gz
cd jpeg-8
./configure –prefix=/usr/local/work/jpeg
5.zlib
tar zxvf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure –prefix=/usr/local/work/zlib
6.libpng
tar zxvf libpng-1.5.1.tar.gz
cd libpng-1.5.1
./configure –prefix=/usr/local/work/libpng
7.GD2
ln -s /usr/local/work/libpng/include/pngconf.h /usr/include
ln -s /usr/local/work/libpng/include/png.h /usr/include
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure –prefix=/usr/local/work/gd2 –with-freetype=/usr/local/work/freetype –with-png=/usr/local/work/libpng –with-jpeg=/usr/local/work/jpeg
make
make install
8.php
tar zxvf php-5.3.6.tar.gz
cd php-5.3.6
./configure –prefix=/usr/local/work/php –with-gd=/usr/local/work/gd2
–with-apxs2=/usr/local/work/apache/bin/apxs –enable-mbregex
–enable-bcmath –with-mysql –with-zlib-dir –enable-mbstring=all
–with-pdo-mysql –with-freetype-dir=/usr/local/work/freetype
安装好了,就要改配置了。在/usr/local/work/apache/conf/httpd.conf中插入LoadModule php5_module modules/libphp5.so在之间插入行”AddType application/x-httpd-php.php”,确认无误后。手动启动apache,service httpd restart.安装结束。
Zend Optimizer 就很简单了好像都不会出现错误.
顶啊,顶。。。