## 安装依赖 `prce`(重定向支持)和`openssl`(`https`支持) 1. `yum install -y pcre-devel` 2. `yum -y install gcc make gcc-c++ wget` 3. `yum -y install openssl openssl-devel` ## 处理`nginx`安装包 [点击下载](http://nginx.org/download/) 1. `wget http://nginx.org/download/nginx-1.13.3.tar.gz` 2. `tar -zxvf nginx-1.13.3.tar.gz` ## 编译安装 ``` cd nginx-1.13.3 ./configure --prefix=/usr/local//nginx --with-http_ssl_module make && make install ``` ## 设置nginx全局命令 1. 打开`~/.bash_profile`文件 2. 追加以下内容 ``` PATH=$PATH:$HOME/bin:/usr/local/nginx/sbin/ export PATH ``` 3. 运行`source ~/.bash_profile`