Atlantic.Net Blog

How to Install MEAN Stack on Oracle Linux 8

A MEAN stack is one of the most popular JavaScript technology stacks. It is a free and open-source framework that helps you build fast, robust, and maintainable production-ready web applications using MongoDB, Express, Angular, and Node.js. A MEAN stack supports the same language for both the front-end and back-end, which will increase efficiency and reduces the confusion of developers.

In this guide, we will show you how to install MEAN.JS on Oracle Linux 8.


  • A fresh Oracle Linux 8 server on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Oracle Linux 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Oracle Linux 8 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install MongoDB

MongoDB is the first component of the MEAN stack. By default, MongoDB is not included in the Oracle Linux 8 default repository, so you will need to add the MongoDB repository to your server.

nano /etc/yum.repos.d/mongodb-org-4.4.repo

Add the following lines:

name=MongoDB Repository

Next, install the MongoDB server with the following command:

dnf install mongodb-org

After installing MongoDB, start the MongoDB service and enable it to start at system reboot:

systemctl start mongod.service
systemctl enable mongod.service

You can now verify the MongoDB version using the following command:

mongod --version

You should see the following output:

db version v4.4.16
Build Info: {
    "version": "4.4.16",
    "gitVersion": "a7bceadbac919a2c035f2874c61d138fd75d6a6f",
    "openSSLVersion": "OpenSSL 1.1.1k  FIPS 25 Mar 2021",
    "modules": [],
    "allocator": "tcmalloc",
    "environment": {
        "distmod": "rhel80",
        "distarch": "x86_64",
        "target_arch": "x86_64"

Step 3 – Install Node.js

Next, you will need to install Node.js on your system. First, install all required dependencies using the following command:

dnf install curl git gcc-c++ make -y

Next, add the Node source repo using the following command:

curl -fsSL | bash -

Next, install the Node.js by running the following command:

dnf install nodejs -y

Once Node.js is installed, you can verify the Node.js version using the following command:

node --version

You will get the following output:


Step 4 – Install Express

Express is a Node.js framework that supports MVC and helps to build more scalable, structured, and dynamic websites. You can install the Express using the NPM command:

npm install -g express-generator

Once Express is installed, create a directory for the Express project with the following command:

mkdir app

Next, navigate to the app directory and create an Express project with the following command:

cd app

You will get the following output:

   create : public/
   create : public/javascripts/
   create : public/images/
   create : public/stylesheets/
   create : public/stylesheets/style.css
   create : routes/
   create : routes/index.js
   create : routes/users.js
   create : views/
   create : views/error.jade
   create : views/index.jade
   create : views/layout.jade
   create : app.js
   create : package.json
   create : bin/
   create : bin/www

   install dependencies:
     $ npm install

   run the app:
     $ DEBUG=app:* npm start

Next, run the following command to install additional dependencies:

npm install

Next, run the Express app using the following command:

DEBUG=app:* npm start

You will get the following output:

> [email protected] start
> node ./bin/www

  app:server Listening on port 3000 +0ms

Now, open your web browser and access the Express app using the URL http://your-server-ip:3000. You should see the following screen:
Express dashboard page
Press the CTRL+C on your command line interface to stop the Express app.

Step 5 – Install Angular

Angular is an MVC framework used for both the client end and the front end. It allows you to create an interactive web or mobile application.

You can install the Angular CLI by running the following command:

npm install -g @angular/cli

Once installed, create a new Angular app using the following command:

ng new angular-app

You should see the following output:

? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? CSS

Next, navigate to the angular-app directory and run your application using the following command:

cd angular-app
ng serve --host your-server-ip --port 8088

You should get the following output:

✔ Browser application bundle generation complete.

Initial Chunk Files   | Names         |  Raw Size
vendor.js             | vendor        |   1.73 MB | 
polyfills.js          | polyfills     | 315.30 kB | 
styles.css, styles.js | styles        | 207.37 kB | 
main.js               | main          |  47.74 kB | 
runtime.js            | runtime       |   6.52 kB | 

                      | Initial Total |   2.29 MB

Build at: 2022-08-23T10:25:26.405Z - Hash: 50e206289757a698 - Time: 23713ms

** Angular Live Development Server is listening on, open your browser on **

✔ Compiled successfully.

You can now access the Angular app using the URL http://your-server-ip:8088. You should see your Angular app on the following screen:
Angular dashboard page


Congratulations! You have successfully installed the MEAN stack on Oracle Linux 8. You can now use the MEAN stack in your production environment to develop fast, secure, and scalable dynamic web applications. Get started with a MEAN stack on VPS Hosting from Atlantic.Net!

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year