nginx安装

来源:互联网 发布:百度云优化软件 编辑:程序博客网 时间:2024/05/02 00:46

一、前提

安装pcre-7.8.tar.gz

解压tar -xzvf pcre-7.8.tar.gz

进入到pcre-7.8目录

./configure

make && make install

二、安装nginx

解压tar -xzvf nginx-0.7.62.tar.gz

进入到nginx-0.7.62

./configure --prefix=/usr/local/server/nginx --with-openssl=/usr/include --with-pcre=../pcre-7.8 --with-http_stub_status_module --without-http_memcached_module --without-http_fastcgi_module --without-http_map_module --without-http_geo_module --without-http_autoindex_module --add-module=/usr/local/src/passport_nginx_module
说明:最后一个参数为添加的模块

make

如果make出现警告,可以到src/objs/Makefile文件里CFLAGS =  -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value  -g关掉警告!!!!去掉-Werror参数。

make install


原创粉丝点击