一、####apache 安装方式有两种
- yum intall httpd \
- tar包 源码包安装
二、 #####下面是源码包安装:
- 下载httpd软件包
wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.41.tar.gz
安装apache 之前 需先安装 apr apr-util - 解压 tar -zxf xxx.tar.gz tar -czf all.tar.gz /root/
- .configure –
prce-config for libprce not found 解决办法
yum install prce* 若单独安装prce 无法解决,必须全部安装
- make
- make install
- cd /usr/local/apache2
- [root@localhost htdocs]# ps -ef | grep httpd
root 23587 4251 0 13:06 pts/2 00:00:00 grep --color=auto httpd/
/usr/local/apache2/bin/apachectl start # 启动apache httpd
netstat - ntl|grep 80
显示未找到netstat这个命令,需要安装net-tools,就可以解决无netstat、iponfig 问题
apache 默认网站发布目录 /usr/local/apache2/htdoc
- 关闭防火墙
systemctl stop firewalld.services #停止防火墙
systemctl disable firewalld.services #禁止firewall开机启动 - 关闭 selinux
vi /etc/sysconfig/selinux
SELINUX=disabled