1.安装apache服务器、并配置访问端口为9999
安装apache
yum install httpd -y
安装apache手册
yum install httpd-manual
将Apache服务添加到 开机自启中
systemctl start httpd
systemctl enable httpd
设置永久允许http
firewall-cmd --permanent --add-service=http
防火墙重新加载策略
firewall-cmd --reload
进入默认发布的目录,并编辑默认发布文件内容
vim /var/www/html/index.html
<h1>helloword<h1>
将访问端口设为9999
1、进入主配置目录
cd /etc/httpd/conf
2、修改主配置文件端口为9999
vim httpd.conf
3、重启httpd服务
systemctl restart httpd
如果不行则将selinux临时关闭
setenforce 0
防火墙添加9999端口号
firewall-cmd --permanent --add-port=9999/tcp
重新加载防火墙
firewall-cmd --reload