CentOs6.5 安装Nginx 负载均衡软件总结

今天在搭建Nginx+Tomcat 负载均衡环境的时候,遇到了很多之前 的问题,现在总结如下:

问题错误一:

make[1]: Entering directory `/root/nginx'
cd /server/openssl \
        && make clean \
        && ./config --prefix=/server/openssl/openssl no-shared  no-threads \
        && make \
        && make install
make[2]: Entering directory `/server/openssl'
make[2]: *** No rule to make target `clean'.  Stop.
make[2]: Leaving directory `/server/openssl'
make[1]: *** [/server/openssl/openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory `/root/nginx'
make: *** [build] Error 2

解决问题的办法:

编译代码了也就是  with-openssl=/______这个路径指向你的源码安装包路径而不是你安装后的路径!

–with-pcre Nginx的rewrite功能需要使用pcre库才能工作,而Nginx的编译参数里面的这个选项并不是像常规的那样指定pcre的安装目录,而是指定pcre源代码的目录。

--with-zlib 跟openssl 和pcre 的安装方式相识:指定的是源码的安装包而不是安装路径


CentOS 6.5 安装Nginx 负载均衡软件实列:

1、解压安装包

# tar zxvf nginx-1.6.2.tar.gz

2、进入安装包目录

[root@bogon src]# cd nginx-1.6.2
3、编译安装

[root@bogon nginx-1.6.2]# ./configure --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.37  (pcre源码安装路径)  --with-openssl=/usr/local/openssl-1.0.1g  (openssl 源码安装路径)  --with-zlib=/usr/local/zlib-1.2.8
4、编译和安装

[root@bogon nginx-1.6.2]# make
[root@bogon nginx-1.6.2]# make install
5、查看nginx 版本信息

[root@bogon nginx-1.6.2]# /usr/local/webserver/nginx/sbin/nginx -v
相关Nginx相关配置请参考:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值