CentOS 6.5 apache源码安装1.0版
2016-12-05 20:33
417 查看
yum install -y pcre-devel zlib-devel(可能需要安装gcc)
tar xf apr-1.5.2.tar.bz2
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make
make install
cd ..
tar xf apr-util-1.5.4.tar.bz2
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make
make install
cd ..
tar xf httpd-2.4.20.tar.bz2
cd httpd-2.4.20
./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf/ --enable-so --enable--ssl --enable-cgi --enable-expires --enable-deflate --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event | tee /root/apache
make
make install
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
chmod +x /etc/init.d/httpd
service httpd start
service httpd restart
vim /usr/local/apache/conf/httpd.conf
ServerName localhost:80
vim /etc/profile.d/httpd.sh
export PATH=/usr/local/apache/bin:$PATH
. /etc/profile.d/httpd.sh
httpd -t
tar xf apr-1.5.2.tar.bz2
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make
make install
cd ..
tar xf apr-util-1.5.4.tar.bz2
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make
make install
cd ..
tar xf httpd-2.4.20.tar.bz2
cd httpd-2.4.20
./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf/ --enable-so --enable--ssl --enable-cgi --enable-expires --enable-deflate --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event | tee /root/apache
make
make install
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
chmod +x /etc/init.d/httpd
service httpd start
service httpd restart
vim /usr/local/apache/conf/httpd.conf
ServerName localhost:80
vim /etc/profile.d/httpd.sh
export PATH=/usr/local/apache/bin:$PATH
. /etc/profile.d/httpd.sh
httpd -t
相关文章推荐
- 小心服务器内存居高不下的元凶--WebAPI服务
- 推送技术原理:移动无线网络长连接
- 让你的WEB服务支持https
- 运维入门
- Apache Isis 1.4.0 发布,领域驱动开发框架
- RH436 Day3 课后总结
- 利用开源软件打造自己的全功能远程工具
- Linux5.9无人值守安装
- 数据中心和云未来的十二大趋势
- 虚拟化基础架构Windows 2008篇之11-WSUS服务器的安装与配置
- 为Windows Server 2012 R2指定授权服务器
- 为虚拟桌面配置网络负载均衡
- 用vsftp快速搭建ftp服务器
- Linux快速构建apache web服务器
- Awstats处理多apache日志
- 服务器监控策略浅谈
- 安装perl模块小窍门