nginx的安装
rpm -ivh nginx-1.16.0-1.el7.ngx.x86_64.rpm
开启nginx
[root@hadoop01 ~]# cd /usr/sbin
[root@hadoop01 sbin]# nginx
查看是否开启
输入命令,查看80端口是否开启
[root@hadoop01 sbin]# netstat -na |grep 80
出现80端口,表示已经开启
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 192.168.203.11:22 192.168.203.1:58048 ESTABLISHED
unix 3 [ ] STREAM CONNECTED 26380
在主机浏览器输入虚拟机IP地址
192.168.203.11
出现以下,表示nginx安装成功
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
Thank you for using nginx.