Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NGINX command not found [closed]

NGINX was built from source using the latest stable build on a debian 9 server. sudo nginx command cannot be found. The NGINX install is located in /usr/local/nginx. How can I configure my server to follow the standard sudo nginx [command] rules? I have tried adding PATH=/usr/sbin/:$PATH which did not work since NGINX is not located in sbin. Thanks

like image 835
Rhys Avatar asked Dec 03 '22 21:12

Rhys


1 Answers

Run echo $PATH Does it contain /usr/local/sbin?

If not then add PATH=/usr/sbin/:$PATH to your .profile file.

Also, check that nginx is installed in /usr/local/sbin, by going into this directory.

If not then install it by using following commands:

sudo apt update
sudo apt install nginx
like image 130
Monarth Sarvaiya Avatar answered Jan 05 '23 09:01

Monarth Sarvaiya