1

I installed nginx recently, and it is found at /opt/nginx... asking "which nginx" doesn't find nginx, and I can't figure out how to use nginx. I think it's because nginx is installed in the opt directory.

How can I add the opt directory to my paths? Is this even what I want to do?? I just want to be able to run a nginx server locally for development purposes.

Also, is there some document online I can read to understand what is going on better. I know I don't know enough about how this all works, as I'm not a super user of my computer. I'm more of a programmer. BUT - I'd like to learn more, but I don't know where to begin.

Jeff
  • 133

1 Answers1

1

/opt

reserved for all the software and add-on packages that are not part of the default installation

It's fine to add this directory to your PATH. As the paths are processed from left to right make sure you add yours to the end so that any files in /opt won't have higher priority than your system binaries.

If you don't add it to your PATH, you need to run it by /opt/nginx everytime. Or cd /opt; nginx.