apache

简介:

#####编译安装apache

浏览器下载

      wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz  
     wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz  
     wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip 



wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
yum install unzip
unzip -o pcre-8.10.zip
./configure --prefix=/usr/local/pcre
make && make install


wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz 
./configure --prefix=/usr/local/apr
make && make install


wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
make clean
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr
make && make install

rpm -qa|grep http*
rpm -e --nodeps httpd-tools-2.2.15-47.el6.centos.x86_64
rpm -e --nodeps httpd-2.2.15-47.el6.centos.x86_64
rpm -qa|grep http*

wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.17.tar.gz
tar zxf httpd-2.4.17.tar.gz 
cd httpd-2.4.17
./configure --prefix=/usr/local/apache --enable-rewrite --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre

/usr/local/apache/bin/apachectl start/stop/restart


=====================

#1 安装依赖包
yum -y install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel
zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel
 krb5 krb5-devel libidn libidn-devel openssl openssl-devel


#2 安装PHP

./configure --prefix=/application/php-5.4.38  --enable-fpm --with-mcrypt --enable-mbstring --disable-pdo --with-curl --disable-debug  --disable-rpath --enable-inline-optimization --with-bz2  --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-mysqli --with-gd --with-jpeg-dir


#4 安装apache前必须先安装
    wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz  
    wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz  
    wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip   

#3 apache安装
 wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.23.tar.gz

./configure --prefix=/usr/local/apache --enable-rewrite --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --with-apxs2=/usr/local/bin/apxs

make
make install

cd /usr/local/apache/conf
cat httpd.conf|egrep -v ';|#|^$'



本文转自cloves 51CTO博客,原文链接:http://blog.51cto.com/yeqing/1702851

相关文章
|
9月前
|
应用服务中间件 Shell PHP
Apache
Apache(音译为阿帕奇)是世界使用排名第一的Web服务器软件。它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的Web服务器端软件之一。它快速、可靠并且可通过简单的API扩充,将Perl/Python等解释器编译到服务器中。
164 0
|
Apache
Apache Plusar社区资源总结
Apache Plusar社区资源总结
89 0
|
前端开发 Shell Apache
|
Apache 数据安全/隐私保护 网络协议
|
消息中间件 Apache
|
Apache 数据安全/隐私保护 Python
|
Web App开发 PHP Apache