关机
sudo shutdown
重启
sudo reboot
下载 apache
sudo dnf install -y httpd httpd-tools httpd-devel httpd-manual
开启 80 端口
# ServerName www.example.com:80
ServerName WebServer:80
默认访问目录
/var/www/html/
更新 linux
sudo dnf update -y
安装 zip
sudo yum -y install zip
apache
配置文件
/etc/httpd/conf/httpd.conf
查看 apache
配置是否正确
apachectl configtest
apache
启动
sudo systemctl start httpd
停止 apache
sudo systemctl stop httpd
查看 apache
状态
sudo systemctl status httpd
设置自动启动
sudo systemctl enable httpd.service