第一步:
打开浏览器下载,再上传到centOS系统中

http://nginx.org/download/

或者在 centOS系统输入:

wget http://nginx.org/download/nginx-1.9.9.tar.gz

  

第二步:解压

tar -xvf nginx-1.9..tar.gz

第三步:配置

cd nginx-1.9.
./configure --with-stream --with-http_stub_status_module --with-http_ssl_module

如果出现
./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 -y install pcre-devel

如果出现
./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.

解决办法:

yum -y install openssl openssl-devel

成功后,文件会编译到 /usr/local/nginx 这个目录下

第四步:编译

make
make install

参考:

linux安装nginx
https://www.cnblogs.com/jimisun/p/8057156.html Nginx配置upstream实现负载均衡
https://www.cnblogs.com/zhoading/p/8036205.html

nginx在centos下的安装的更多相关文章

  1. nginx在CentOs下的安装及配置

    前言: 先介绍一下nginx: Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行.其特点是占有内存少,并发能力强, ...

  2. centos 下yum 安装nginx

    centos 下yum 安装nginx 1. 直接yum install nginx不行,要先处理下源: rpm -ivh http://nginx.org/packages/centos/6/noa ...

  3. centos下编译安装lnmp

    centos下编译安装lnmp 本文以centos为背景在其中编译安装nginx搭建lnmp环境. 编译安装nginx时,需要事先安装 开发包组"Development Tools" ...

  4. centos下yum安装lamp和lnmp轻松搞定

    centos下yum安装lamp和lnmp轻松搞定.究竟多轻松你看就知道了.妈妈再也不操心不会装lamp了. 非常辛苦整理的安装方法,会持续更新下去.凡无法安装的在评论里贴出问题来,会尽快解决.共同维 ...

  5. CentOS 下 redis 安装与配置

    CentOS 下 redis 安装与配置   1.到官网上找到合适版本下载解压安装 [root@java src]# wget -c http://redis.googlecode.com/files ...

  6. CentOS下一键安装Openstack

    CentOS下一键安装Openstack 系统环境:Oracle VirtualBox 4.38CentOS-6.5-x86_64-bin-DVD1.iso 安装前需要修改 /etc/hosts文件, ...

  7. mac和centos下git安装

    mac下面的git安装,这篇文章写的很详细了http://www.cnblogs.com/ccdev/archive/2012/09/12/2682098.html 谈谈centos下的安装.我用的是 ...

  8. centOS下yum安装配置samba

     centOS下yum安装配置samba 2010-03-29 15:46:00 标签:samba yum centOS 安装 休闲 注意:本文的原则是只将文件共享应用于内网服务器,并让将要被共享的目 ...

  9. centos下apache安装后无法访问

    2013.11.28遇到的问题: -------------------------------------- 一.centos下apache安装后无法访问 得查一下防火墙的问题 iptables添加 ...

随机推荐

  1. 【Untiy】完美解决Untiy Package Manager无限加载的问题

    直接上干货 打开记事本,复制一下zhei个 @echo offset HTTP_PROXY=127.0.0.1set HTTPS_PROXY=127.0.0.1start "" & ...

  2. 解决Xcode10 Library not loaded: /usr/lib/libstdc++.6造成的crash及报错

    关键字1:dyld: Library not loaded: /usr/lib/libstdc++.6.dylib   Referenced from: 关键字2:Reason: no suitabl ...

  3. Saltstack_实战指南02_各主机Pillar信息指定

    1. 实战项目GitHub地址 该项目已经放在了GitHub上,地址如下: https://github.com/zhanglianghhh/salt-example-lnmp 2. 主机规划 3. ...

  4. udp协议,进程(同步,异步)

    udp协议与进程 一.udp协议 QQ聊天室 #- sever import socket #socket.SOCK_DGRAM--->UPD协议 sever = socket.socket(t ...

  5. 用函数模拟简单的购物车(Python)

    """ 购物车功能: a.引导用户输入金额 b.给用户展示所有的商品 c.引导用户输入需要进行的操作[添加 删除 结算购物车 退出] d.引导用户选择商品 e.引导用户输 ...

  6. idea延长使用期

    0. 如果你的idea(版本2019.02)是已过期状态则先上网找个激活码激活再进行下面步骤延长使用期至2089年 1. 附件下载地址: 链接:https://pan.baidu.com/s/1L5O ...

  7. 浅谈vue中的计算属性和侦听属性

    计算属性 计算属性用于处理复杂的业务逻辑 计算属性具有依赖性,计算属性依赖 data中的初始值,只有当初始值改变的时候,计算属性才会再次计算 计算属性一般书写为一个函数,返回了一个值,这个值具有依赖性 ...

  8. 推荐|MathType的使用技巧

    前言 持续更新中,敬请期待... 数学学科 制作新的数学符号 不包含于符号:输入$\not\subseteq,然后按回车键enter即可: 分式\(\cfrac{3-x}{2x-1}\)符号:输入$\ ...

  9. Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3) F2. Wrong Answer on test 233 (Hard Version) dp 数学

    F2. Wrong Answer on test 233 (Hard Version) Your program fails again. This time it gets "Wrong ...

  10. Idea查看接口或类继承关系

    打开想要查看的接口或者类文件,使用快捷键CTRL+H调出Hierarchy窗口 比如,想要查看Exception的类继承关系,首先定位到这个文件,然后调出Hierarchy窗口. 该窗口上面的一排工具 ...