- 安装所需依赖
yum -y install gcc pcre pcre-devel gd zlib zlib-devel pcre-devel openssl openssl-devel gd-devel
apt-get install gcc pcre pcre-devel gd zlib zlib-devel pcre-devel openssl openssl-devel gd-devel
下载nginx
通过官网下载最新的nginx: http://nginx.org/en/download.html
3. 安装nginxtar -zxvf [nginx名称]
#进入nginx目录
cd [nginx名称]
#编译nginx,带有https模块
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
#安装
sudo make
sudo make install