0
点赞
收藏
分享

微信扫一扫

ubuntu 22.04 APT 安装 nginx相关命令

Python芸芸 2023-03-23 阅读 75

查找nginx安装位置

whereis nginx 

nginx: /usr/sbin/nginx /usr/lib/nginx /etc/nginx /usr/share/nginx /usr/share/man/man8/nginx.8.gz

nginx配置文件测试

cd /usr/sbin

nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

服务相关

systemctl start nginx  启动服务
systemctl restart nginx 从启动服务
systemctl restart nginx 从启动服务
systemctl status  nginx  查看服务状态


 systemctl status  nginx
● nginx.service - nginx - high performance web server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-03-20 13:52:01 CST; 2 days ago
       Docs: https://nginx.org/en/docs/
   Main PID: 51289 (nginx)
      Tasks: 49 (limit: 308729)
     Memory: 61.4M
        CPU: 5.075s
     CGroup: /system.slice/nginx.service
             ├─51289 "nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf"

举报

相关推荐

0 条评论