nginx: unrecognized service
The
Fortunately the startup scripts have already been written.
We can fetch them with
# Download nginx startup script
wget -O init-deb.sh https://www.linode.com/docs/assets/660-init-deb.sh
# Move the script to the init.d directory & make executable
sudo mv init-deb.sh /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
# Add nginx to the system startup
sudo /usr/sbin/update-rc.d -f nginx defaults
Now we can control
sudo service nginx stop
sudo service nginx start
sudo service nginx restart
sudo service nginx reload
nginx: unrecognized service
error means the startup scripts need to be created.Fortunately the startup scripts have already been written.
We can fetch them with
wget
and set them up following these steps:# Download nginx startup script
wget -O init-deb.sh https://www.linode.com/docs/assets/660-init-deb.sh
# Move the script to the init.d directory & make executable
sudo mv init-deb.sh /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
# Add nginx to the system startup
sudo /usr/sbin/update-rc.d -f nginx defaults
Now we can control
nginx
using:sudo service nginx stop
sudo service nginx start
sudo service nginx restart
sudo service nginx reload
Comments
Post a Comment