1,下载

[root@VM_0_7_centos local]# wget http://nginx.org/download/nginx-1.14.2.tar.gz
---- ::-- http://nginx.org/download/nginx-1.14.2.tar.gz
Resolving nginx.org (nginx.org)... 95.211.80.227, 206.251.255.63, :::::3f, ...
Connecting to nginx.org (nginx.org)|95.211.80.227|:... connected.
HTTP request sent, awaiting response... OK
Length: (992K) [application/octet-stream]
Saving to: ‘nginx-1.14..tar.gz’ %[=================================================================================================>] ,, 584KB/s in .7s -- :: ( KB/s) - ‘nginx-1.14..tar.gz’ saved [/]

2,解压

[root@VM_0_7_centos local]# tar -zxvf nginx-1.14..tar.gz 

3,设置

[root@VM_0_7_centos local]# cd nginx-1.14./
[root@VM_0_7_centos nginx-1.14.]# ll
total
drwxr-xr-x Dec : auto
-rw-r--r-- Dec : CHANGES
-rw-r--r-- Dec : CHANGES.ru
drwxr-xr-x Dec : conf
-rwxr-xr-x Dec : configure
drwxr-xr-x Dec : contrib
drwxr-xr-x Dec : html
-rw-r--r-- Dec : LICENSE
drwxr-xr-x Dec : man
-rw-r--r-- Dec : README
drwxr-xr-x Dec : src
[root@VM_0_7_centos nginx-1.14.]# pwd
/usr/local/nginx-1.14.
[root@VM_0_7_centos nginx-1.14.]# cd ..
[root@VM_0_7_centos local]# ll
total
drwxr-xr-x. root root Dec : bin
drwxr-xr-x. root root Apr etc
drwxr-xr-x. root root Apr games
drwxr-xr-x root root Dec : git
drwxr-xr-x. root root Dec : include
drwxr-xr-x. root root Dec : lib
drwxr-xr-x. root root Apr lib64
drwxr-xr-x. root root Apr libexec
drwxr-xr-x Dec : nginx-1.14.
-rw-r--r-- root root Dec : nginx-1.14..tar.gz
drwxr-xr-x root root Dec : python3
drwxr-xr-x root root Oct : qcloud
drwxr-xr-x. root root Apr sbin
drwxr-xr-x. root root Aug : share
drwxr-xr-x. root root Dec : src
srwxrwxrwx root root Oct : yd.socket.client
[root@VM_0_7_centos local]# mkdir nginx -p
[root@VM_0_7_centos local]# cd nginx-1.14./
[root@VM_0_7_centos nginx-1.14.]# ll
total
drwxr-xr-x Dec : auto
-rw-r--r-- Dec : CHANGES
-rw-r--r-- Dec : CHANGES.ru
drwxr-xr-x Dec : conf
-rwxr-xr-x Dec : configure
drwxr-xr-x Dec : contrib
drwxr-xr-x Dec : html
-rw-r--r-- Dec : LICENSE
drwxr-xr-x Dec : man
-rw-r--r-- Dec : README
drwxr-xr-x Dec : src
[root@VM_0_7_centos nginx-1.14.]# ./configure --prefix=/usr/local/nginx

4,编译安装

[root@VM_0_7_centos nginx-1.14.]# ll
total
drwxr-xr-x Dec : auto
-rw-r--r-- Dec : CHANGES
-rw-r--r-- Dec : CHANGES.ru
drwxr-xr-x Dec : conf
-rwxr-xr-x Dec : configure
drwxr-xr-x Dec : contrib
drwxr-xr-x Dec : html
-rw-r--r-- Dec : LICENSE
-rw-r--r-- root root Dec : Makefile
drwxr-xr-x Dec : man
drwxr-xr-x root root Dec : objs
-rw-r--r-- Dec : README
drwxr-xr-x Dec : src
[root@VM_0_7_centos nginx-1.14.]# make && make install

5,检查安装是否完成

[root@VM_0_7_centos nginx-1.14.]# pwd
/usr/local/nginx-1.14.
[root@VM_0_7_centos nginx-1.14.]# cd ..
[root@VM_0_7_centos local]# ll
total
drwxr-xr-x. root root Dec : bin
drwxr-xr-x. root root Apr etc
drwxr-xr-x. root root Apr games
drwxr-xr-x root root Dec : git
drwxr-xr-x. root root Dec : include
drwxr-xr-x. root root Dec : lib
drwxr-xr-x. root root Apr lib64
drwxr-xr-x. root root Apr libexec
drwxr-xr-x root root Dec : nginx
drwxr-xr-x Dec : nginx-1.14.
-rw-r--r-- root root Dec : nginx-1.14..tar.gz
drwxr-xr-x root root Dec : python3
drwxr-xr-x root root Oct : qcloud
drwxr-xr-x. root root Apr sbin
drwxr-xr-x. root root Aug : share
drwxr-xr-x. root root Dec : src
srwxrwxrwx root root Oct : yd.socket.client
[root@VM_0_7_centos local]# cd nginx
[root@VM_0_7_centos nginx]# ll
total
drwxr-xr-x root root Dec : conf
drwxr-xr-x root root Dec : html
drwxr-xr-x root root Dec : logs
drwxr-xr-x root root Dec : sbin
[root@VM_0_7_centos nginx]#

【CentOS_7】安装nginx的更多相关文章

  1. Linux(CentOS_7.6)安装Nginx

    1.安装依赖 12 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 2.下载Nginx并解压 1234567 c ...

  2. CentOS_7下安装Nginx服务

    安装make: yum -y install gcc automake autoconf libtool make make是一个命令工具,是一个解释makefile中指令的命令工具.它可以简化编译过 ...

  3. centos直接yum安装nginx

    Ubuntu下安装nginx,直接apt-get install nginx就行了,很方便. 但是今天装了CentOS6.2,直接yum install nginx不行,要先处理下源,下面是安装完整流 ...

  4. 安装Nginx服务

    Nginx最大特点: 静态小文件(1M),支持高并发,同时占用系统资源很少.3W并发,10个进程,内存150M. Nginx特点: 1.配置简单,灵活,轻量. 2.高并发(静态小文件),静态几万的并发 ...

  5. Linux下安装nginx

    一直会使用nginx,也学习了好多nginx知识.也在本地安装过nginx,这次是第一次在正式的环境安装nginx,把这些记录下来总结经验. 一.安装环境 操作系统:CentOS release 6. ...

  6. centos系统编译安装nginx+php环境另加独立mysql教程

    以前看过的安装nginx+php环境都带了mysql数据库了,这个是因为很多站长都是nginx+php+mysql都在同一台服务器了,那么今天我们是单独处理了,一个是nginx+php环境,然后mys ...

  7. Mac OS使用brew安装Nginx、MySQL、PHP-FPM的LAMP开发环境

    准备工作 新版的 Mac OS 内置了Apache 和 PHP,我的系统版本是OS X 10.9.3,可以通过以下命令查看Apache和PHP的版本号: httpd -v Server version ...

  8. 手把手教你玩转nginx负载均衡(四)--源码安装nginx

    引言: 在上一篇,我们已经装好了虚拟机,并且已经配置好了网络,那么今天我们就要开始安装nginx服务器了. 安装工具以及过程 安装gcc编译套件以及nginx依赖模块 yum -y install g ...

  9. Centos7 编译安装 Nginx PHP Mariadb Memcached 扩展 ZendOpcache扩展 (实测 笔记 Centos 7.3 + Mariadb 10.1.20 + Nginx 1.10.2 + PHP 7.1.0 + Laravel 5.3 )

    环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7-x86_64-Minimal-1611.iso 安装步骤: 1.准备 1.0 查看硬 ...

  10. 安装nginx

    [yum安装nginx] yum clean all(这步不执行会出现no more mirrors to try错误) cd /etc/yum.repos.d/ vi nginx.repo 填写 [ ...

随机推荐

  1. prometheus-入门尝试

    prometheus-入门 Prometheus 是由 SoundCloud 开源监控告警解决方案2015 年在 github 上开源以来,已经吸引了 很多大公司的使用:2016 年 Promethe ...

  2. BZOJ1513:[POI2006]TET-Tetris 3D(线段树套线段树)

    Description Task: Tetris 3D "Tetris" 游戏的作者决定做一个新的游戏, 一个三维的版本, 在里面很多立方体落在平面板,一个立方体开始落下直到碰上一 ...

  3. 创建JDBCUtils工具类

    JDBCUtils工具类 私有化构造函数,外界无法直接创建对象 提供公共的,静态的,getConnection 方法,用来给外界提供数据库连接 提供公共的,静态的,close方法,用来释放资源 pac ...

  4. 第二部分 OpenStack安装与配置

    第二部分 OpenStack安装与配置 一.引言   本章内容讲解如何在3台物理机上搭建最小化云平台,这3台机器分为称为Server1.Server2和Client1,之后的各章也是如此.Server ...

  5. 论文笔记 CVPR-2014 DeepReID Deep filter pairing neural network for person re-identification

    1. 摘要 第一篇用深度学习做Reid的文章,提出的FPNN采用端到端的训练方式,解决行人再识别的不对齐,光照,姿态等问题. 建立了一个新的带benchmark的数据集CUHK03,表现性能良好. 2 ...

  6. Spring源码分析(十六)准备创建bean

    本文结合<Spring源码深度解析>来分析Spring 5.0.6版本的源代码.若有描述错误之处,欢迎指正. 我们不可能指望在一个函数中完成一个复杂的逻辑,而且我们跟踪了这么多Spring ...

  7. linux 系统运行级别一般为 0-6,请分别写出每个级别的含义

    每个运行级别的含义 0   关机模式(不要把启动级别  运行级别设置为0) 1   单用户模式 2   无NFS多用户模式 3   文本模式(命令行模式,完整的多用户模式) 4   未使用的 5   ...

  8. 利用IPC通道进行进程间通信(C#)

    有一个解决方案,其中包括一个Windows服务和一个Windows应用程序,两者之间需要进行通信.查了下,可以使用多种方法,如Web service(适用于不同系统及跨平台情况)..NET Remot ...

  9. stat命令的实现-mysate 20155239吕宇轩

    stat命令的实现-mysate 20155239吕宇轩 学习使用stat(1),并用C语言实现 提交学习stat(1)的截图 man -k ,grep -r的使用 伪代码 产品代码 mystate. ...

  10. jq如何判断是否存在某个指定的style样式

    <div id="divid" style="font-size:12px;">11111</div> <div id=" ...