Installing M.E.A.N. on Ubuntu


The MEAN stack is comprised of 4 key elements that work together to dish out some powerful Javascript-FU. It is fairly easy to install the stack, but you want to stay away from the sources included with most package managers as they tend to be a bit out of date. I have comprised a list of ways to install the MEAN stack with the newest versions below.


The most obvious option would be to head on over to and pull down the pre-compiled version for your O.S. If that is not an option for you, you can also get the source code. There is a great document on the Github Wiki page showing how to install from source.

If you plan or have need to work with more than one version of Nodejs on a single machine you may want to install via NVM (Node Version Manager). This will allow you to install any number of versions and switch between them with east. You can find the Github project here NVM.


Express is the framework for Nodejs that allows you to build out your applications back end. In order to use Express you will need to install it via NPM (Node Package Manager).

npm install -g express && nmp install -g express-generator

A brief note should be mentioned about the '-g' switch. Normally Node will install the package dependencies for a project in the projects directory. In the case of a library like Express, we want that functionality to be available to us anywhere. When you use '-g' you are telling NPM that you would like this package to be installed globally.


Angularjs is the wizard that supplies the front end magic to the MEAN stack. It is a Javascript library that handles all sorts of cool things like two-way-binding and HTML Directives. There is technically nothing to install for Angularjs, you merely need to include the Javascript files in your project and link them in your HTML.


When Nodejs, Express, and Angular are done dishing out some Javascript-FU they need a place to record the carnage, this is where MongoDB comes into the picture. MongoDB is a Open Source No-SQL document store. There is an excellet write up on how to install MongoDB on Ubuntu here.


Installing Node and NPM