Search The Hostwinds Guides Knowledge Base

Install MEAN Stack on Ubuntu 18.04 (4 Steps)

Share This Article [TheChamp-Sharing]

What is the MEAN Stack?

The MEAN stack has been quickly rising in popularity as a rubust Javascript-based development stack. The name MEAN referes 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 MondoDB

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:// --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 xenial/mongodb-org/3.6 multiverse

Next, install:

sudo apt install mogodb-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 Dependancies

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

git clone

Navigate to the new directory:

cd mean

Use NPM to automatically set up all remaining dependancies:

npm install

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

npm start


Related Articles: