Hostwinds Tutorials

Search results for:


Table of Contents


What is the MEAN Stack?
Step 1: Install MEAN
Step 2: Install MongoDB
Step 3: Install NodeJS, Git, and NPM
Step 4: Install Remaining Dependencies

Install MEAN Stack on Ubuntu 18.04 (4 Steps)

Tags: Ubuntu 

What is the MEAN Stack?
Step 1: Install MEAN
Step 2: Install MongoDB
Step 3: Install NodeJS, Git, and NPM
Step 4: Install Remaining Dependencies

What is the MEAN Stack?

The MEAN stack has been quickly rising in popularity as a robust Javascript-based development stack. The name MEAN refers to its components; MongoDB, ExpressJS, AngularJS, and NodeJS.

Step 1: Install MEAN

For this installation, we will be using Ubuntu 18.04 in this guide.

Before starting, make sure you run the following commands on your Hostwinds VPS or Dedicated Server to make sure you are up to date:

sudo apt-get update
sudo apt-get dist-upgrade

Step 2: Install MongoDB

You have the option of installing MongoDB from the Ubuntu repository, but it is frequently out of date. We will be installing right from the MongoDB repository.

Add the MongoDB key:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

The next step is to create a file by using your preferred text editor. We will be using vi in this guide:

sudo vi /etc/apt/sources.list.d/mongodb.list

Once you have the file open, add the following line:

deb https://repo.mongodb.org/apt/ubuntu xenial/MongoDB-org/3.6 multiverse

Next, install:

sudo apt install MongoDB-org

Step 3: Install NodeJS, Git, and NPM

You can install the LTS version of Node from the package manager:

sudo apt install nodejs git npm

Step 4: Install Remaining Dependencies

The easiest way to get everything else set up is to clone the mean.io repo to the path where you will be building your project. You can use the following command:

git clone https://github.com/linnovate/mean.git

Navigate to the new directory:

cd means

Use NPM to set up all remaining dependencies automatically:

npm install

Now you can utilize NPM to spin up the server for your application:

npm start

Written by Hostwinds Team  /  September 5, 2019