HTTP(Open TCP port 80)Use (change current settings and save)
[user@host]$ sudo firewall-cmd --add-service http
[user@host]$ sudo firewall-cmd --add-service http --permanent
success
HTTPS(Open TCP port 443)Use (change current settings and save)
[user@host]$ sudo firewall-cmd --add-service https
[user@host]$ 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
[user@host]$ sudo systemctl start nginx
End
[user@host]$ sudo systemctl stop nginx
Reboot
[user@host]$ sudo systemctl restart nginx
Reload configuration file
[user@host]$ sudo systemctl reload nginx
Status display
[user@host]$ sudo systemctl status nginx -l
/var/log/nginx/error.log
Like the shell script, you can comment out with "#".
Recommended Posts