linux 配置nginx

安装命令:

yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
nginx下载地址:https://nginx.org/download/

## 解压
tar -zxvf nginx-1.9.9.tar.gz

##进入nginx目录
cd nginx-1.9.9
## 配置
./configure --prefix=/usr/local/nginx

# make
make
make install

测试是否安装成功

# cd到刚才配置的安装目录/usr/loca/nginx/
./sbin/nginx -t

启动nginx 

cd /usr/local/nginx/sbin
./nginx //启动nginx

你可能感兴趣的:(nginx,linux,服务器)