从官网下载一个nginx 的tar.gz 版。
安装方式使用make 安装
第一步:解压
tar -zxvf nginx-1.7.4.tar.gz
第二步:进入nginx-1.7.4,执行./configure 命令
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[root@localhost nginx-1.7.4]# ./configure
checking for OS
+ Linux 2.6.32-431.el6.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler cc is not found
出现这个错误。
那么就是gcc 包没有安装。安装gcc 吧,骚年。
yum -y install gcc
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
再次执行./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.
yum install pcre-devel
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using builtin md5 code
+ sha1 library is not found
+ using system zlib library
yum install perl-Digest-SHA1.x86_64
开启ssl 模块 执行./configure --with-http_ssl_module
启用“server+status"页,执行./configure --with-http_stub_status_module
两个都启动,不用我说了。执行./configure --with-http_stub_status_module --with-http_ssl_module
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
执行make 命令
执行make install 命令
至此,nginx 执行成功了------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
export PATH=$PATH:$NGINX_HOME/sbin
相关推荐
linuxnginx安装配置文件支持php.pdf
Linux nginx安装配置步骤.txt
在linux安装nginx需要的东西,实测可以使用,已经成功安装
linux安装nginx并支持ssl,使得服务器支持证书签名,提升应用的安全性
linux下安装Nginx所需依赖包合集
Linux离线安装nginx安装包,附带安装教程,可以及时更新最新安装路径
Nginx 1.22.0 Linux 版本,解压安装。 Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,在BSD-like 协议下发行。其特点是占有内存少,并发能力强,事实上nginx的并发能力在同类型...
1.启动nginx,进入nginx安装目录执行:./sbin/nginx -c ./conf/nginx.conf 2.重启新加载nginx配置文件,进入nginx安装目录执行:./sbin/nginx -s reload 3.重启nginx服务,进入nginx安装目录执行:./sbin/nginx -s ...
本文提供了在Linux环境下使用nginx、rtmp和ffmpeg进行傻瓜式安装的详细教程,旨在帮助读者快速搭建起一个功能强大的流媒体服务器。文章首先介绍了nginx、rtmp和ffmpeg的基本概念及其在流媒体服务中的作用,随后详细...
linux下nginx离线安装包--附带所有依赖环境和安装教程,当linux无外网情况下,可通过此安装版安装,一次性解决所有依赖,按照压缩包内教程,即可从头到尾安装完毕
1. 里面有nginx安装是各种依赖的包 2. 内附详细的安装过程
Linux离线安装Nginx资源包
linux系统nginx一键自动离线安装包,含安装脚本。内含zlib、pcre、openssl、nginx等安装包
1)资源:linux下nginx离线安装包及相关依赖包; 2)教程:https://blog.csdn.net/hualinger/article/details/125298009?spm=1001.2014.3001.5502
linux下Nginx+tomcat整合的安装与配置
linux下安装nginx被配置sticky模块的相关软件包,包含nginx.conf的简单实例
NULL 博文链接:https://aperise.iteye.com/blog/2223373
纯手工搭建Linux Nginx MySQL PHP WEB服务器
本人多年的工作经验,完善了一套linux安装nginx的全过程,有了这个文档,连小白用户都可以轻松安装了,不再需要依赖其他的安装文档了。文档还包括设置开机自启。