Exported on 25-Sep-2021 14:50:10
Parameters
1 - Install Node.js and NPM
Updates yum package list, downloads installer for Node.js 12.x and runs it to install Node.js
Login as user {s1c} on node {s1}
# Update package list
sudo yum -y update
# Download setup script
sudo curl -fsSL https://rpm.nodesource.com/setup_12.x -o nodesource.sh
# Configure install script
sudo bash nodesource.sh
# Start installation
sudo yum install -y nodejs
2 - Upload MongoDB repo config
Uploads repository for the MongoDB server.
Login as user {s1c} on node {s1}
3 - Install MongoDB Server
Installs MongoDB server.
Login as user {s1c} on node {s1}
# Move MongoDB repo file
sudo mv uploads/mongodb-org-4.4.repo /etc/yum.repos.d/mongodb-org-4.4.repo
# Install MongoDB
sudo yum install -y mongodb-org
4 - Install Express.js Framework
Installs Express.js - Fast, unopinionated, minimalist web framework for Node.js.
Login as user {s1c} on node {s1}
sudo npm i -g express
5 - Install React Development Environment
Install React.js, creates a React project and launches the React development server.
5.1 - Update apt repositories
Update apt packages.
Login as user {s1c} on node {s1}
# Install APT update
sudo yum -y update
5.2 - Install Node & NPM
This installs Node.js server into the target machine.
Login as user {s1c} on node {s1}
# Download setup script
sudo curl -fsSL https://rpm.nodesource.com/setup_12.x -o nodesource.sh
# Configure install script
sudo bash nodesource.sh
# Start installation
sudo yum install -y nodejs
5.3 - Create React App
Creates a basic React application.
Login as user {s1c} on node {s1}
# Scaffold a react project
npx create-react-app myfirstreactapp
5.4 - Start React Development Server
Starts the react development server in background.
To access the running server process, use the command:
screen -x
Login as user {s1c} on node {s1}
# Change working directory
cd myfirstreactapp
# Install screen package
sudo yum -y install screen
# Configure screen to run in background
sudo echo "zombie xy" >> ~/.screenrc
# Start development server
screen -d -m npm start
Installs MERN Stack Development Server on RHEL Based Systems.
This Blueprint Installs MERN Stack development server on a RHEL Based Systems.
MERN stands for MongoDB, ExpressJS, ReactJS and Nginx web server. This blueprint install all these components on the target system and launches a react development server.
MongoDB MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.
Express Express.js, or simply Express, is a back end web application framework for Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs.
ReactJS React is a free and open-source front-end JavaScript library for building user interfaces or UI components. It is maintained by Facebook and a community of individual developers and companies.
Nginx NginX, is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source software.
Pre-Blueprint Attune setup
Blueprint Steps