软件环境
系统:CentOS7
Apache Httpd版本:2.4.41
1. 安装依赖包
yum install apr-util-devel pcre-devel
2. 下载Apache Httpd Server
wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.41.tar.gz
3. 解压、安装
tar -xvf httpd-2.4.41.tar.gz
cd httpd-2.4.41
./configure
make
make install
4. 编辑Httpd配置文件
vi /usr/local/apache2/conf/httpd.conf
加入以下代码:
ServerName local:80
5. 启动Httpd、关闭防火墙
/usr/local/apache2/bin/apachectl start
systemctl stop firewalld
6. 访问测试
浏览器访问:http://192.168.0.10,出现以下画面成功: