You can either disable the module by using --without-http-cache option, or install the OpenSSL libra
来源:互联网 发布:java script简明教程 编辑:程序博客网 时间:2024/05/17 08:07
系统只安装了基本系统
先创建用于Nginx运行的用户和组:
groupadd www
useradd -g www www
cd 到nginx源码根目录下,运行
./configure \
--prefix=/usr/local/nginx \
--user=www \
--group=www \
--with-http_stub_status_module \
--with-http_ssl_module
报以下错误:
./configure: error: C compiler gcc is not found
原因是没有安装gcc编译器,运行yum install gcc 安装gcc,会下载以下package:
gcc, cpp, glibc-devel, glibc-headers, kernel-headers, libgomp,大约12M左右。
再次运行./configure命令,还不能安装,出现以下错误:
./configure: error: the HTTP rewrite module requires the PCRE library.
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.
以为没有安装pcre,就运行了yum install pcre命令,系统提示已安装,百度了下,好象漏了个pcre-devel没装,运行yum install pcre-devel 后,该错误消失了。
但再运行./configure报另外一个错误:
./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.
估计是ssl的扩展没有装,运行yum install openssl-devel安装该库
这时运行./configure没有报错了。
接着运行make
make install
安装成功!
因为我是装在虚拟机里的,在虚拟机里可以访问到nginx服务,但在虚拟机外就无法访问了,原因是系统有防火墙,关掉就可以了。
关闭防火墙命令:service iptables stop(立刻生效) 或 chkconfig iptables off(重启才能生效)
编译时未指定路径,nginx默认是安装在 /usr/local/nginx/ 目录下。
启动nginx方法:/usr/local/nginx/sbin/nginx
关闭nginx方法:/usr/local/nginx/sbin/nginx -s stop ,要看详细的运行控制参数用 -h 参数即可。
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /usr/local/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file
原文链接:http://tetop.blog.51cto.com/1883288/747392
- You can either disable the module by using --without-http-cache option, or install the OpenSSL libra
- Module 'starter' is not available! You either misspelled the module name or forgot to load it.
- VS2005调试报The following module was built either with optimizations enabled or without debug information
- The following module was built either with optimizations enabled or without debug information - winzheng - 博客园
- oracle You can disable statistics in the preference menu,or obtanin select priviliges on the v$sessi
- The program 'unzip' is currently not installed. You can install it by typing:
- ubuntu16.04 出现The program 'rpm' is currently not installed. You can install it by typing
- ubuntu16.04 出现The program 'rpm' is currently not installed. You can install it by typing
- If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
- 使用缓存管理器,尽你之能力(Cache Me if You Can: Using the NT Cache Manager )
- The program 'rz' is currently not installed. You can install it by typing: apt-get install lrzsz
- You must configure either the server or JDBC driver (via the serverTimezone configuration property)
- Uncaught Error: [$injector:nomod] Module 'xxx' is not available! You either misspelled the m
- [Salesforce] Using the with sharing or without sharing Keywords
- How do you set the current Object or Module
- Redis无法启动You may fix this problem by either reducing the size of the Redis heap with the --maxheap
- The server has either erred or is incapable of performing the requested operation. (HTTP 500)
- you can attach the source by clicking attach source below
- 【最短路+dijkstra+spfa】杭电 hdu 2722 Here We Go(relians) Again
- POJ-2750:鸡兔同笼
- 电子邮件订阅:英语词汇学习
- libtool: line 990: g++: command not found的解决
- 1
- You can either disable the module by using --without-http-cache option, or install the OpenSSL libra
- 2
- auto_ptr预防作为STL容器元素的实现。
- POJ-4002:谁是潜在的朋友
- POSIX---linux多线程编程基础入门。
- 无法嵌入互操作类型
- 未能在本地帮助中找到您请求的主题MSDN
- POJ-4013:中位数
- POJ 2762 Going from u to v or from v to u? 图的单连通性 tarjan or kosaraju