0% found this document useful (0 votes)
783 views

Aapanel Nodejs Centos7 Setup

1. The document provides steps to install aaPanel and manage a Node.js application using PM2 on a CentOS 7 server. It also covers installing MongoDB using aaPanel. 2. Key steps include updating the server, downloading the aaPanel installation script, running the script, logging into the aaPanel interface, setting up LNMP, verifying installation, creating an FTP user, installing PM2 from the app store, creating a test Node.js app, starting the app with PM2, opening ports, and verifying the app runs correctly. 3. MongoDB is then installed using aaPanel, its status is checked, and a database can be created.

Uploaded by

Gerson
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
783 views

Aapanel Nodejs Centos7 Setup

1. The document provides steps to install aaPanel and manage a Node.js application using PM2 on a CentOS 7 server. It also covers installing MongoDB using aaPanel. 2. Key steps include updating the server, downloading the aaPanel installation script, running the script, logging into the aaPanel interface, setting up LNMP, verifying installation, creating an FTP user, installing PM2 from the app store, creating a test Node.js app, starting the app with PM2, opening ports, and verifying the app runs correctly. 3. MongoDB is then installed using aaPanel, its status is checked, and a database can be created.

Uploaded by

Gerson
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Contents

1 Introduction 2

2 installation of aaPanel on centos7 2

3 Install PM2 app from aaPanel 6

4 install mongodb using aaPanel 12


1 Introduction
Documentation is description installation of aaPanel and nodejs on centos7 and
manage nodejs app using PM ,we assuming we are using a server ip
206.189.230.88 and using ssh you can login to our server as below
ssh [email protected]

2 installation of aaPanel on centos7


1 Update the system first
# yum update -y

2 install wget to be used the installation script


# yum install wget -y

3 Now Download the installation script from aaPanel:


# wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh -O install.sh

4 now start installation by running script as below :


# bash install.sh

5 the installation script should finished as below


6 now you get your aaPanel to as above info , just go to
http://206.189.230.88:8888/5f2ed2ed and enter above cerdential as bellow

7 once login choose LNMP setup and click on One-click button

8 once click all packages gonna installed


9 once aaPanel installed , you will get this page

10 verify all packages are finished correctly check packages tab


11 create an ftp user

12 Testing ftp user by login to ftp://206.189.230.88/ using


ftpuser/t47n8CnH7eYdy8LD shown above
3 Install PM2 app from aaPanel
1 First update list of app from App store tab and wait till update

2 install PM2 Install PM2 package go to app store and looking about PM
package as below , wait until installed , if it multiple page you can go to
next page to find it out

3 refresh aaPanel and verify that PM already installed


4 verify

5 create a nodjs app called test_app located in dir /www/wwwroot/app/ and


the app.js is the startup file, now we need to create the new dir as path
/www/wwwroot/app/
6 create a new a file to called app.js
7 write app.js contents as below, save and exist

const http = require('http');

const hostname = '206.189.230.88';


const port = 3000;

const server = http.createServer((req, res) => {


res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('This is a test fro nodjs app.js!\n');
});

server.listen(port, hostname, () => {


console.log(`Server running at http://${hostname}:${port}/`);
});
8 time to start this nodjs app as below , go to home tab and start app
as above your test_app is running and working well

9 now you can manage your app life cycle as below option
(stop,restart,mapping,del)

10 open port on aaPanel from security tab to allow app reachable from
outside

11 verify port 3000 already opened


12 now you can access your app using http://206.189.230.88:3000

4 install mongodb using aaPanel

1 Install mongodb package


2 once installed you can find it on home tab

3 you can check mongdb status from Home tab as below


4 you can create a database also

You might also like