标签:style blog http color os cti
神一样的堕落了,以前搭建任何linux下的服务不费吹灰之力,现在搭建一个nginx居然老是想着找运维的小伙伴了。
岁月催人老啊。。。看到小伙伴们如此的忙碌,我选择自己动手丰衣足食吧,过程记录下。
wget http://nginx.org/download/nginx-1.7.3.tar.gz
我是在centOS 5.6下弄得,这个是64位。因为这边需要测试一个自己用python写的agent。
下载以后很简单的解压、编译,这个过程遇到一些比较蛋疼的事情。具体如下:
./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.
甚是蛋疼,看了下缺少pcre-devel,直接安装。
接着配置看看,然后又开始报了。
./configure: error: the HTTP gzip module requires the zlib library. You can either disable the module by using --without-http_gzip_module option, or install the zlib library into the system, or build the zlib library statically from the source with nginx by using --with-zlib=<path> option.
尼玛。。还能不能消停。。。
接着安装zlib-devel吧。。。
make -j 4 make install
老规矩安装呗。。。
接着装完以后,就是这样得。。。
[root@localhost sbin]# ./nginx -h nginx version: nginx/1.7.3 Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives] Options: -?,-h : this help -v : show version and exit -V : show version and configure options then exit -t : test configuration and exit -q : suppress non-error messages during configuration testing -s signal : send signal to a master process: stop, quit, reopen, reload -p prefix : set prefix path (default: /usr/local/nginx//) -c filename : set configuration file (default: conf/nginx.conf) -g directives : set global directives out of configuration file
好吧,一切都狠顺利,接着配置呗。。想让人家启动得配置好撒。。
搭建nginx在centos5.6测试环境,布布扣,bubuko.com
标签:style blog http color os cti
原文地址:http://www.cnblogs.com/xiaoCon/p/3840105.html