1.创建用户和群组
    groupadd nginx
    创建一个用户,不允许登陆和不创主目录
    useradd -s /sbin/nologin -g nginx -M nginx
    检查创建用户
    tail -1 /etc/passwd
 
2.yum install 
yum -y install gcc gcc-c++ make libtool
 
2.编译安装ngixn所需插件 zlib    pcre    openssl
注意路径:
将  pcre-8.35  zlib-1.2.11  openssl-1.0.2l  一定要解压包拷贝对应目录 --with-pcre=
 
cd nginx-1.12.
./configure \
--user=nginx \
--group=nginx \
--prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_gzip_static_module \
--with-pcre=/opt/pcre-8.41 \
--with-zlib=/opt/zlib-1.2. \
--with-openssl=/opt/openssl-1.0.2l \
--with-mail \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--with-mail_ssl_module --with-mail
--without-mail_pop3_module
--without-mail_imap_module
--without-mail_smtp_module
#--add-module=/usr/local/src/ngx_pagespeed-1.8.31.2-beta \
#--with-google_perftools_module  (根据需求添加)
make
make install
 
查看安装版本:
[root@VM-LVS02 nginx-1.12.1]# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.12.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)
built with OpenSSL 1.0.2l  25 May 2017
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-pcre=/opt/pcre-8.41 --with-zlib=/opt/zlib-1.2.11 --with-openssl=/opt/openssl-1.0.2l
 
 
 
 
 
安装完毕,下来设置开机启动脚本

(1)Ngixn 编译安装 (版本:1.12.1)的更多相关文章

  1. Centos6.10编译安装php-7.1.12并安装redis模块

    1.服务器初始化 yum update -yyum install epel-release -yyum install gcc gcc-c++ wget lsof lrzsz telnet -y 2 ...

  2. babun编译安装git(2.12.0)遇到的问题及解决办法

    1. 下载git wget https://www.kernel.org/pub/software/scm/git/git-2.12.0.tar.xz 你或许需要加上选项: --no-check-ce ...

  3. 源代码编译安装MySQL5.6.12具体过程

    1 下载安装包download tar.gzwget http://download.csdn.net/detail/mchdba/7545037​2 安装cmake软件包yum install cm ...

  4. Ubuntu13.04编译安装cmake2.8.12.2

    前提: 安装过程需要gcc和gcc-c++.ubuntu13.04桌面版自带gcc4.7,apt-get install g++4.7安装g++./usr/bin目录下有x86_64-linux-gn ...

  5. ngixn编译安装时,pcre的处理

    nginx编译时pcre会提示找不到libpcre.so.1 ./configure --hlep --without-pcre disable PCRE library usage   不使用pcr ...

  6. (2)Ngixn 编译安装设置开机自启

    设置nginx开机自启 #!/bin/sh # # nginx - this script starts and stops the nginx daemon # # chkconfig: - 85 ...

  7. 编译安装mysql和zabbix,xtrabackup数据库备份

    xtrabackup参考文章 https://www.cnblogs.com/linuxk/p/9372990.html 下载5.7的mysql 社区版包 https://cdn.mysql.com/ ...

  8. Squid正向代理(编译安装)

    编译安装 版本为squid-3.5.27 系统为Centos6.5 依赖环境 yum install -y perl gcc*autoconf automake make sudo wget libx ...

  9. nginx-1.12.0版本(编译安装)-自定义安装路径

    nginx-1.12.0版本(编译安装)-自定义安装路径 安装路径:/application/nginx-1.12.0 1.前期准备 安装编译需要的gcc和gcc-c++ yum install -y ...

随机推荐

  1. PICO 中关于时基ps3000aGetTimebase函数介绍

  2. 探究c++默认初始化

    按照c++ primer 5th第40页的描述,如果定义变量时没有指定初值,则变量被默认初始化,此时变量被赋予了“默认值”. 根据变量定义的位置,分为两种情况: 1.定义于任何函数体之外的变量被初始化 ...

  3. 3.19 YARN HA架构及(RM/NM) Restart讲解

    一.ResourceManager HA ResourceManager(RM)负责跟踪集群中的资源,以及调度应用程序(例如,MapReduce作业). 在Hadoop 2.4之前,ResourceM ...

  4. 11.ClientCredential模式总结

    11.ClientCredential模式总结 服务端定义的Resource叫做api Resource API默认是被保护的 第三方的客户端先去请求 Server拿到access token.带着t ...

  5. jquery快速入门三

    事件 常用事件 click(function(){.......}) #触发或将函数绑定到指定元素的click事件 hover(function(){.....}) 当鼠标指针悬停在上面时触发.... ...

  6. UVa 1631 Locker (DP)

    题意:有一个 n 位密码锁,每位都是0-9,可以循环旋转.同时可以让1-3个相邻数字进行旋转一个,给定初始状态和目状态,问你最少要转多少次. 析:很明显的一个DP题.dp[i][j][k] 表示前 i ...

  7. [教程心得] Flash AIR 调用exe/bat且可以传参

    Flash AIR 如何调用exe/bat?并且有些情况下需要传参,如何传参呢? 看下面例子: cmd传参打开系统软键盘(参考http://bbs.9ria.com/thread-181265-1-1 ...

  8. Linux下新建一个站点

    Apache+nagix使用Lnmpa创建一个新的站点 我们在部署服务器的时候通常会遇到需要分域名和分应用部署,那么如何通过Apache+nagix创建一个新的站点服务呢 LNMPA这种架构有什么优势 ...

  9. POJ 3067【树状数组】

    题意: 给你两行数字,n个m个,然后给你k条线直接把两个数连起来,问有多少个交叉的 思路: 假定上一行是起点,下一行是终点. 把路按照起点从大到下排序, 然后可以直接对每条路查询,这条路目前的交叉数, ...

  10. Rigging a Versatile Weapon Bone for 3ds Max

    说明:先添加weapon到点的约束,位置,方向约束都调整好了后再建立点到手,hip的父子关系,注意这个顺序 加点的方法 点设置成box的方法: http://hewiki.heroengine.com ...