【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 填写 [ ...
随机推荐
- 4034. [HAOI2015]树上操作【树链剖分】
Description 有一棵点数为 N 的树,以点 1 为根,且树点有边权.然后有 M 个 操作,分为三种: 操作 1 :把某个节点 x 的点权增加 a . 操作 2 :把某个节点 x 为根的子树中 ...
- 【[SDOI2016]生成魔咒】
这是一道\(SA\)的练手好题 建议做之前先去做一下2408 之后你就肯定会做这道题了 首先上面那道题的答案就是 \[\sum_{i=1}^nn+1-sa[i]-het[i]\] 就是对于每一个后缀求 ...
- Linux下Meepops的搭建
1.下载跟版本相对应的扩展 http://br.php.net/downloads.php 2.进入到pcntl目录 cd php-5.4.45/ext/pcntl 3.先执行phpize /usr/ ...
- Spring AOP源码分析(三)创建AOP代理
摘要: 本文结合<Spring源码深度解析>来分析Spring 5.0.6版本的源代码.若有描述错误之处,欢迎指正. 目录 一.获取增强器 1. 普通增强器的获取 2. 增加同步实例化增强 ...
- C语言程序设计I—第三周教学
由于本课程是从教学周的第二周开始上课,所以第二次授课是发生在第三周,为了让PTA.云班课和博客能统一,所以将教学周作为随笔的标题.本周由于处理外聘教师随意退课等事情,总结有些延后了. 第三周教学安排 ...
- 1549: Navigition Problem (几何计算+模拟 细节较多)
1549: Navigition Problem Submit Page Summary Time Limit: 1 Sec Memory Limit: 256 Mb Su ...
- 删除iptables nat 规则
删除FORWARD 规则: iptables -nL FORWARD --line-numberiptables -D FORWARD 1 删除一条nat 规则 删除SNAT规则 iptables ...
- 通过javascript修改class名字-学习笔记
<!doctype html> <html> <head> <meta charset="urtf-8"> <title> ...
- #leetcode刷题之路36-有效的数独
判断一个 9x9 的数独是否有效.只需要根据以下规则,验证已经填入的数字是否有效即可.数字 1-9 在每一行只能出现一次.数字 1-9 在每一列只能出现一次.数字 1-9 在每一个以粗实线分隔的 3x ...
- head 标签里有什么?
head 标签里有什么? 每一个 HTML 文档中,都有一个不可或缺的标签:<head> ,它作为一个容器,主要包含了用于描述 HTML 文档自身信息(元数据)的标签,这些标签一般不会在页 ...