1,更新系统

sudo apt-get update

2,安装nginx

sudo apt-get install nginx

3,验证是否安装成功

curl 127.0.0.1


常用配置文件和命令

默认nginx.conf路径:/etc/nginx/nginx.conf

关闭nginx:

sudo systemctl stop nginx

启动nginx

sudo systemctl start nginx

修改配置文件后,重新加载改变后的配置:

sudo systemctl reload nginx

参考链接:

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04

ubuntu16 install nginx的更多相关文章

  1. 【Ubuntu16.04】 install nginx

    1. Download PGP key in order to pass the authentication of the nginx repository signature. click to ...

  2. yum install nginx

    先安装nginx的yum源 http://nginx.org/en/linux_packages.html#stable 找到链接,安装: rpm -ivh http://nginx.org/pack ...

  3. centos6.5 64位 yum install nginx的默认安装路径

    yum install nginx网站文件存放默认目录 /usr/share/nginx/html 网站默认站点配置 /etc/nginx/conf.d/default.conf 自定义Nginx站点 ...

  4. mac brew install nginx遇到的坑

    默认使用 brew install nginx 出现了一下的错误: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: ...

  5. [转载]How To Install Nginx And PHP-FPM On CentOS 6 Via Yum

    http://www.lifelinux.com/how-to-install-nginx-and-php-fpm-on-centos-6-via-yum/ http://blog.csdn.net/ ...

  6. ubuntu16.4+nginx+uwsgi+Django 部署上线

    Nginx概述 Nginx是一款轻量级的HTTP服务器,采用事件驱动和异步非阻塞处理方式框架,这让其具有极好的IO性能,市场用于服务端的反向代理和负载均衡 Nginx优点 高并发连接:官方测试Ngin ...

  7. Install Nginx on CentOS 7

    To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with ...

  8. How To Install Nginx on Ubuntu 16.04 zz

    Introduction Nginx is one of the most popular web servers in the world and is responsible for hostin ...

  9. Install NGINX, PHP-FPM (5.6) on CentOS 6

    Installing NGINX with PHP on CentOS 6 can be a hassle depending on the install and packages you use. ...

随机推荐

  1. WMS学习笔记:2.WMS解析

    WMS 定义了三个操作,分别是:GetCapabilities,GetMap和GetFeatureInfo.其中,GetFeatureInfo是可选的.本条款规定了在超文本传输协议(HTTP)分布式计 ...

  2. Yarn框架和工作流程研究

    一.概述     将公司集群升级到Yarn已经有一段时间,自己也对Yarn也研究了一段时间,现在开始记录一下自己在研究Yarn过程中的一些笔记.这篇blog主要主要从大体上说说Yarn的基本架构以及其 ...

  3. 跟我学Makefile(五)

    文件名操作函数 每个函数的参数字符串都会被当做一个或是一系列的文件名来对待. $(dir <names...>) 名称:取目录函数——dir. 功能:从文件名序列<names> ...

  4. (转)SpringBoot非官方教程 | 第七篇:springboot开启声明式事务

    springboot开启事务很简单,只需要一个注解@Transactional 就可以了.因为在springboot中已经默认对jpa.jdbc.mybatis开启了事事务,引入它们依赖的时候,事物就 ...

  5. 在Mybatis中使用连表查询的一次实际应用

    以前在工作中很少使用多表关联查询,对连表查询的具体作用和使用场景也没有很直观的认识,通过这次在项目中的实际应用,对此有了一定的认识,特记录如下. 关联表介绍: 分别是属性表attr_info.属性值表 ...

  6. linux sar命令详解及使用

    sar(System Activity Reporter系统活动情况报告)是目前 Linux 上最为全面的系统性能分析工具之一,可以从多方面对系统的活动进行报告,包括:文件的读写情况.系统调用的使用情 ...

  7. bzoj1602 / P2912 [USACO08OCT]牧场散步Pasture Walking(倍增lca)

    P2912 [USACO08OCT]牧场散步Pasture Walking 求树上两点间路径--->lca 使用倍增处理lca(树剖多长鸭) #include<iostream> # ...

  8. Python3.x:os._exit(), sys.exit(), exit() 的区别

    Python3.x:os._exit(), sys.exit(), exit() 的区别 一.sys.exit() 说明:退出程序引发SystemExit异常, 可以捕获异常执行些清理工作.一般主程序 ...

  9. iptables命令、规则、参数详解

    表    (table)包含4个表:4个表的优先级由高到低:raw-->mangle-->nat-->filterraw---RAW表只使用在PREROUTING链和OUTPUT链上 ...

  10. POJ 3159 Candies(差分约束+最短路)题解

    题意:给a b c要求,b拿的比a拿的多但是不超过c,问你所有人最多差多少 思路:在最短路专题应该能看出来是差分约束,条件是b - a <= c,也就是满足b <= a + c,和spfa ...