我的服务器只重启一次后我将运行一个命令
我的服务器上有 node.js 的聊天应用程序
这是我用 putty 编写并运行我的聊天应用程序的命令行
登录服务器
[root@name ~]# cd /
[root@name /]# cd /home/admin/domains/mydomain.com/public_html/chat_server
[root@name chat_server]# forever start websocket.js
info: Forever processing file: websocket.js
[root@name chat_server]#
如何自动运行?
最佳答案
您正在寻找 rc.local
脚本。参见 here .
关于linux - 重启我的 Centos 服务器时如何运行命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19369113/