Score:-3

How to Install & Setup MEAN Stack on Ubuntu (MongoDB, Express.JS, Angular.JS, Node.JS)

cn flag

I have started learning to mean stack web development which is an open-source JavaScript framework used for developing robust applications. It is a complete packet of software tools that have everything for building dynamic websites and applications.

As a beginner, I am having issues related to installing and setup Mean Stack. I don't even know the basics of installing. I don't know what would be the consequences if I did something wrong in setup or installing.

David avatar
cn flag
You asked EXACT same question yesterday saying it was installing on windows. What has changed. my guess nothing.
The NineHertz avatar
cn flag
I would like to inform you that was supposed to be ubuntu but I wrote windows mistakenly because mostly I worked on windows so that is why I wrote windows instead of ubuntu. Thanks for asking. but now it is sorted...!!
Artur Meinild avatar
vn flag
Did you try and follow the official installation instructions for those packages? That would be a good place to start. Also, it's a good idea to experiment in a VM, and only install on your production machine when you have sorted things out.
Score:2
in flag

Generally when you see stacks like LAMP and MEAN, a person would install the software in the order of the acronym from left to right. For example:

LAMP = Linux ⇢ Apache ⇢ MySQL ⇢ PHP
MEAN = MongoDB ⇢ Express ⇢ Angular ⇢ Node

You don't need to follow the order with everything, but it generally helps to do so. Let's get you started.

I don't even know the basics of installing...

First you will need an Ubuntu 20.04 or 21.04 installation ready to use. If you do not already have Ubuntu installed, download the version you would like, get it installed, then continue with this answer.

I don't know what would be the consequences if I did something wrong in setup or installing

The consequences would be that you learn how to fix your computer if something goes wrong. This isn't necessarily a bad thing.

How to build the MEAN stack

The following steps will give you the very basics of what you need on a modern Ubuntu installation. Please note that these steps work for 20.04 and 21.04. I did not do any testing on older releases or other flavours of Ubuntu.

  1. Open Terminal (if it's not already open)
  2. Install MongoDB:
    sudo apt update 
    sudo apt install mongodb 
    
    Now you can start MongoDB:
    sudo service mongod start
    
  3. Setup Git, nom, Express and Angular:
    sudo apt install git npm
    
    Then:
    npm install express --save
    npm install angular
    
  4. Install Node.js:
    sudo apt install nodejs
    
    Now you can test that Node is properly installed by calling the prompt:
    nodejs
    
  5. Start building your websites

There's a great deal more that can be done, but these basic steps will give you everything you need to start learning MEAN development.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.