Tag: centos

Socket.io仅在移动设备上发布

我不明白,我的socket.io在桌面上工作正常,但在移动它不会加载socket.io.js并将不会连接做从其他url的套接字加载socket.io.js。 Try it yourself – url is: http://46.252.202.193:3000/socket.io/socket.io.js 在移动它说 – 内部错误,请求目前无法服务。 当我把其他socket.io.js和trys连接套接字和轮询,然后它是允许访问原点错误。 在桌面上工作正常!

PM2重新生成不能在重新启动 – dump.pm2被清空

我试图configurationPM2 daemonize一个简单的node.js服务器在centos上。 init.d脚本执行,并且没有错误,但是pm2 list返回一个空列表,并且服务器没有启动。 最初,我试图以不同的用户来开始这个过程(对于那些感兴趣的人,可以通过修改pm2-init.sh来完成)。 但由于复杂性,我决定先尝试让它以root身份运行。 问题的奇怪症状是dump.pm2文件被某些进程清空,因此pm2复活无关。 我设置pm2在重新启动时运行,如下所示 $ pm2 startup centos $ pm2 start /path/to/my/server.js $ pm2 save 此时,dump.pm2中有一个很大的JSON对象,服务器正在运行。 然后,运行: $ reboot … wait and log back in $ pm2 list 它又空了,dump.pm2也是这样! 我不知道什么过程清除这个文件。 我已经尝试重新安装并重新运行启动脚本无济于事。 任何帮助是极大的赞赏。

在CentOS 5上安装node.js

我对CentOS(5)以及node.js很新,但是我已经有一个旧版本的node.js在我的虚拟服务器上工作了。 现在我试图安装一个更新的版本,我知道CentOS需要Python 2.4,而节点需要2.6或更新,所以我使用altinstall安装了Python 2.7。 但是即使我在运行./configure之前为Python指定了一个别名,我仍然得到这个错误: /root/node/wscript: error: Traceback (most recent call last): File "/root/node/tools/wafadmin/Utils.py", line 274, in load_module exec(compile(code, file_path, 'exec'), module.__dict__) File "/root/node/wscript", line 222 "-pre" if node_is_release == "0" else "" ^ SyntaxError: invalid syntax 这是./configure的内容: #! /bin/sh # v8 doesn't like ccache if [ ! -z "`echo $CC | grep ccache`" ]; […]

如何在CentOS上生成Node.js火焰graphics?

我想为我的node.js应用程序生成一个火焰图 。 不幸的是,我的开箱是OSX(不支持utrace助手,每个链接的文章),我的生产框是CentOS(甚至没有dtrace)。 我发现一些迹象表明像SystemTap可能是一个dtrace的select ,但我一直无法凑齐一个有效的工作方式来产生适当的stacks.out文件饲料到stackvis。 有没有人知道如何得到这个启动和运行一个体面的教程? 我更喜欢CentOS(所以我可以检查我的生产应用程序),但OSX也足够了。

Karma无法捕获PhantomJS

我们已经build立了一个运行Karma目标PhantomJS的Jenkins CI服务器。 我们正在通过Grunt运行我们的testing。 Jenkins,Grunt和Phantom都运行正常,Karma似乎很好,但Karma无法捕捉到Phantom。 我们的脚本在本地运行(OSX)就好了。 通过bash或Jenkins运行同样的错误: Running "karma:jenkins-unit" (karma) task [2013-07-03 11:03:12.168] [WARN] config – urlRoot normalized to "/__karma/" DEBUG [reporter]: Using reporter "dots". DEBUG [reporter]: Using reporter "junit". DEBUG [reporter]: Using reporter "coverage". INFO [karma]: Karma server started at http://localhost:8084/__karma/ INFO [launcher]: Starting browser PhantomJS DEBUG [launcher]: Creating temp dir at /tmp/testacular-7720703 DEBUG [launcher]: […]

无法在Centos Server上安装bcrypt node.js模块

我试图在CentOS服务器上安装bcrypt,但是我得到以下错误: info postuninstall bcrypt@0.5.0 ERR! bcrypt@0.5.0 install: `make build` ERR! `sh "-c" "make build"` failed with 2 ERR! ERR! Failed at the bcrypt@0.5.0 install script. ERR! This is most likely a problem with the bcrypt package, ERR! not with npm itself. ERR! Tell the author that this fails on your system: ERR! make build ERR! […]

NodeJS服务器如何运行

我用腻子。 当我用“node X.js”启动服务器时,putty启动服务器运行。 如果我退出腻子服务器停止。 如何让它保持运行并在重启或重启服务器(计算机)后使其默认运行? 我有5.10。 谢谢!

我如何将npm(node.js包pipe理器)添加到PATH?

我像这样安装了node.js: cd /usr/local/bin/ git clone –depth 1 http://github.com/joyent/node.git cd node git checkout origin/v0.4 # optional. Note that master is unstable. export JOBS=2 # optional, sets number of parallel commands. mkdir ~/local ./configure –prefix=$HOME/local/node make make install echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.profile source ~/.profile 然后我执行这个curl http://npmjs.org/install.sh | sh curl http://npmjs.org/install.sh | sh安装npm。 我注销并重新login后,npm命令无法识别: [/usr/local/bin/node]# npm install […]

运行Node.js脚本,但不会停止!

我有这个test.js运行在CentOS 5下的Node.js。它完美的工作。 问题是,它不会停止! 即使closures我的SSH客户端,它不会停止。 我怎样才能停止正在运行的脚本?

如何在我的专用服务器上安装Node Js

我有一个由GoDaddy维护的专用服务器。 我想在上面运行Node Js。 有没有关于如何在我的服务器上安装Node JS的文档? 我有一个CentOS专用服务器。