1、系统环境

[root@crazy-acong ~]# cat /etc/redhat-release
CentOS release 6.6 (Final) [root@crazy-acong ~]# uname -a
Linux crazy-acong 2.6.-.el6.x86_64 # SMP Wed Oct :: UTC x86_64 x86_64 x86_64 GNU/Linux [root@crazy-acong ~]# ifconfig eth0 | grep "inet addr" | awk -F : '{print $2}'| awk '{print $1}'
192.168.1.106

2、安装步骤

2.1 安装基础依赖包

  • 安装 pcre
  • 安装 openssl-devel
# pcre 安装
# 安装 pcre库是为了使 nginx 支持具备 URI 重写功能的 rewrite 模块,如果不安装 pcre 库,则 nginx 无法使用 rewrite 模块功能
[root@crazy-acong ~]# yum -y install pcre pcre-devel [root@crazy-acong ~]# rpm -qa pcre pcre-devel
pcre-devel-7.8-.el6.x86_64
pcre-7.8-.el6.x86_64 # openssl-devel 安装
# nginx 在使用HTTPS服务的时候要用到此模块,如果不安装 openssl 相关包,安装 nginx 的过程中会报错。openssl 系统默认已经安装,只需要安装 openssl-devel 即可
[root@crazy-acong ~]# yum -y install openssl-devel [root@crazy-acong ~]# rpm -qa openssl-devel openssl
openssl-1.0.1e-.el6_8..x86_64
openssl-devel-1.0.1e-.el6_8..x86_64

2.2 安装 nginx

# 创建软件包存放目录
[root@crazy-acong ~]# mkdir -p /data/tools
[root@crazy-acong ~]# cd /data/tools/ # 下载 nginx 的稳定版本 1.10.
[root@crazy-acong tools]# wget http://nginx.org/download/nginx-1.10.3.tar.gz # 创建 nginx 用户
[root@crazy-acong tools]# useradd nginx -s /sbin/nologin -M
[root@crazy-acong tools]# tar -zxf nginx-1.10..tar.gz
[root@crazy-acong tools]# cd nginx-1.10. [root@crazy-acong nginx-1.10.]# ./configure --user=nginx --group=nginx --prefix=/data/application/nginx-1.10. --with-http_stub_status_module --with-http_ssl_module [root@crazy-acong nginx-1.10.]# make
[root@crazy-acong nginx-1.10.]# make install [root@crazy-acong nginx-1.10.]# ln -s /data/application/nginx-1.10./ /etc/nginx [root@crazy-acong nginx-1.10.]# ln -s /data/application/nginx-1.10./sbin/nginx /usr/local/sbin/ # 使用 nginx -V 可以查看编译是的参数
[root@crazy-acong ~]# /etc/nginx/sbin/nginx -V
nginx version: nginx/1.10.
built by gcc 4.4. (Red Hat 4.4.-) (GCC)
built with OpenSSL 1.0.1e-fips Feb
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/data/application/nginx-1.10./ --with-http_stub_status_module --with-http_ssl_module # 检查配置文件语法,可以防止因配置错误导致网站重启或重新加载配置等对用户的影响
[root@crazy-acong nginx-1.10.]# nginx -t
nginx: the configuration file /data/application/nginx-1.10.//conf/nginx.conf syntax is ok
nginx: configuration file /data/application/nginx-1.10.//conf/nginx.conf test is successful # 启动 nginx 服务
[root@crazy-acong nginx-1.10.]# nginx # 查看是否启动成功
[root@crazy-acong nginx-1.10.]# netstat -lnpt | grep nginx
tcp 0.0.0.0: 0.0.0.0:* LISTEN /nginx

nginx-1.10.3 编译安装的更多相关文章

  1. centos 7 下 nginx 1.10.3 编译安装的方法

    安装所需环境 Nginx 是 C语言 开发,建议在 Linux 上运行,当然,也可以安装 Windows 版本,本篇则使用 CentOS 7 作为安装环境. 一. gcc 安装安装 nginx 需要先 ...

  2. ubuntu15.10下编译安装wine1.8 rc4

    ubuntu15.10下编译安装wine1.8rc4 Wine (“Wine Is Not an Emulator” 的递归缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Li ...

  3. 新安装和已安装nginx如何添加未编译安装模块/补丁

    新安装和已安装nginx如何添加未编译安装模块/补丁 --http://www.apelearn.com/bbs/forum.php?mod=viewthread&tid=10485& ...

  4. 安装成功的nginx如何添加未编译安装模块

    原已经安装好的nginx,现在需要添加一个未被编译安装的模块举例说明:安装第三方的ngx_cache_purge模块(用于清除指定URL的缓存)nginx的模块是需要重新编译nginx,而不是像apa ...

  5. F-stack及其Nginx、redis的编译安装

    F-stack简介 F-stack粘合了dpdk.用户态协议栈和nginx.redis,弥补了dpdk没有协议栈的不足,并用nginx.redis提供了一个调用应用程序的接口. Quick Start ...

  6. 转:安装成功的nginx如何添加未编译安装模块

    原已经安装好的nginx,现在需要添加一个未被编译安装的模块 举例说明:安装第三方的ngx_cache_purge模块(用于清除指定URL的缓存) nginx的模块是需要重新编译nginx,而不是像a ...

  7. Nginx之解压编译安装-yellowcong

    安装前准备 对于nginx编译安装需要先安装编译 的工具,然后再安装nginx依赖 yum -y install gcc gcc-c++ autoconf automake make yum -y i ...

  8. 生产线上的Nginx如何添加未编译安装模块

    正在生产线上跑着web前端是nginx+tomcat,现在有这样一个需求,需要对网站的单品页面和列表页设置缓存,不同的页面设置不同的缓存,但是由于开始没有安装ngx_cache_purge这个模块,现 ...

  9. Nginx 1.10.1 编译、配置文档(支持http_v2,TLSv1.2,openssl v1.0.2)

    1.安装常用工具及基础包: [root@localhost /]# yum -y install wget git vim make gcc gcc-c++ openssl-devel [root@l ...

随机推荐

  1. UVa 10192 - Vacation & UVa 10066 The Twin Towers ( LCS 最长公共子串)

    链接:UVa 10192 题意:给定两个字符串.求最长公共子串的长度 思路:这个是最长公共子串的直接应用 #include<stdio.h> #include<string.h> ...

  2. Node.js 使用angularjs取得Nodejs http服务端返回的JSON数组示例

    server.js代码: // 内置http模块,提供了http服务器和客户端功能(path模块也是内置模块,而mime是附加模块) var http=require("http" ...

  3. x^2 + (y-(x^2)(1/3))^2 = 1 心形方程 5.20无聊之作

    2017.05.20 一个无聊的周六,只能看别人秀恩爱.偶然间在网上看到一个有意思的方程 x^2 + (y-(x^2)(1/3))^2 = 1,据说这个方程可以绘制出一个爱心的形状.既然很无聊,就随便 ...

  4. 未能加载文件或程序集 MySql.Web

    偶然间碰到这个错误,找到一个临时的解决办法,真正的原因还不知道是什么,也不知道这种解决方法会不会对以后有什么副作用. “/”应用程序中的服务器错误. 配置错误 说明: 在处理向该请求提供服务所需的配置 ...

  5. IP数据库生成器

    代码地址如下:http://www.demodashi.com/demo/12688.html 项目放在github上,python版本ipdb_creator,java版本ip-locator. 项 ...

  6. 有道词典for mac不能取词解决方案

    在mac上装了有道词典,发现在Chrome上不能取词,网上也没有搜到合适的解决方案,后来发现解决这个问题很简单,打开有道词典,点击设置, 再点击软件更新,就会发现有chrome取词插件,安装就OK了. ...

  7. webserver【实时查询当天的天气情况】

    1.webserver是什么? 日常生活中经常会使用到webserver,注册时,会收到验证码,购买东西时,会收到短信,假如,A公司网站和B公司合作,那么A公司注册对的用户可以直接推送给B网站,那怎么 ...

  8. Android使用Fragment打造万能页面切换框架

    首先我们来回顾一下传统用Activity进行的页面切换.activity之间切换.首先须要新建intent对象,给该对象设置一些必须的參数,然后调用startActivity方法进行页面跳转. 假设须 ...

  9. mysql更改表结构:添加、删除、修改字段、调整字段顺序

    添加字段: alter table `user_movement_log` Add column GatewayId int not null default 0 AFTER `Regionid` ( ...

  10. SpringBoot使用MyBatis报错:Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseInsertProvider.dynamicSQL)

    © 版权声明:本文为博主原创文章,转载请注明出处  1. 错误描述 使用SpringBoot集成MyBatis框架,并且使用 mapper-spring-boot-starter 自动生成MyBati ...