今天在搭建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-pcreNginx的rewrite功能需要使用pcre库才能工作,而Nginx的编译参数里面的这个选项并不是像常规的那样指定pcre的安装目录,而是指定pcre源代码的目录。
--with-zlib 跟openssl 和pcre 的安装方式相识:指定的是源码的安装包而不是安装路径
CentOS 6.5 安装Nginx 负载均衡软件实列:
1、解压安装包
# tar zxvf nginx-1.6.2.tar.gz
[root@bogonsrc]# cd nginx23、编译安装
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.84、编译和安装
make
make install5、查看nginx 版本信息
usr/nginxsbinv相关Nginx相关配置请参考:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。