码迷,mamicode.com
首页 > 系统相关 > 详细

linux安装nginx

时间:2015-11-25 19:14:59      阅读:330      评论:0      收藏:0      [点我收藏+]

标签:

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
 
 

linux安装nginx

标签:

原文地址:http://www.cnblogs.com/mggwct/p/4995329.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!