CentOS下apache+ mysql + php安装手记录

#特别注意,后面所有带devel后缀的包,是对应模块的开发包(头文件)
#php依赖很多的库,用yum安装非常省事省力。
 
#安装mysql
yum install mysql
yum install mysql-server
yum install mysql-devel
#下载httpd-2.2.22.tar.gz
httpd-2.2.22 :
 ./configure –prefix=/usr/local/apache2  –enable-mods-shared=all  –enable-rewrite –enable-shared=max
 
 
配置前先安装依赖的库
yum install gd gd-devel
yum install freetype freetype-devel
yum install png png-devel
yum install zlib zlib-devel
yum install jpeg jpeg-devel
yum install gdbm gdbm-devel
 
配置php
./configure –prefix=/usr/include/local/php –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/include/mysql –enable-force-cgi-redirect –with-freetype-dir=/usr/include –with-png-dir=/usr/include –with-gd –enable-gd-native-ttf –with-ttf –with-gdbm –with-gettext –with-iconv –with-jpeg-dir=/usr/include –with-png –with-zlib –with-xml –enable-calendar –with-mysqli=/usr/bin/mysql_config 
 
编译安装
make 1>/dev/null
make install

回复

你的邮件地址不会被公开(Your email address will not be published.) Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>