윈도우에서 node-red 설치 후 백그라운드로 돌아갈 수 있게 설정하기
1. node.js 설치
윈도우7 32비트에 node.js 설치 시 14.15.3 LTS는 설치되지 않아 node-v12.20.0-x86 설치
2. node-red 설치 (node-red 공식 홈 참조)
nodered.org/docs/getting-started/windows#2-install-node-red
Running on Windows : Node-RED
Running on Windows This page gives specific instructions on setting up Node-RED in a Microsoft Windows environment. The instructions are specific to Windows 10 but should also work for Windows 7 and Windows Server from 2008R2. It is not advisable to use ve
nodered.org
npm install -g --unsafe-perm node-red
3. nssm 설치 및 directory에 이동
NSSM - the Non-Sucking Service Manager
NSSM - the Non-Sucking Service Manager Windows 10 Creators Update 2017-04-26: Users of Windows 10 Creators Update should use prelease build 2.2.4-101 to avoid an issue with services failing to start. If for some reason you cannot use that build you can als
nssm.cc
4. nssm 설정 및 재부팅
gist.github.com/dceejay/576b4847f0a17dc066db
Running Node-RED as a service on Windows using NSSM
Running Node-RED as a service on Windows using NSSM - nssm.md
gist.github.com
cd \nssm
mkdir c:\temp
nssm install Node-RED "c:\Users\\"%USERNAME%"\AppData\Roaming\npm\node-red.cmd"
nssm set Node-RED AppDirectory "c:\Users\\"%USERNAME%"\.node-red"
nssm set Node-RED AppParameters "-u c:\Users\\"%USERNAME%"\.node-red > c:\temp\node-red.log"
nssm set Node-RED Description "A wiring tool for the Internet of Things"
shutdown -r
윈도우가 부팅될 때 node-red가 자동 실행된 상태로 작동됨
끝.
'node-red' 카테고리의 다른 글
send telegram message in node-red (0) | 2021.04.30 |
---|---|
NodeRed Dashboard 삭제 방법 (0) | 2020.06.10 |