How to Install & Setup MEAN Stack on Ubuntu (MongoDB, Express.JS, Angular.JS, Node.JS)
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.
- Open Terminal (if it's not already open)
- Install MongoDB:
Now you can start MongoDB:sudo apt update sudo apt install mongodb
sudo service mongod start
- Setup Git, nom, Express and Angular:
Then:sudo apt install git npm
npm install express --save npm install angular
- Install Node.js:
Now you can test that Node is properly installed by calling the prompt:sudo apt install nodejs
nodejs
- 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.