nginx安装最简单教程

[root@bogon ~]# wget -c http://nginx.org/download/nginx-1.7.9.tar.gz #下载安装包
[root@bogon ~]# tar zxvf nginx-1.7.9.tar.gz #解压
[root@bogon ~]# cd nginx-1.7.9/
[root@bogon nginx-1.7.9]# yum -y install gcc-c++ pcre-devel zlib-devel #安装依赖,主要是安装这些,而接下来的三步则是编译安装必须执行的,其中prefix选项是指安装位置
[root@bogon nginx-1.7.9]# ./configure --prefix=/usr/etc/nginx
[root@bogon nginx-1.7.9]# make
[root@bogon nginx-1.7.9]# make install
[root@bogon nginx-1.7.9]# cd /usr/etc/nginx
[root@bogon ngin]# cd sbin
[root@bogon sbin]# ./nginx #启动服务,现在访问localhost就能看到nginx的欢迎界面了

原文地址:https://www.cnblogs.com/biaopei/p/9199599.html