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. 基于PHP的cURL快速入门教程 (小偷采集程序)

    cURL 是一个利用URL语法规定来传输文件和数据的工具,支持很多协议,如HTTP.FTP.TELNET等.很多小偷程序都是使用这个函数.     最爽的是,PHP也支持 cURL 库.本文将介绍 c ...

  2. 在yii中使用memcache

    yii中可以很方便的使用memcache 一.配置在main.php的components中加入cache配置 array( 'components'=>array( 'cache'=>a ...

  3. k8s存储 pv pvc ,storageclass

    1.  pv  pvc 现在测试 glusterfs  nfs  可读可写, 多个pod绑定到同一个pvc上,可读可写. 2. storageclass  分成两种 (1)  建立pvc, 相当于多个 ...

  4. jQuery鼠标悬停

    (function ($) { $.fn.hoverdir = function(options){ var options = $.extend({ choice : ".cove&quo ...

  5. ES6新特性2:变量的解构赋值

    本文摘自ECMAScript6入门,转载请注明出处. ES6允许按照一定模式,从数组和对象中提取值,对变量进行赋值,这被称为解构(Destructuring).不仅适用于var命令,也适用于let和c ...

  6. virtualbox+vagrant学习-2(command cli)-4-vagrant global-status命令

    Global Status 格式: vagrant global-status 这个命令将告诉你当前登录的用户系统上所有活跃的vagrant环境的状态. userdeMacBook-Pro:~ use ...

  7. jquery mobile mobiscroll 日期插件使 用mobiscroll

    官网网站: http://www.mobiscroll.com/ http://code.google.com/p/mobiscroll/ 1.精简版Demo: 查看Demo » 下载Demo » 2 ...

  8. [转]SVN服务器搭建和使用(一)

    Location是指VisualSVN Server的安装目录,Repositorys是指定你的版本库目录.Server Port指定一个端口,Use secure connection勾山表示使用安 ...

  9. Lambda表达式学习(2)

    在. net3. 5里面 , 委托的定义和实现被大大的简化了!使用关键字Func或Action就可以定义一个委托 , 使用拉姆达表达式就可以实现一个具体的委托. Func关键字是用来定义一个有返回值的 ...

  10. U盘安装咱中国人自己的操作系统UbuntuKylin14.04LST(超具体原创图文教程)

    本文仅供參考,在准备级安装过程中出现的一切意外情况均与本文作者无关!原创教程转载请注明原转载地!系统简单介绍:UbuntuKylin 是Ubuntu官方认可的衍生版,其宗旨是创建一个Ubuntu的中文 ...