Installation | Guide | PM2 Documentation
Installation
Install pm2
With yarn:
yarn global add pm2With npm:
npminstallpm2-gWith debian, use the install script:
apt update&& aptinstall sudocurl&& curl-sL https://raw.githubusercontent.com/Unitech/pm2/master/packager/setup.deb.sh |sudo-E bash -With docker, follow thistutorial.
CLI autocompletion
By default, CLI autocompletion is not installed with PM2, we recommend it:
pm2 completioninstallSource map support
Source map files are autodetected by default if they are present (app.js.map forapp.js).
What are source map files? If using Babel, Typescript or any other Javascript superset, you may have noticed that stacktraces are not meaningful, errors not pointing to the right line. Source map files can be used to solve this problem.
Update
Keep your pm2 up to date with:
npminstallpm2-g&& pm2 updatepm2 update is necessary in order to refresh the PM2 daemon.