Nginx 安装部署
Nginx,一个被贴满,高性能,低消耗,低成本标签的web服务器,相信很多人都有耳闻,本篇文章将介绍Nginx如何进行安装和部署。
1、安装部署
1.1、下载Nginx压缩包
[root@localhost soft]# wget http://nginx.org/download/nginx-1.13.6.tar.gz
1.2、解压
[root@localhost soft]# tar -zxvf nginx-1.13.6.tar.gz
1.3、配置
[root@localhost soft]# ll
总用量 2652
drwxr-xr-x. 8 1001 1001 4096 10月 10 2017 nginx-1.13.6
-rw-r--r--. 1 root root 989760 10月 10 2017 nginx-1.13.6.tar.gz
……
[root@localhost soft]# cd nginx-1.13.6
[root@localhost nginx-1.13.6]# ./configure
1.4、编译
[root@localhost nginx-1.13.6]# make
1.5、安装
[root@localhost nginx-1.13.6]# make install
1.6、启动
[root@localhost nginx-1.13.6]# cd /usr/local/nginx/sbin/
[root@localhost sbin]# ./nginx
1.7、查看nginx服务启动没有
[root@localhost sbin]# ps -ef|grep nginx
root 11134 1 0 00:25 ? 00:00:00 nginx: master process ./nginx
nobody 11135 11134 0 00:25 ? 00:00:00 nginx: worker process
root 11139 3212 0 00:25 pts/0 00:00:00 grep --color=auto nginx
1.8、查看ip地址
[root@localhost sbin]# ifconfig
1.9、访问浏览器(ip:port)
若出现如下图片则说明安装成功