【CentOS_7】安装nginx
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的更多相关文章
- Linux(CentOS_7.6)安装Nginx
1.安装依赖 12 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 2.下载Nginx并解压 1234567 c ...
- CentOS_7下安装Nginx服务
安装make: yum -y install gcc automake autoconf libtool make make是一个命令工具,是一个解释makefile中指令的命令工具.它可以简化编译过 ...
- centos直接yum安装nginx
Ubuntu下安装nginx,直接apt-get install nginx就行了,很方便. 但是今天装了CentOS6.2,直接yum install nginx不行,要先处理下源,下面是安装完整流 ...
- 安装Nginx服务
Nginx最大特点: 静态小文件(1M),支持高并发,同时占用系统资源很少.3W并发,10个进程,内存150M. Nginx特点: 1.配置简单,灵活,轻量. 2.高并发(静态小文件),静态几万的并发 ...
- Linux下安装nginx
一直会使用nginx,也学习了好多nginx知识.也在本地安装过nginx,这次是第一次在正式的环境安装nginx,把这些记录下来总结经验. 一.安装环境 操作系统:CentOS release 6. ...
- centos系统编译安装nginx+php环境另加独立mysql教程
以前看过的安装nginx+php环境都带了mysql数据库了,这个是因为很多站长都是nginx+php+mysql都在同一台服务器了,那么今天我们是单独处理了,一个是nginx+php环境,然后mys ...
- Mac OS使用brew安装Nginx、MySQL、PHP-FPM的LAMP开发环境
准备工作 新版的 Mac OS 内置了Apache 和 PHP,我的系统版本是OS X 10.9.3,可以通过以下命令查看Apache和PHP的版本号: httpd -v Server version ...
- 手把手教你玩转nginx负载均衡(四)--源码安装nginx
引言: 在上一篇,我们已经装好了虚拟机,并且已经配置好了网络,那么今天我们就要开始安装nginx服务器了. 安装工具以及过程 安装gcc编译套件以及nginx依赖模块 yum -y install g ...
- 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 查看硬 ...
- 安装nginx
[yum安装nginx] yum clean all(这步不执行会出现no more mirrors to try错误) cd /etc/yum.repos.d/ vi nginx.repo 填写 [ ...
随机推荐
- 2243. [SDOI2011]染色【树链剖分】
Description 给定一棵有n个节点的无根树和m个操作,操作有2类: 1.将节点a到节点b路径上所有点都染成颜色c: 2.询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段), 如 ...
- Vue2+Webpack创建vue项目
相比较AngularJS和ReactJS,VueJS一直以轻量级,易上手称道.MVVM的开发模式也使前端从原先的DOM中解放出来,我们在不需要在维护视图和数据的统一上花大量时间,只需要关注于data的 ...
- java多态成员的特点
父类: package com.company; public class A { ; public void ok(){ System.out.println("i am father!& ...
- 965. Univalued Binary Tree
题目来源: https://leetcode.com/problems/univalued-binary-tree/submissions/ 自我感觉难度/真实难度: 题意: 分析: 自己的代码: c ...
- C++程序设计入门(上) 之对象和类
面向对象编程: 如何定义对象? 同类型对象用一 个通用的类来定义 class C { int p; int f(); }; C ca, cb; 一个类用变量来定义数据域,用函数定义行为. class ...
- SpringBoot与mongodb的结合
本文系列文章: 使用Shell 操作 MongoDB的技巧 MongoTemplate的使用技巧及其注意事项 敬请期待. 前言 最近公司想要做一个用户行为数据的收集,最开始想用mysql来存储 ...
- FPGA入门实例一:LFSR
一:任务: 要求使用Verilog语言在Xilinx Virtex-6开发板上实现线性反馈移位寄存器(LFSR)的硬件逻辑设计. 二:前期准备: 基本上完成一个简单的设计需要用到以下几个软件 逻辑:U ...
- temp-2017-4-20
------- p{font-size:20px;color:red;} uuuuuuuuuuu package com.wgscd.gwang.myapplication; /** Created ...
- Eclipse获取资源路径
一.问题: 这几天做一个单机版的数据抓取项目,之前都加载了spring或者是maven 使用[this.getClass().getClassLoader().getResource("ma ...
- mfc 类的析构函数
析构函数 自定义析构函数 一.析构函数 析构函数(destructor) 与构造函数相反,当对象生命周期结束时(例如对象所在的函数已调用完毕),系统自动执行析构函数.析构函数往往用来做“清理善 ...