How to Install Cezerin in CentOS 8/RHEL 8

Cezerin is a React and Node.js based eCommerce platform. With Cezerin you can create a Progressive Web Apps (PWA) easily.

Step 1: Update the packages and setup the dependencies

Update the system packages

yum -y update

Install the dependencies

yum install wget git -y

Step 2: Install nodejs

Enable the EPEL repository

yum install epel-release curl

Add the NodeJS to the repository

curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -

Install NodeJS

yum install nodejs

Check the version of NodeJS

node -v

Step 3: Install MongoDB server

Firstly, we need to add package to the repo:

vi /etc/yum.repos.d/mongo.repo

Paste the following code to the repo file:

[MongoDB]
name=MongoDB repository
baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/
gpgcheck=0
enabled=1

Install MongoDB

yum install mongodb-org

Start and Enable Mongodb

systemctl start mongodb
systemctl enable mongodb

Check the Mongodb version

mongodb --version

Step 4: Install Cezerin

Change the Directory to /opt

cd /opt

Clone the Cezerin

git clone https://github.com/cezerin/cezerin.git cezerin

Install the Cezerin

cd cezerin
npm i [email protected]
npm install
npm run build
npm run setup

After this steps you will saw a similar ouput

Start the project

npm start

To exit from the project ctrl+c

Step 5: Create service unit file

To manage Cezerin service we can create a service unit file

··· vi /etc/systemd/system/cezerin.service ···

Add the following Code

[Unit]
Description=Cezerin

[Service]
ExecStart=/usr/bin/npm start
WorkingDirectory=/opt/cezerin
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=nodejs-example

[Install]
WantedBy=multi-user.target

Reload the daemon

systemctl daemon-reload

Start and Enable the Cezerin

systemctl start cezerin
systemctl enable cezerin

Step 6: Accessing Web Interface

Newly installed Cezerin uses the default port 3000.

If the installation has been successfully completed, you will be able to see the Cezerin home page

Related Articles