1.gcc 安装
yum install gcc c++
2.PCRE pcre-devel 安装
yum install -y pcre pcre-devel
3.zlib 安装
yum install -y zlib zlib-devel
4.OpenSSL 安装
yum install openssl openssl-devel
5.下载nginx
weget -c https://nginx.org/download/ngnix-1.10.1.tar.gz
6.解压nginx
tar -zxvf nginx-1.10.1.tar.gz
7.默认配置nginx
cd ngnix-1.10.1
./configure
8.安装nginx
make install
9.启动nginx
whereis nginx
cd /user/local/nginx
./nginx
10.远程访问,得到nginx响应页面
默认端口为80端口
11.添加ngnix变量,并且成功启动与关闭nignx
进入linux系统全局配置文件进行配置nignx