码迷,mamicode.com
首页 > Web开发 > 详细

Centos 6安装apache 2.4

时间:2015-06-16 16:25:49      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:

 

1、准备工作,安装依赖。

yum install make apr* autoconf automake gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel gd  kernel keyutils  patch  perl kernel-headers compat* mpfr cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel krb5-devel zlib-devel libXpm* freetype libjpeg* libpng* php-common php-gd ncurses* libtool* libxml2 libxml2-devel patch

2、下载apache

  wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.12.tar.gz

  apache依赖apr

  wget http://mirror.bit.edu.cn/apache/apr/apr-1.5.2.tar.gz

  wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.5.4.tar.gz

  解压缩,然后执行一点操作。

	mv apr-1.5.2 httpd-2.4.12/srclib/apr
	mv apr-util-1.5.4 httpd-2.4.12/srclib/apr-util
	cd httpd-2.4.12

3、下载php 5.3.29

  wget http://cn2.php.net/distributions/php-5.3.29.tar.gz

  php需要Libmcrypt,安装以下

 

ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt

http://mhash.sourceforge.net/

 

 ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5/etc --with-apxs2=/usr/local/apache2/bin/apxs  --with-iconv --with-freetype --with-jpeg --with-png --with-zlib --with-libxml --enable-xml --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-force-cgi-redirect --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --enable-suhosin --enable-session --with-mcrypt

 

 

 

参考站点:

1、http://www.osyunwei.com/archives/2696.html

2、http://www.onepx.com/centos-apache-246.html

Centos 6安装apache 2.4

标签:

原文地址:http://www.cnblogs.com/dreamdale/p/4580899.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!