搭建nginx在centos5.6测试环境

神同样的堕落了,之前搭建任何linux下的服务不费吹灰之力,如今搭建一个nginx竟然总是想着找运维的小伙伴了。
岁月催人老啊。。。看到小伙伴们如此的忙碌,我选择本身动手丰衣足食吧,过程记录下。python

wget http://nginx.org/download/nginx-1.7.3.tar.gz

 

我是在centOS 5.6下弄得,这个是64位。由于这边须要测试一个本身用python写的agent。
下载之后很简单的解压、编译,这个过程遇到一些比较蛋疼的事情。具体以下:linux

./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,直接安装。
接着配置看看,而后又开始报了。nginx

./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

 

老规矩安装呗。。。测试

接着装完之后,就是这样得。。。ui

[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

 

好吧,一切都狠顺利,接着配置呗。。想让人家启动得配置好撒。。this

相关文章
相关标签/搜索