어제부터 삽질하다가 알아낸 사실입니다.
저도 개발만 하다보니 리눅스에 약한게 사실이죠. ㅠ. ㅠ
sudo pm2 start ./bin/www 이렇게만 하면 80으로 서비스가 될줄 알았는데 에러가 뜨더라구요.
리눅스에서 1024 포트 이하의 것을 실행할려면 root권한으로 실행한다고해서 했는데 전혀 먹히지 않더라구요.
참고한 사이트 : https://stackoverflow.com/questions/35105100/start-app-as-root-with-pm2
Start app as root with pm2
I have a daemon that must be run as root on startup. I use pm2 to start other apps but can not figure out if it can start an app as root. Can it be done? If not, what are my options?
stackoverflow.com
여기서 제가 택한 방법은
sudo pm2 kill
sudo npm remove pm2 -g
sudo npm i -g pm2@latest
sudo pm2 update
sudo chown -R ubuntu:ubuntu /home/ubuntu/.pm2
Truffle 모듈 인스톨 하기 (0) | 2021.12.01 |
---|---|
Deno 윈도우에 install 하기 와 VSCode 에서 Deno 파일 생성 (0) | 2021.11.11 |
nginx nodejs express 연동 설정 하기 (0) | 2021.02.02 |
nodejs pm2 로 프로세스 관리 (0) | 2021.01.29 |
Nodejs 날씨 및 온도 데이터 API (0) | 2021.01.22 |