在Debian系统中,使用Systemd来管理Nginx服务的启动和停止。以下是一些常用的命令:
sudo systemctl start nginx
sudo systemctl stop nginx
sudo systemctl restart nginx
sudo systemctl status nginx
sudo systemctl enable nginx
sudo systemctl disable nginx
sudo journalctl -u nginx
请注意,执行这些命令需要具有root权限。如果你不是root用户,请在命令前加上sudo
。