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. 了解Hadoop

    Apache Hadoop 官网 Hadoop源码分析 参考1   参考2 Hadoop 是一个由 Apache 基金会所开发的分布式系统基础架构. Hadoop 的框架最核心的设计就是:HDFS(H ...

  2. A - Set of Strings

    Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Description You ar ...

  3. Flutter实战视频-移动电商-40.路由_Fluro的全局注入和使用方法

    40.路由_Fluro的全局注入和使用方法 路由注册到顶层,使每个页面都可以使用,注册到顶层就需要在main.dart中 main.dart注册路由 注入 onGenerateRoute是Materi ...

  4. Django - 导出项目依赖库到 requirements.txt

    两种方法: 虚拟环境: 使用 pip freeze pip freeze > requirements.txt # 这种方式推荐配合 virtualenv ,否则会把整个环境中的包都列出来. 只 ...

  5. MySQL基础知识(一)-超详细MySQL安装教程

    简介 原计划,今天这篇想要给小伙伴们讲解一下python操作mysql数据库,但是由于近期换了一台新的电脑,所以一看mysql数据库都没安装,所有才有了这篇文章.尽管网上不乏此类型的文章,但是刚好自己 ...

  6. vue中循环时动态绑定值

    在vue项目中,有很多需要动态循环绑定的场景,在未知绑定数量的情况下只能动态生成绑定值 1.首先在data中定义一个对象,我在项目中时循环绑定下拉框,所以定义了一个selectVal = {} 2.在 ...

  7. windows7激活及office2013激活

    步骤 1.安装KMSpico 密码:dzit 2.安装.NET Framework 4 密码:vnus 3.解压KMSpico,运行文件,等待语音结束即可激活windows7及office2013 注 ...

  8. 第一次运行PHP项目(phpstorm+wampserver)

    1.配置环境 1)vcredist_x64,wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b,如下图 (1)安装vcredist_x64   ...

  9. sed 删除指定行

    参考:http://blog.sina.com.cn/s/blog_4ba5b45e0102e7l2.html

  10. Source Insight 入门设置

    在添加工程时,如果想添加文件夹下所有的文件,应该选择 “add tree” Source Insight 类名显示乱码解决 最近重新安装里source insight,但是打开文件后,类名显示乱码? ...