linux 安装nginx yum
本分类下有一个环境一键安装.那这背后发生了什么呢?咱们手动使用源码进行安装. 1.首先保证有一个能联网的centos. 2.百度 ningx 官网 点download http://nginx.org/en/download.html 找到最新版的nginx下载地址. 发贴时最新的是1.12 http://nginx.org/download/nginx-1.12.0.tar.gz 3.进行centos 执行命令 #安装wget yum install wget -y #安装gcc和c++编译器 yum install gcc gcc-c++ -y 错误提示: ./configure: error: the HTTP rewrite module requires the PCRE library. 安装pcre-devel与openssl-devel解决问题 yum -y install pcre-devel openssl openssl-devel ./configure --prefix=/usr/local/nginx make make install 4.新建临时目录 /temp 然后下载并解压. 命令如下 mkdir /temp ; cd /temp ; wget http: //nginx .org /download/nginx-1 .12.0. tar .gz