Ubuntu 安装 Nginx

blockchain@ThinkPad-T460:~$ sudo add-apt-repository ppa:nginx/stable
blockchain@ThinkPad-T460:~$ sudo apt-get update
blockchain@ThinkPad-T460:~$ sudo apt-get install software-properties-common
blockchain@ThinkPad-T460:~$ sudo apt-get install nginx

查看 nginx 版本

blockchain@ThinkPad-T460:~$ nginx -v
nginx version: nginx/1.12.2
blockchain@ThinkPad-T460:~$ 

启动 nginx

blockchain@ThinkPad-T460:~$ sudo /etc/init.d/nginx start
start: Job is already running: nginx
blockchain@ThinkPad-T460:~$ 
blockchain@ThinkPad-T460:~$ ps -ef | grep nginx
root     15943     1  0 15:39 ?        00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data 15945 15943  0 15:39 ?        00:00:00 nginx: worker process                           
www-data 15946 15943  0 15:39 ?        00:00:00 nginx: worker process                           
www-data 15947 15943  0 15:39 ?        00:00:00 nginx: worker process                           
www-data 15948 15943  0 15:39 ?        00:00:00 nginx: worker process                           
blockch+ 16003  2577  0 15:51 pts/1    00:00:00 grep --color=auto nginx

然后访问 http://localhost/ ,出现如下页面,表明一切正常。
输入图片说明

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值