Last active
May 24, 2022 13:59
-
-
Save nielvid/9e8178de42a1c9d921d45bdb64062145 to your computer and use it in GitHub Desktop.
Install Docker nginx and Nodejs@16.15.0 on ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt-get update | |
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y | |
sudo apt update | |
sudo apt install nginx -y | |
sudo ufw allow 'Nginx Full' | |
sudo systemctl restart nginx | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash | |
source ~/.bashrc | |
nvm install v16.15.0 | |
npm install pm2 -g | |
npm install -g npm@8.10.0 | |
sudo docker run --name redis -p 6379:6379 -d redis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment