HTTP(Open TCP port 80)Use (change current settings and save)
[[email protected]]$ sudo firewall-cmd --add-service http
[[email protected]]$ sudo firewall-cmd --add-service http --permanent
success
HTTPS(Open TCP port 443)Use (change current settings and save)
[[email protected]]$ sudo firewall-cmd --add-service https
[[email protected]]$ sudo firewall-cmd --add-service https --permanent
success
Installation
sudo yum install nginx
Answer y because there are the following questions on the way
Total download size: 4.3 M
Installed size: 14 M
Is this ok [y/d/N]: y
start
[[email protected]]$ sudo systemctl start nginx
End
[[email protected]]$ sudo systemctl stop nginx
Reboot
[[email protected]]$ sudo systemctl restart nginx
Reload configuration file
[[email protected]]$ sudo systemctl reload nginx
Status display
[[email protected]]$ sudo systemctl status nginx -l
/var/log/nginx/error.log
Like the shell script, you can comment out with "#".
Recommended Posts