You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an aside, it is currently difficult to install pm2 without the --unsafe-perm flag. Some documentation on recommended permissions set-up would be really great.
With the beta version (npm i pm2@rc) socket has been fixed an you can run 1 pm2 instance per user on a same server.
I'd advise using nvm to manage node versions and packages per user:
su - $user
nvm install 0.11.13
npm i pm2@rc -g
pm2 start server.js
#then as root
su -
nvm install 0.11.13
npm i pm2@rc -g --unsafe-perm
pm2 list #should be empty
An initial attempt was made to generate the
pm2-init.sh
script with a user other than root:The command
pm2 startup -u node centos
would generate the following file content:There are two problems with this approach. First,
PM2_HOME
still points to/root
. Second, thelockfile
points to the directory onlyroot
can write in.Proposed changes
The text was updated successfully, but these errors were encountered: