如何部署nodejs

哈了个皮發表於2024-06-01

img

linux安裝Node.js(詳細)Node.js安裝教程

https://blog.csdn.net/qq_41974199/article/details/119328353

wget https://nodejs.org/dist/v14.17.4/node-v14.17.4-linux-x64.tar.xz
tar xf node-v14.17.4-linux-x64.tar.xz
mkdir /usr/local/lib/node
mv node-v14.17.4-linux-x64 /usr/local/lib/node/nodejs
sudo vim /etc/profile
export NODEJS_HOME=/usr/local/lib/node/nodejs
export PATH=$NODEJS_HOME/bin:$PATH
source /etc/profile

image-20240522231739010

手把手教你安裝和配置pm2,實現自動化部署node專案

https://blog.csdn.net/qq_43067585/article/details/126478322

全域性安裝命令

npm install pm2 -g

image-20240522231725340

pm2 start start.js

image-20240522231730220

pm2 stop start.js

image-20240522231721245

相關文章