从源代码和安装编译后,Nginx不起作用

时间:2014-08-28 01:09:26

标签: nginx compilation sudo

我已经使用三个简单的命令从源代码编译和安装了nginx

./configure
make
sudo make install

现在,当我尝试在默认用户下运行nginx时,收到此消息:

nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)

它也不能与sudo一起使用,但有一个非常奇怪的错误:

sudo: nginx: command not found

所以有人知道:在这种情况下我该怎么办?

1 个答案:

答案 0 :(得分:2)

/usr/local/nginx/sbin添加到PATH中的/etc/environment变量。