安装Nginx到Linux(源码)
运行环境
系统版本:无
软件版本:无
硬件要求:无
安装过程
NGINX官方提供源码包的下载,NGINX有两个版本Mainline(主线)版和Stable(稳定)版。主线版本我们可以理解为是开发版本,在生产环境中建议使用稳定版本。
源码安装适用于所有Linux操作系统。
NGINX官方下载地址:http://nginx.org/en/download.html。
1、下载软件包
[root@localhost ~]# wget http://nginx.org/download/nginx-1.14.0.tar.gz
2、解压软件包
[root@localhost ~]# tar xzvf nginx-1.14.0.tar.gz
[root@localhost ~]# ls
nginx-1.14.0 nginx-1.14.0.tar.gz
3、安装相关依赖
[root@localhost ~]# yum -y install gcc gcc-c++ autoconf automake pcre pcre-devel zlib zlib-devel openssl openssl-devel gd-devel
4、配置、编译并安装
[root@localhost ~]# cd nginx-1.14.0
[root@localhost nginx-1.14.0]# ./configure --prefix=/usr/local/nginx/ --with-threads --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_image_filter_module=dynamic --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_slice_module --with-http_stub_status_module --with-stream=dynamic --with-compat
[root@localhost nginx-1.14.0]# make -j4 && make install
5、配置环境变量
配置环境变量,使Nginx命令在全局使用。
[root@localhost sbin]# vim /etc/profile
export NGINX_PATH=/usr/local/nginx/sbin
export PATH=$PATH:$NGINX_PATH
[root@localhost sbin]# source /etc/profile
6、查看NGINX的版本及编译选项
[root@localhost conf]# nginx -V
nginx version: nginx/1.14.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx/ --with-threads --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_image_filter_module=dynamic --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_slice_module --with-http_stub_status_module --with-stream=dynamic --with-compat
安装Nginx到Linux(源码)的更多相关文章
- 1.linux源码安装nginx
从官网下载nginx.tar.gz源码包 拷贝至Linux系统下进行解压 tar -zxvf nginx.tar.gz 进入解压后的目录,需要./configure,此步骤会报多个错,比如没有安装gc ...
- Linux源码安装RabbitMQ高可用集群
1.环境说明 linux版本:CentOS Linux release 7.9.2009 erlang版本:erlang-24.0 rabbitmq版本:rabbitmq_server-3.9.13 ...
- Linux源码安装JDK1.8
Linux源码安装Java 1.到官网下载 jdk-8u131-linux-x64.tar.gz 官网地址:http://www.oracle.com/technetwork/java/javase/ ...
- Debian 安装Linux源码
参考: http://blog.chinaunix.net/uid-20683355-id-1895778.html http://www.linuxdiyf.com/viewarticle.php? ...
- Nginx 最新版源码编译安装 包含常用模块作用及所需依赖
第一部分 Nginx最新版源码编译安装 1. 使用的模块 模块1:http_rewrite_module 基于正则匹配来实现重定向.依赖PCRE库,见依赖1 模块2:http_gzip_module ...
- mysql-5.5 for linux源码安装
mysql-5.5 for linux源码安装 1.使用Yum安装依赖软件包 # yum install -y gcc gcc-c++ gcc-g77 autoconf automake bison ...
- 转载 :Linux有问必答:如何在Debian或Ubuntu上安装完整的内核源码
http://linux.cn/article-5015-1.html 问题:我需要为我的Debian或Ubuntu下载并安装完整树结构的内核源码以供编译一个定制的内核.那么在Debian或Ubunt ...
- linux源码安装mysql,shell编程学习,ubuntu
一.mysql安装 以源码安装的方式编译和安装Mysql 5.6. 1.卸载旧版本 rpm -qa | grep mysql 检查是否有旧版本 查询结果:mysql-libs-5.1.73-7.el6 ...
- 『学了就忘』Linux软件包管理 — 47、Linux源码包的安装和卸载
目录 1.源码包安装服务的注意事项 2.源码包安装服务的过程 3.源码包安装服务的删除 4.源码包安装服务的启动 5.源码包安装服务的关闭 1.源码包安装服务的注意事项 (1)安装服务选择哪种软件包? ...
随机推荐
- 【WPF学习】第二十七章 Application类的任务
上一章介绍了有关WPF应用程序中使用Application对象的方式,接下来看一下如何使用Application对象来处理一些更普通的情况,接下俩介绍如何初始化界面.如何处理命名行参数.如何处理支付窗 ...
- CORS解决跨域问题的几种方法
一 后端服务器使用过滤器 新建过滤器: /** * 解决跨域 */ public class AccessControlAllowOriginFilter implements Filter { @O ...
- 有基因ID或者基因名,如何拿到对应的KEGG通路图?
1.https://www.kegg.jp/kegg/tool/map_pathway2.html 2.如下图,筛选出基因所在的通路,并标上不同的颜色. 3.结果页面如下,有些基因会找不到对应的通路, ...
- Docker 使用笔记-常用基础命令
常用基础命令 环境:Linux Ubuntu 1.查看docker信息 docker version | docker info 2.启动docker服务 sudo systemctl start d ...
- python 利用selenium爬取百度文库的word文章
今天学习如何使用selenium库来爬取百度文库里面的收费的word文档 from selenium import webdriver from selenium.webdriver.common.k ...
- C# 接口和继承
转:https://www.cnblogs.com/songhe123/p/9558545.html 接口是方法的抽象,如果不同的类有同样的方法,那么就应该考虑使用接口. 例1: using Syst ...
- ARTS Week 7
Dec 9, 2019 ~ Dec 15, 2019 Algorithm Problem 38.Count And Say 外观数列 题目链接 题目描述: 外观数列 是一个整数序列,从数字 1 开始, ...
- python批量删除子文件夹中的空子文件夹
例如A文件夹下有许多子文件夹,我需要获得的是子文件夹中的图片,但是现在子文件夹中不光有图片,还混入了空的文件夹(在使用OpenImages工具箱的时候,按照检索的方式下载的图片文件中是带有label的 ...
- 一个工程中cpp文件的编译顺序
做了一个实验. 最后build失败,失败的原因是变量i被重定义了.原本按照我的思路,是不应该失败的.因为我用了条件编译,若先编译Source.cpp,则会#define __HEADER_H__并且定 ...
- Private Variable and Private Method - Python 私有变量 和 私有方法
Private Variable and Private Method Python 不象 Java 那样, 通过 private 关键字创建私有属性, python 通过更简洁的实现了'私有属性', ...