通过下载包的方式进行nginx的安装
1.下载nginx包。
[root@localhost ~]# wget http://nginx.org/download/nginx-1.10.1.tar.gz
2.复制包到你的安装目录
[root@localhost ~]# cp nginx-1.10.1.tar.gz /usr/local/
3.解压
[root@localhost ~]# tar -zxvf nginx-1.10.1.tar.gz
[root@localhost ~]# cd nginx-1.10.1
4.启动nginx(nginx的路径为:/usr/local/nginx/sbin/nginx)
[root@localhost ~]# nginx
5.查看版本s
[root@localhost ~]# nginx -v
6.url访问nginx localhost或127.0.0.1
这里的ip地址为安装了nginx服务的那台机器
更多博客文章请访问:
https://blog.csdn.net/xudailong_blog/article/details/78762262