News Center
News center and tutorial for beginners
News center and tutorial for beginners
Release Time:2024-10-07 14:17:07
this guide covers the installation of serverless framework on centos, debian, and ubuntu, including both older and newer versions of these distributions.
sudo yum update -y
sudo yum install -y gcc-c++ make
curl -sl https://rpm.nodesource.com/setup_14.x | sudo -e bash -
sudo yum install -y nodejs
node --version
npm --version
sudo npm install -g serverless
serverless --version
for centos stream, the process is similar, but you may need to use dnf
instead of yum
:
sudo dnf update -y
sudo dnf install -y gcc-c++ make
curl -sl https://rpm.nodesource.com/setup_14.x | sudo -e bash -
sudo dnf install -y nodejs
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl
curl -sl https://deb.nodesource.com/setup_14.x | sudo -e bash -
sudo apt install -y nodejs
node --version
npm --version
sudo npm install -g serverless
serverless --version
the process is the same as debian 9 and 10, but you may want to use a more recent node.js version:
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl
curl -fssl https://deb.nodesource.com/setup_16.x | sudo -e bash -
sudo apt install -y nodejs
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl
curl -sl https://deb.nodesource.com/setup_14.x | sudo -e bash -
sudo apt install -y nodejs
node --version
npm --version
sudo npm install -g serverless
serverless --version
for newer ubuntu versions, you may want to use a more recent node.js version:
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl
curl -fssl https://deb.nodesource.com/setup_16.x | sudo -e bash -
sudo apt install -y nodejs
after installing serverless framework, you'll need to configure it with your cloud provider credentials. for example, for aws:
sudo apt install -y awscli # for debian/ubuntu
sudo yum install -y awscli # for centos
aws configure
sudo
with npm commandsnpm cache clean -f
remember to keep your node.js, npm, and serverless framework updated regularly for the best performance and security.