您的位置:首页 > 运维架构 > Nginx

linux安装nginx

2015-11-25 17:25 549 查看
1 ./configure --prefix=/export/Shell/nginx:安装目录
checking for OS
+ Linux 2.6.32-358.el6.x86_64 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
checking for gcc -pipe switch ... found
。。。。。。
checking for getaddrinfo() ... found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found

./configure: error: the HTTP rewrite module requires the PCRE library.

2.在root下:yum -y install pcre-devel , yum -y install openssl openssl-devel

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.

3.成功安装log:
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1: using system crypto library
+ using system zlib library

nginx path prefix: "/export/Shell/nginx"
nginx binary file: "/export/Shell/nginx/sbin/nginx"
nginx configuration prefix: "/export/Shell/nginx/conf"
nginx configuration file: "/export/Shell/nginx/conf/nginx.conf"
nginx pid file: "/export/Shell/nginx/logs/nginx.pid"
nginx error log file: "/export/Shell/nginx/logs/error.log"
nginx http access log file: "/export/Shell/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

4.解压目录执行:make编译源码
5.切换到root用户-执行命令:sudo su root;安装-执行命令:make install
创建软链:执行命令:ln -s /usr/local/servers/nginx/sbin/nginx /usr/local/bin/nginx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: