ubuntu 安装 Nginx

来源:互联网 发布:如何在mac上切换输入法 编辑:程序博客网 时间:2024/05/21 06:26

一、安装 Nginx

1. 更新本地包索引

sudo apt-get update

2. 安装 Nginx

sudo apt-get install nginx


二、启动/停止 Nginx 服务

1. 停止 Nginx 服务

sudo service nginx stop
2. 启动 Nginx 服务

sudo service nginx start
3. 重启 Nginx 服务

sudo service nginx restart

4. 加入开机自动启动 Nginx 服务

sudo update-rc.d nginx defaults
原文:https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-14-04-lts

0 0