centos mysql+httpd+php 编译安装

下载以下安装包

apr-1.4.5.tar.gz
apr-util-1.3.12.tar.gz
httpd-2.4.18.tar.gz
libgd-gd-2.1.1.tar.gz
libmcrypt-2.5.7.tar.gz
mysql-5.1.73.tar.gz
php-5.5.33.tar.gz

pcre-8.10.zip


mysql 编译:

./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-unix-socket-path=/var/lib/mysql/mysql.sock --enable-thread-safe-client --with-plugins=partition


apr 编译
./configure


apr-util 编译
./configure --with-apr=/usr/local/apr


httpd 编译
./configure --prefix=/usr/local/apache2  --enable-so --enable-rewrite --enable-module=all --enable-shared=max --enable-cgi


libgd 编译

./configure --prefix=/usr/local/gd


php 编译
./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-xpm-dir=/usr/lib64/  --with-libxml-dir=/usr/lib64 --with-mysqli=/usr/local/mysql/bin/mysql_config --with-gd=/usr/local/gd   --with-png-dir=/usr/lib64 --with-jpeg-dir=/usr/lib64  --with-zlib --with-freetype-dir=/usr/lib64 --with-apxs2=/usr/local/apache2/bin/apxs --with-curl=/usr/lib64   --enable-fastcgi --enable-force-cgi-redirect --with-mcrypt=/usr/local/mcrypt


make时报错:
php-5.5.33/ext/gd/gd.c:57:22: error: X11/xpm.h: No such file or directory

http://vault.centos.org/6.2/os/x86_64/Packages/

下载并安装libXpm-devel-3.5.8-2.el6.x86_64.rpm 

rpm -ivh libXpm-devel-3.5.8-2.el6.x86_64.rpm


配置httpd

进入/usr/local/apache2/conf配置httpd.conf, 

修改Listen 项目,加入端口

修改ServerName项目,加入域名

加入解析PHP的配置:

AddType application/x-httpd-php  .php
AddType application/x-httpd-php  .html

另外检查是否存在LoadModule php5_module        modules/libphp5.so


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值