-
Notifications
You must be signed in to change notification settings - Fork 56
Building PM2
aborkar-ibm edited this page May 20, 2020
·
56 revisions
The instructions provided below specify the steps to build PM2 latest version on Linux on IBM Z for following distributions:
- RHEL (7.6, 7.7, 7.8, 8.1, 8.2)
- SLES (12 SP4, 12 SP5, 15 SP1)
- Ubuntu (16.04, 18.04, 20.04)
General Notes:
- When following the steps below please use a standard permission user unless otherwise specified.
- A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
- RHEL (7.6, 7.7, 7.8, 8.1, 8.2)
sudo yum install -y wget tar xz
- SLES (12 SP4, 12 SP5, 15 SP1)
sudo zypper install -y wget tar xz
- Ubuntu(16.04, 18.04, 20.04)
sudo apt-get update
sudo apt-get install -y wget tar xz-utils
- Install Node.js
export SOURCE_ROOT=/<source_root>/
cd $SOURCE_ROOT
wget https://nodejs.org/dist/v13.5.0/node-v13.5.0-linux-s390x.tar.xz
tar xf node-v13.5.0-linux-s390x.tar.xz
mv node-v13.5.0-linux-s390x nodejs
export PATH=$SOURCE_ROOT/nodejs/bin:$PATH
npm install pm2 -g
var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Welcome to pm2\n");
});
server.listen(8080);
console.log("Server running at http://127.0.0.1:8080/");
pm2 start app.js
Note: The application server will be started and serving at http://127.0.0.1:8080/
.
pm2 monit
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.