Linux安装Nginx
1.Linux前置环境准备(gcc,openssl等):
yum -y install gcc pcre-devel zlib-devel openssl openssl-devel
2.下载Nginx安装包:
3.将安装包上传至服务器后(/usr/local/)解压编译安装
## 解压 cd /usr/local/ tar -zxvf nginx-1.17.8.tar.gz ##进入nginx目录 cd nginx-1.17.8/ ## 配置(包含ssl模块) ./configure --prefix=/usr/local/nginx --with-http_ssl_module ## make make make install ## 测试nginx #cd到刚才配置的安装目录
cd /usr/local/nginx/ ./sbin/nginx -t
#启动nginx
./sbin/nginx
To the world you may be one person, but to one person you may be the world