Tag: centos

的centos + +的NodeJS永远(startstop)

好日子我有一些问题,永远启动\停止脚本。 CentOS 6.2 内核2.6.32-220.el6.x86_64 nodejs v0.6.19 npm v 1.1.24 forever@0.9.2 我创buildnologin用户运行我的脚本 / etc / passwd文件 节点:X:501:501 :: / usr / sbin目录/ NOLOGIN:/斌/庆典:在/ usr / local / bin目录/节点:在/ usr / local / bin目录/永远:在/ usr / local / bin目录:在/ usr /本地/ lib目录/ node_modules /永远/箱 我创build脚本并命名为hello2.js #!/bin/bash echo "aight" 并尝试运行 [max@localhost Desktop]$ forever start hello2.js info: Forever processing […]

CentOS中nodejs守护进程的upstart脚本不起作用(开始时崩溃)

我在CentOS服务器的/ etc / init /目录下有一个.conf文件。 #!upstart description "shortnr server for fmc.io" author "Felix Milea-Ciobanu" start on startup stop on shutdown respawn respawn limit 10 30 script export HOME="/root" exec /usr/local/bin/node /var/www/fmc.io/nodejs/app.js >> /var/www/fmc.io/logs/shortnr.upstart.log 2>&1 end script pre-start script echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> /var/www/fmc.io/logs/shortnr.upstart.log end script pre-stop script echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) […]

如何在centos 6.4 virtualbox客户端上用express来设置和configurationnode.js到nginx反向代理?

我正在使用VirtualBox 4.3.4在我的Windows 8.1系统上创build一个开发虚拟机,并安装了CentOS 6.4作为我的VMServer。 我安装NginX和Node.js没有问题。 在pipe理知识less的情况下,我删除了/etc/sysconfig/iptables的内容,允许所有连接仅用于开发目的(稍后将进行更改)。 Nginx工作正常,在我的Windows主机上,并指向浏览器http://192.168.1.20显示“欢迎来到EPEL的nginx!” 页面正在工作。 validation我的node.js应用程序工作正常,我通过运行在我的VMServer上创build了一个节点应用程序 [~]# express node_nginx_practice [~]# cd node_nginx_practice && npm install [~]# node app 然后,在我的Windows主机上,将URL指向http://192.168.1.20:3000 default”页面运行时没有任何问题。 问题是我如何设置和configuration节点应用服务于nginx反向代理? 例如: http://192.168.1.20 //will point to Express default page : http://192.168.1.20 //will point to Express default page 我尝试在/etc/nginx/nginx.conf按照一些教程设置/etc/nginx/nginx.conf的nginxconfiguration, /etc/nginx/nginx.conf没有运气,url仍指向Nginx“欢迎使用EPEL上的nginx!” 页。 这是我的nginx.conf # For more information on configuration, see: # * Official English […]

运行docker映像不起作用

我是Docker的新手,我正在为Docker做Node.js教程。 我困在这一步: http : //docs.docker.io/en/latest/examples/nodejs_web_app/#building-your-image 我已经执行了这个: $ docker build -t user/centos-node-hello . … Successfully built c04aea889b03 并成功build成。 $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE user/centos-node-hello latest c04aea889b03 23 minutes ago 667.9 MB ubuntu 13.10 9f676bd305a4 9 weeks ago 178 MB ubuntu saucy 9f676bd305a4 9 weeks ago 178 MB ubuntu raring eb601b8965b8 9 […]

在CentOS上为Node.js安装ZeroMQ绑定失败

所以我试图在CentOS VPS上安装ZeroMQ与Node.js的绑定,但是它只是失败了,我不知道如何解决这个问题。 我正在运行CentOS 6.5。 我已经安装Node.js 0.10.26使用: sudo yum install nodejs npm 我已经安装了ZeroMQ 2.2.0使用: sudo yum install zeromq 最后尝试安装使用package.json作为依赖的“zmq”版本“2.7.x”的ZeroMQ绑定,然后运行: npm install 该命令执行失败 node-gyp rebuild Traceback (most recent call last): File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module> sys.exit(gyp.script_main()) AttributeError: 'module' object has no attribute 'script_main' 我不确定在哪里寻找解决scheme。 有人有主意吗? 提前致谢。

node.js无法连接到mysql数据库

我在我的服务器上使用CentOS,node.js抛出错误 CONNECTION error: { [Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)] code: 'ER_ACCESS_DENIED_ERROR', errno: 1045, sqlState: '28000', fatal: true } 我在Ubuntu上的本地版本不会抛出这个错误,PHP可以连接到这个数据库相同的凭据。 我使用这个代码连接到数据库 var connect_params = require('./connect'); var express = require('express'), app = express(), mysql = require('mysql'), connectionpool = mysql.createPool(connect_params.connection); 和我的connect.js var connection = { host: 'localhost', user: 'user', password: 'password', database: 'mydb' […]

NPM无法全局安装browserify

我无法全局安装Browserify(或其他)。 我可以在没有问题的情况下安装非全局的东西。 背景:我正在代理之后的公司networking上运行CentOS 6.6。 我使用“yum”作为root来安装Node.js。 $ sudo yum -y install nodejs 和npm(由于某种原因没有安装nodejs): $ sudo yum -y install nodejs npm 这将Node.js和NPM安装到目录中: $ which node /usr/bin/node $ which npm /usr/bin/npm 并将“node_modules”放在/ usr / lib / node_modules下。 就像我说的,我在代理的后面,所以我把“proxy”和“https-proxy”configuration属性设置为正确的值。 当我试图安装browserify(在他们的网站上指定) $ npm install -g browserify 我收到一个错误 …npm ERR! stack Error: EACCES, mkdir '/usr/lib/node_modules/browserify'… 所以我“chown”/ usr / lib / node_modules目录让我访问node_modules中的mkdirs: […]

尝试安装grunt-sass时,“node build.js”失败

我试图从grunt-contrib-sass切换到grunt-sass,但是我正在运行与grunt包装器模块中的node-sass相关的构build错误。 到目前为止,我已经将节点从0.10.40升级到0.12.7,并切换到Python 2.7以绕过其他一些节点,但这仍然是: $ npm install > node-sass@1.0.3 install /var/www/html/example.com/www/node_modules/grunt-sass/node_modules/node-sass > node build.js child_process: customFds option is deprecated, use stdio instead. make: Entering directory `/var/www/html/example.com/www/node_modules/grunt-sass/node_modules/node-sass/build' CXX(target) Release/obj.target/binding/binding.o cc1plus: error: unrecognized command line option "-std=c++11" cc1plus: error: unrecognized command line option "-std=c++11" make: *** [Release/obj.target/binding/binding.o] Error 1 make: Leaving directory `/var/www/html/example.com/www/node_modules/grunt-sass/node_modules/node-sass/build' gyp ERR! build error gyp […]

从谷歌可视化图表生成图表,并转换为图像文件与节点JS?

有没有可能与节点JS运行谷歌图表? 我的目标是从谷歌图表生成graphics,并将图表转换为图像文件,并将其上传到服务器。

无头Chrome浏览器屏幕截图的最大高度为16,384px?

无论我尝试什么,无头Chrome 60(和59)的全屏截图的最大高度是16,348px。 这不是一个记忆问题。 没有段错误,没有,例如, FATAL:memory_linux.cc(35) Out of memory. 消息。 没有。 捕捉屏幕截图是“成功的”。 更改屏幕截图格式 – PNG或JPEG – 没有任何影响。 屏幕截图的宽度可能会有所不同,但保存的屏幕截图的高度始终限制为16,348像素。 例, 1600×16384,1200×16384,2400×16384等 我正在使用这个最小的代码( 完整的源代码 )升级屏幕截图: const upscale = 2; const viewportWidth = 1200; const viewportHeight = 800; …. // Set up viewport resolution, etc. const deviceMetrics = { width: viewportWidth, height: viewportHeight, deviceScaleFactor: 0, mobile: false, fitWindow: false, […]