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

时间:2022-06-22 03:21:35

I have a dedicated server maintained by GoDaddy. I want to run Node Js on it. Is there any documentation available on how to install Node JS on my server? I have a CentOS dedicated server.

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

4 个解决方案

#1


11  

There are several resources about how to install it (recommended is to build from source). For example you can check out these:

有几种关于如何安装它的资源(建议从源代码构建)。例如,您可以查看以下内容:

#2


2  

you can get the nodejs configuration from http://nodejs.org/
The important thing you need to keep in your mind is about its configuration in file app.js which consists of port number host and other settings these are settings working for me

您可以从http://nodejs.org/获取nodejs配置。您需要记住的重要事项是它在文件app.js中的配置,其中包括端口号主机和其他设置这些设置对我有用

backendSettings = {
"scheme":"https / http ",
"host":"Your website url",
"port":49165, //port number 
'sslKeyPath': 'Path for key',
'sslCertPath': 'path for SSL certificate',
'sslCAPath': '',
"resource":"/socket.io",
"baseAuthPath": '/nodejs/',
"publishUrl":"publish",
"serviceKey":"",
"backend":{
"port":443,
"scheme": 'https / http', //whatever is your website scheme
"host":"host name",
"messagePath":"/nodejs/message/"},
"clientsCanWriteToChannels":false,
"clientsCanWriteToClients":false,
"extensions":"",
"debug":false,
"addUserToChannelUrl": 'user/channel/add/:channel/:uid',
"publishMessageToContentChannelUrl": 'content/token/message',
"transports":["websocket",
"flashsocket",
"htmlfile",
"xhr-polling",
"jsonp-polling"],
"jsMinification":true,
"jsEtag":true,
"logLevel":1};

#3


1  

I found several guides on how to install NodeJS on Linux Distros. I've tested them myself, they work as expected. Since you're running CentOS, the first link may be the most useful.

我找到了几个关于如何在Linux Distros上安装NodeJS的指南。我自己测试了它们,它们按预期工作。由于您运行的是CentOS,因此第一个链接可能是最有用的。

CentOS 7

CentOS 7

Ubuntu 14

Ubuntu 14

Ubuntu 16

Ubuntu 16

#4


0  

I now have a video tutorial walking you through this if your dedicated server is still on GoDaddy Getting Vagrant, Node Js, Nginx, and CENTOS 7 to Work Together

我现在有一个视频教程,如果您的专用服务器仍然在GoDaddy上获取流浪者,Node Js,Nginx和CENTOS 7一起工作,请引导您完成此操作

#1


11  

There are several resources about how to install it (recommended is to build from source). For example you can check out these:

有几种关于如何安装它的资源(建议从源代码构建)。例如,您可以查看以下内容:

#2


2  

you can get the nodejs configuration from http://nodejs.org/
The important thing you need to keep in your mind is about its configuration in file app.js which consists of port number host and other settings these are settings working for me

您可以从http://nodejs.org/获取nodejs配置。您需要记住的重要事项是它在文件app.js中的配置,其中包括端口号主机和其他设置这些设置对我有用

backendSettings = {
"scheme":"https / http ",
"host":"Your website url",
"port":49165, //port number 
'sslKeyPath': 'Path for key',
'sslCertPath': 'path for SSL certificate',
'sslCAPath': '',
"resource":"/socket.io",
"baseAuthPath": '/nodejs/',
"publishUrl":"publish",
"serviceKey":"",
"backend":{
"port":443,
"scheme": 'https / http', //whatever is your website scheme
"host":"host name",
"messagePath":"/nodejs/message/"},
"clientsCanWriteToChannels":false,
"clientsCanWriteToClients":false,
"extensions":"",
"debug":false,
"addUserToChannelUrl": 'user/channel/add/:channel/:uid',
"publishMessageToContentChannelUrl": 'content/token/message',
"transports":["websocket",
"flashsocket",
"htmlfile",
"xhr-polling",
"jsonp-polling"],
"jsMinification":true,
"jsEtag":true,
"logLevel":1};

#3


1  

I found several guides on how to install NodeJS on Linux Distros. I've tested them myself, they work as expected. Since you're running CentOS, the first link may be the most useful.

我找到了几个关于如何在Linux Distros上安装NodeJS的指南。我自己测试了它们,它们按预期工作。由于您运行的是CentOS,因此第一个链接可能是最有用的。

CentOS 7

CentOS 7

Ubuntu 14

Ubuntu 14

Ubuntu 16

Ubuntu 16

#4


0  

I now have a video tutorial walking you through this if your dedicated server is still on GoDaddy Getting Vagrant, Node Js, Nginx, and CENTOS 7 to Work Together

我现在有一个视频教程,如果您的专用服务器仍然在GoDaddy上获取流浪者,Node Js,Nginx和CENTOS 7一起工作,请引导您完成此操作