Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Maybe this question/answer will help you: superuser.com/questions/284342/… –  slhck May 21 '11 at 21:35

1 Answer 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.