Skip to content

Instantly share code, notes, and snippets.

@michaeljymsgutierrez
Last active June 28, 2020 13:07
Show Gist options
  • Save michaeljymsgutierrez/2bb2cde481fab1479afcd695d2455de4 to your computer and use it in GitHub Desktop.
Save michaeljymsgutierrez/2bb2cde481fab1479afcd695d2455de4 to your computer and use it in GitHub Desktop.
Script for installing NodeJS and MongoDB on Linux (Ubuntu Distro)
#! /bin/bash
# Install NVM - Node Version Manager
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# Reload bash
source ~/.bashrc
# Install NodeJS
nvm install v12.18.1
# Install MongoDB
# add mongodb apt-key
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc (https://www.mongodb.org/static/pgp/server-4.2.asc) | sudo apt-key add -
# add mongodb to source list
echo "deb [ arch=amd64,arm64 ] Index of ubuntu (https://repo.mongodb.org/apt/ubuntu) bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
# Reload local package database
sudo apt-get update -y
# Install latest mongodb
sudo apt-get install -y mongodb-org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment