添加 install_node22.sh
This commit is contained in:
parent
6747b9ffc7
commit
87523da8d4
31
install_node22.sh
Normal file
31
install_node22.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "===== Update system ====="
|
||||
apt update -y
|
||||
apt install -y curl ca-certificates gnupg
|
||||
|
||||
echo "===== Install Node.js 22 ====="
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||
apt install -y nodejs
|
||||
|
||||
echo "===== Enable Corepack ====="
|
||||
corepack enable
|
||||
|
||||
echo "===== Install pnpm ====="
|
||||
corepack prepare pnpm@latest --activate
|
||||
|
||||
echo "===== Install PM2 ====="
|
||||
npm install -g pm2
|
||||
|
||||
echo "===== Install build tools ====="
|
||||
apt install -y build-essential
|
||||
|
||||
echo "===== Version check ====="
|
||||
node -v
|
||||
npm -v
|
||||
pnpm -v
|
||||
pm2 -v
|
||||
|
||||
echo "===== Install complete ====="
|
||||
Loading…
x
Reference in New Issue
Block a user