码迷,mamicode.com
首页 > Web开发 > 详细

CentOS 7上安装Apache

时间:2019-09-07 01:16:20      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:art   code   cti   cal   centos   active   修改   pac   connect   

 

安装apache
yum install httpd


vi /etc/httpd/conf/httpd.conf
修改默认端口为81


service httpd start
netstat -nltp


[root@xxx html]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:81              0.0.0.0:*               LISTEN      101785/httpd        



sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

sudo systemctl status httpd
sudo systemctl enable httpd
sudo systemctl stop httpd
sudo systemctl start httpd

sudo yum install httpd
sudo yum reinstall httpd

netstat -nltp

 

CentOS 7上安装Apache

标签:art   code   cti   cal   centos   active   修改   pac   connect   

原文地址:https://www.cnblogs.com/sea-stream/p/11478880.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!