CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了CentOs6.5 安装Nginx 负载均衡软件总结大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

今天在搭建Nginx+tomcat 负载均衡环境的时候,遇到了很多之前 的问题,现在总结如下: 问题错误一: make[1]: Entering directory `/root/nginx' cd /server/openssl \ && make clean \ && ./config --prefix=/server/openssl/openssl no-sh

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

问题错误一:

@H_209_18@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-pcreNginx的rewrite功能需要使用pcre库才能工作,而Nginx的编译参数里面的这个选项并不是像常规的那样指定pcre的安装目录,而是指定pcre源代码的目录。

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


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

1、解压安装包

# tar zxvf Nginx-1.6.2.tar.gz
2、进入安装包目录
[root@bogonsrc]# cd Nginx2
3、编译安装
root@bogonNginx2 ./configure --prefix=/usr/local/webserverNginx --with-http_stub_status_module http_ssl_module pcresrc8.37  (pcre源码安装路径)  --with-openssl=/usr/local/openssl-1.0.1g  (openssl 源码安装路径)  --with-zlib=/usr/local/zlib-1.2.8
4、编译和安装
 make
 make install
5、查看Nginx 版本信息
usr/Nginxsbinv
相关Nginx相关配置请参

大佬总结

以上是大佬教程为你收集整理的CentOs6.5 安装Nginx 负载均衡软件总结全部内容,希望文章能够帮你解决CentOs6.5 安装Nginx 负载均衡软件总结所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。