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. 【223】◀▶ IDL HDF 文件操作说明

    参考:I/O - HDF Routines —— HDF 操作函数 01   HDF_SD_START 打开一个 SDS 模式的 HDF 文件. 02   HDF_SD_END 关闭一个 SDS 模式 ...

  2. org.apache.catalina.LifecycleException报错解决方法

    严重: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalin ...

  3. CF-807A

    A. Is it rated? time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  4. MPTCP in Wireshark(转)

    最新的wireshark可以直接识别出mptcp. Wireshark is a widely used network analyzer that can capture network traff ...

  5. 【Linux学习】Linux文件系统2—linux常用目录结构、绝对路径、相对路径

    Linux文件系统2-linux常用目录结构.绝对路径.相对路径 一. 常见目录结构总结 Linux目录结构就是"树形结构",常见的目录结构: /bin  系统需要的命令位于此目录 ...

  6. Flutter实战视频-移动电商-53.购物车_商品列表UI框架布局

    53.购物车_商品列表UI框架布局 cart_page.dart 清空原来写的持久化的代码; 添加对应的引用,stless生成一个静态的类.建议始终静态的类,防止重复渲染 纠正个错误,上图的CartP ...

  7. IsPostBack深入探讨

    1IsPostBack介绍 IsPostBack是Page类有一个bool类型的属性,用来判断针对当前Form的请求是第一次还是非第一次请求.当IsPostBack=true时表示非第一次请求,我们称 ...

  8. 2 手写Java LinkedList核心源码

    上一章我们手写了ArrayList的核心源码,ArrayList底层是用了一个数组来保存数据,数组保存数据的优点就是查找效率高,但是删除效率特别低,最坏的情况下需要移动所有的元素.在查找需求比较重要的 ...

  9. vue仿淘宝地址选择组件

    Vue组件:省市区地址选择组件 <template> <div v-show="addressSelectShow" :style="{'left': ...

  10. gSoap学习笔记

    http://www.cnblogs.com/xiangism/archive/2012/11/14/2770242.html http://www.cnblogs.com/lvkun/archive ...