要让nginx在开机时自动启动,可以按照以下步骤进行设置:
sudo apt-get update
sudo apt-get install nginx
sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl stop nginx
sudo systemctl disable nginx
这样设置之后,nginx就会在系统开机时自动启动。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:linux怎么设置开机自启动nginx