编译apache2.4.7
2014-03-17 00:00
246 查看
1.下载httpd-2.4.7.tar.gz
[root@gyf soft]# wget http://apache.dataguru.cn//httpd/httpd-2.4.7.tar.gz 2.解压
[root@gyf soft]# tar xvf httpd-2.4.7.tar.gz
[root@gyf soft]# cd httpd-2.4.7
[root@gyf httpd-2.4.7]# vim INSTALL
$ ./configure --prefix=PREFIX
$ make
$ make install
$ PREFIX/bin/apachectl start
3.编译安装apr
[root@gyf soft]# wget http://mirrors.cnnic.cn/apache//apr/apr-1.5.0.tar.gz [root@gyf soft]# cd apr-1.5.0
[root@gyf apr-1.5.0]# ./configure --prefix=/etc/apr
[root@gyf apr-1.5.0]#make && make install
4.编译安装apr-util
[root@gyf soft]# wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.5.3.tar.gz [root@gyf soft]# cd apr-util-1.5.3
[root@gyf soft]#./configure --prefix=/etc/apr-util --with-apr=/etc/apr
[root@gyf soft]#make && make install
5.编译安装httpd
[root@gyf httpd-2.4.7]# ./configure --prefix=/usr/local/httpd --sysconfdir=/usr/local/httpd/conf/ --enable-so --enable-rewirte --enable-ssl --enable-cgi --enable-cgid --enable-modules=most --enable-mpms-shared=all --with-apr=/etc/apr --with-apr-util=/etc/apr-util
[root@gyf httpd-2.4.7]#make && make install
--prefix= :指定安装目标路径
--sysconfdir= :指定配置文件安装位置
--enable-so :支持动态共享模块,如果没有这个模块PHP将无法与apache结合工作
--enable-rewirte :支持URL重写
--enable-ssl :启用支持ssl
--enable-cgi :启用支持cgi
--enable-cgid :启用支持带线状图形的CGI脚本 MPMs
--enable-modules=most :安装大多数模块
--enable-modules-shared=most :安装大多数共享模块
--enable-mpms-shared=all :支持全部多道处理方式
--with-apr=/etc/apr :指定apr路径
--with-apr-util=/etc/apr-util :指定apr-util路径
6.apache自启动
#cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/httpd #把apache加入到系统启动
cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd
#!/bin/sh
#chkconfig:2345 10 90
#descrption:Activates/Deactivates Apache Web Server
chmod +x /etc/init.d/httpd
chkconfig --add httpd
/etc/init.d/httpd start
#设置开机启动
chkconfig httpd on
[root@gyf soft]# wget http://apache.dataguru.cn//httpd/httpd-2.4.7.tar.gz 2.解压
[root@gyf soft]# tar xvf httpd-2.4.7.tar.gz
[root@gyf soft]# cd httpd-2.4.7
[root@gyf httpd-2.4.7]# vim INSTALL
$ ./configure --prefix=PREFIX
$ make
$ make install
$ PREFIX/bin/apachectl start
3.编译安装apr
[root@gyf soft]# wget http://mirrors.cnnic.cn/apache//apr/apr-1.5.0.tar.gz [root@gyf soft]# cd apr-1.5.0
[root@gyf apr-1.5.0]# ./configure --prefix=/etc/apr
[root@gyf apr-1.5.0]#make && make install
4.编译安装apr-util
[root@gyf soft]# wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.5.3.tar.gz [root@gyf soft]# cd apr-util-1.5.3
[root@gyf soft]#./configure --prefix=/etc/apr-util --with-apr=/etc/apr
[root@gyf soft]#make && make install
5.编译安装httpd
[root@gyf httpd-2.4.7]# ./configure --prefix=/usr/local/httpd --sysconfdir=/usr/local/httpd/conf/ --enable-so --enable-rewirte --enable-ssl --enable-cgi --enable-cgid --enable-modules=most --enable-mpms-shared=all --with-apr=/etc/apr --with-apr-util=/etc/apr-util
[root@gyf httpd-2.4.7]#make && make install
--prefix= :指定安装目标路径
--sysconfdir= :指定配置文件安装位置
--enable-so :支持动态共享模块,如果没有这个模块PHP将无法与apache结合工作
--enable-rewirte :支持URL重写
--enable-ssl :启用支持ssl
--enable-cgi :启用支持cgi
--enable-cgid :启用支持带线状图形的CGI脚本 MPMs
--enable-modules=most :安装大多数模块
--enable-modules-shared=most :安装大多数共享模块
--enable-mpms-shared=all :支持全部多道处理方式
--with-apr=/etc/apr :指定apr路径
--with-apr-util=/etc/apr-util :指定apr-util路径
6.apache自启动
#cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/httpd #把apache加入到系统启动
cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd
#!/bin/sh
#chkconfig:2345 10 90
#descrption:Activates/Deactivates Apache Web Server
chmod +x /etc/init.d/httpd
chkconfig --add httpd
/etc/init.d/httpd start
#设置开机启动
chkconfig httpd on
相关文章推荐
- Centos编译安装 LAMP (apache-2.4.7 + mysql-5.5.35 + php 5.5.8)+ Redis
- linux centos6.5 2.6.32-431.el6.x86_64 php5.5.9 apache2.4.7 mysql5 最新快速编译安装
- Centos编译安装Apache 2.4.7
- Centos编译安装 LAMP (apache-2.4.7 + mysql-5.5.35 + php 5.5.8)+ Redis
- Centos编译安装 LAMP (apache-2.4.7 + mysql-5.5.35 + php 5.5.8)+ Redis
- linux centos6.5 2.6.32-431.el6.x86_64 php5.5.9 apache2.4.7 mysql5 最新快速编译安装
- Centos编译安装 LAMP (apache-2.4.7 + mysql-5.5.35 + php 5.5.8)+ Redis
- lamp环境编译(apache2.4.7 php5.4.25 mysql 5.5.23)
- Apache编译参数详解(linux下手工通过源码编译apache)
- 查看nginx,apache,mysql,php编译参数
- 解析ubuntu下自带Apache和自己编译安装Apache的位置
- 解决编译Apache出现的问题:configure: error: APR not found . Please read the documentation
- 用C写apache模块编译教程(经验证)
- 解决编译Apache出现的问题:configure: error: APR not found . Please read the documentation
- 解决编译Apache出现的问题:configure: error: APR not found . Please read the documentation
- 编译apache时提示“APR not found”的解决方法
- 源码编译apache
- Linux Apache 编译安装;
- 自己动手编译apache-tomcat-6.0.41-src源码
- Apache程序包编译安装的过程分享