[PM2] AuthBind

less than 1 minute read

PM2 AuthBind

  • PM2
  • PM2를 이용하여, 80이나 443과 같은 root권한이 필요한 프로세스를 올릴 경우 AuthBind 필요

install

$ sudo apt-get install authbind
or
$ sudo yum install authbind
$ wget https://s3.amazonaws.com/aaronsilber/public/authbind-2.1.1-0.1.x86_64.rpm
$ sudo rpm -Uvh https://s3.amazonaws.com/aaronsilber/public/authbind-2.1.1-0.1.x86_64.rpm

execute

$ sudo touch /etc/authbind/byport/%port%
$ sudo chown %user% /etc/authbind/byport/%port%
$ sudo chown centos /etc/authbind/byport/%port%
$ sudo chmod 755 /etc/authbind/byport/%port%
$ authbind --deep pm2 update
$ authbind --deep pm2 start ecosystem.config.js
$ authbind --deep pm2 start ecosystem.config.js --env production

confirm port

$ netstat -tnlp

Reference

Leave a comment