我们今天来学习一下如何安装源码包。以安装Apache为例(注意要把系统自带的删除掉)
1.下载httpd源码包并解压
2.安装Development tools包组(这个包组里有make等工具。)
3.查看README INSTALL文件
4.编译安装:
(1)./configure --prefix=/app/apache22 --sysconfdir=/etc/apache22 --enable-rewrite
(2)make(路径要在包里面)
(3)make install (需root权限)
5.将路径添加到PATH变量中,开启Apache
export PATH=$PATH:/app/apache24/bin
apachectl start
6.清空防火墙
centos7:systemctl stop firewalld.service
systemctl disable firewalld.service
centos6:service iptables stop
service iptables save
7.查看端口:
netstat -tnl
8.修改文件;并在浏览器打开
vim /app/apache24/htdocs/index.html
转载于:https://blog.51cto.com/13560258/2069590