centos7安装pm2报-bash: pm2: command not found
npm install pm2 -g
-bash: pm2: command not found
- 3)执行如下命令解决,/usr/local/nodejs 是nodejs 的安装目录
ln -s /usr/local/nodejs/bin/pm2 /usr/local/bin/pm2
执行过程
[root@iZuf6g01xqsbwjheu6bornZ wechat-node-service]
-bash: pm2: command not found
[root@iZuf6g01xqsbwjheu6bornZ wechat-node-service]
/usr/local/nodejs/bin/pm2 -> /usr/local/nodejs/lib/node_modules/pm2/bin/pm2
/usr/local/nodejs/bin/pm2-dev -> /usr/local/nodejs/lib/node_modules/pm2/bin/pm2-dev
......
+ pm2@4.5.6
added 175 packages from 194 contributors in 26.443s
[root@iZuf6g01xqsbwjheu6bornZ wechat-node-service]
-bash: pm2: command not found
pm2:[root@iZuf6g01xqsbwjheu6bornZ wechat-node-service]
[root@iZuf6g01xqsbwjheu6bornZ node-v14.15.4-linux-x64]
[root@iZuf6g01xqsbwjheu6bornZ node-v14.15.4-linux-x64]
[root@iZuf6g01xqsbwjheu6bornZ node-v14.15.4-linux-x64]
[root@iZuf6g01xqsbwjheu6bornZ nodejs]
bin CHANGELOG.md include lib LICENSE README.md share
[root@iZuf6g01xqsbwjheu6bornZ nodejs]
[root@iZuf6g01xqsbwjheu6bornZ nodejs]
-------------
__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
_\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
_\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
_\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
_\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
_\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
_\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
_\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
_\///______________\///______________\///__\///////////////__
Runtime Edition
......