king

linux centos系统服务器安装apache

king linux 2021-03-22 1151浏览 0

linux centos系统服务器安装apache

1.登录服务器放行防火墙端口,如果防火墙未开启,则略过此步骤

firewall-cmd --zone=public --add-port=80/tcp --permanent     #添加80端口到防火墙

linux centos系统服务器安装apache

firewall-cmd --reload     #重载防火墙配置

linux centos系统服务器安装apache

2.安装apache

yum install -y httpd*      #下载安装apache

linux centos系统服务器安装apache

systemctl start httpd.service     #启动apache
systemctl enable httpd     #加入开机启动项

浏览器打开IP,显示apache默认页。安装apache成功

linux centos系统服务器安装apache





发表评论