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. java 整除(/) 求余(%) 运算

    1. java 整除(/)  求余(%)  运算 1.求余    System.out.println(11%2);     //顾名思义就是11除2的余数-->1    System.out. ...

  2. Httpclient入门代码

    /** * Project Name:httpClient * File Name:Test.java * Package Name:httpClient * Date:2017年11月9日上午8:3 ...

  3. FileWriter 写文件

    FileWriter fw = new FileWriter("C://Users//pc//Desktop//aaa.txt",true); fw.write("201 ...

  4. JQuery点击table获取点击行的数据

    $(function () {var TaskType = '';$("#data_table tr:gt(0)").click(function () { TaskType = ...

  5. Spring Boot 2.x(十七):快速入门Elastic Search

    What -- Elasticsearch是什么? Elasticsearch是一个基于Lucene的搜索服务器,Elasticsearch也是使用Java编写的,它的内部使用Lucene做索引与搜索 ...

  6. 序列化框架MJExtension详解 + iOS ORM框架

    当开发中你的模型中属性名称和 字典(JSON/XML) 中的key 不能一一对应时, 或者当字典中嵌套了多层字典数组时..., 以及教你如何用 MJExtension 配置类来统一管理你的模型配置, ...

  7. 51nod 1416【DFS】

    思路: 暴力整个图,以这个为起点,然后看一下有没有找到一条路是会指向自己且元素个数>=4: #include <bits/stdc++.h> using namespace std; ...

  8. Puppet2d及教程

    http://www.jianshu.com/p/e56c7f5e58ab manual http://www.unitymanual.com/thread-35754-1-1.html http:/ ...

  9. c#二维数组传递与拷贝

    定义 string[,] arr = new string[12, 31] 另一种string[][] ary = new string[5][];相当于一维数组 常量二维数组定义, 用readonl ...

  10. 关于web常见的安全问题

    一. Web攻击动机: 1.恶作剧: 2.关闭Web站点,拒绝正常服务: 3.篡改Web网页,损害企业名誉; 4.免费浏览收费内容; 5.盗窃用户隐私信息,例如手机号.Email等个人信息; 6.以用 ...