软件工程
当前位置 :首页信息技术软件工程

centos下安装nginx_substitutions_filter全过程

来源: 作者: 时间:2013-07-13 点击:
1、yum安装nginx
 
2、下载substitutions4nginx
yum install subversion
svn checkout
http://substitutions4nginx.googlecode.com/svn/trunk/ substitutions4nginx-read-only
mv substitutions4nginx-read-only /usr/share/
 
3、编译安装nginx
wget
http://nginx.org/download/nginx-0.8.55.tar.gz
tar -zxvf nginx-0.8.55.tar.gz
cd nginx-0.8.55
./configure 原有配置 --add-module=/tmp/substitutions4nginx-read-only
make
make install
/etc/init.d/nginx restart

其中“原有配置”为运行nginx -V命令后得到的configure arguments
参考结果:
./configure --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-file-aio --with-mail_ssl_module --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --add-module=/usr/share/substitutions4nginx-read-only/

 在configure的过程中出现错误的解决方法如下:
(1)、若出现错误提示:./configure: error: the HTTP rewrite module requires the PCRE library.
则执行一下命令:
yum -y install pcre-devel openssl openssl-devel

(2)、若出现错误提示:./configure: error: the HTTP XSLT module requires the libxml2/libxslt
则执行一下命令:
yum -y install libxml2-devel libxslt-devel

(3)、若出现错误提示:./configure: error: the HTTP image filter module requires the GD library.
则执行一下命令:
yum -y install gd-devel

(4)、若出现错误提示:./configure: error: the GeoIP module requires the GeoIP library.
则执行一下命令:
yum -y install geoip-devel

 

上一篇:
下一篇: 已经是最后一篇
最新评论共有 位网友发表了评论
发表评论
用户名: 密码: 游客发言不需要密码