nginx的安装
首先要确定gcc啊那些什么的装好
然后下载nginx
wget http://nginx.org/download/nginx-1.5.9.tar.gz
下载后解压
tar -zxvf XXXXXXXXXX.tar.gz
解压后进入目录进行编译
./configure
出现如下错误
checking for C compiler ... not found
运行安装
yum -y install gcc gcc-c++ autoconf automake make
出现
./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
这个错误运行安装
yum -y install openssl openssl-devel
编译通过之后进行安装
make 和 make install
make && make install 命令
出现
objs/Makefile:458: recipe for target 'objs/src/core/ngx_murmurhash.o' failed
make[1]: *** [objs/src/core/ngx_murmurhash.o] Error 1
make[1]: Leaving directory '/nginx-1.10.3'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
这个错误
在./configure后修改 objs目录下的Makefile这个文件,
删除-Werror这个参数然后重新make && make install安装