Skip to content

Instantly share code, notes, and snippets.

@linuxoracledev
Last active January 9, 2020 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linuxoracledev/ab2a33cc46773ad8d7c1f8aa8227027d to your computer and use it in GitHub Desktop.
Save linuxoracledev/ab2a33cc46773ad8d7c1f8aa8227027d to your computer and use it in GitHub Desktop.
How to Install MEAN Stack On Ubuntu 18.04
##Install MongoDB
#Install gnupg and its required libraries
sudo apt-get install gnupg
#Import the public key used by the package management system
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
#Create a list file for MongoDB
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
#Update local package database
sudo apt-get update
#Install the MongoDB packages
sudo apt-get install -y mongodb-org
#Unmask MongoDB
sudo systemctl unmask mongod
#Start, Stop , Restart, Check Mongodb service status
sudo service mongod start
sudo service mongod stop
sudo service mongod restart
sudo service mongod status
#Begin using MongoDB
mongo
#For absolute latest release of NodeJS
#curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
#Install NodeJS, NPM, and Git
sudo apt install nodejs npm git
#clone the mean.io repository
git clone https://github.com/linnovate/mean.git
#Change into the resulting directory.
cd mean
#Download and install all of the remaining dependencies and set them up
npm install
#Start up a development server
npm start
#Access http://localhost:3000
@linuxoracledev
Copy link
Author

linuxoracledev commented Jan 8, 2020

#Uninstall MongoDB

#Stop MongoDB
sudo service mongodb stop

#Remove Packages.
sudo apt-get purge mongodb-org*

#Remove Data Directories
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment