0

当我第一次安装并运行 Ghostnpm start时,初始 config.js 设置一切正常。

在学习了几个教程/问题之后,weird error 8当我对 config.js 进行任何更改时,我仍然会遇到

在 Centos 6.4 上安装 Ghost

幽灵文档

非常感谢任何帮助/见解。

我有

  • 重新安装幽灵
  • 重新启动我的 Centos 机器
  • 尝试使用--productionnpm start 的标志
  • 尝试将配置中的主机/端口编辑为多个选项

使用初始 config.js

$ npm start --production

ghost@0.4.1 start /var/www/html/Projects/ghost.mydomain.name/ghost
node index

Ghost is running...
Your blog is now available on http://my-ghost-blog.com
Ctrl+C to shut down
^C
Ghost has shut down
Your blog is now offline

现在将配置更改为 0.0.0.0 和端口 80

dev at centos64  /var/www/html/Projects/ghost.mydomain.name/ghost
$ npm start --production

ghost@0.4.1 start /var/www/html/Projects/ghost.mydomain.name/ghost
node index


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EACCES
    at errnoException (net.js:901:11)
    at Server._listen2 (net.js:1020:19)
    at listen (net.js:1061:10)
    at net.js:1135:9
    at dns.js:72:18
    at process._tickCallback (node.js:415:13)
    at process._tickFromSpinner (node.js:390:15)
npm ERR! weird error 8
npm ERR! not ok code 0
4

2 回答 2

2

这是因为您的 80 端口正被另一个程序使用。尝试在终端上运行此命令,看看谁是罪魁祸首:

netstat -tulpn | grep :80

最后一列表示程序的名称。例如 :

 0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      1215/nginx

罪魁祸首是nginx。输入kill 1215以停止运行该进程。

于 2014-02-26T14:20:51.700 回答
0

在我看来,您的端口 80 可能正在被其他进程使用。

你有没有在那个盒子上运行任何网络服务器?

于 2014-02-26T14:18:16.717 回答