-
Couldn't load subscription status.
- Fork 56
Building PM2
aborkar-ibm edited this page Jun 22, 2021
·
62 revisions
The instructions provided below specify the steps to build PM2 latest version on Linux on IBM Z for following distributions:
- RHEL (7.8, 7.9, 8.2, 8.3, 8.4)
- SLES (12 SP5, 15 SP2)
- Ubuntu (18.04, 20.04, 21.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.
Note: PM2(v5.1.0) was verified at the time of creation of these instructions
- RHEL (7.8, 7.9)
sudo yum install -y wget tar xz- RHEL (8.2, 8.3, 8.4)
sudo yum install -y wget tar xz npm- SLES (12 SP5, 15 SP2)
sudo zypper install -y wget tar xz npm14- Ubuntu(18.04)
sudo apt-get update
sudo apt-get install -y wget tar xz-utils- Ubuntu(20.04, 21.04)
sudo apt-get update
sudo apt-get install -y wget tar xz-utils npm- Install Node.js (For RHEL 7.x and Ubuntu 18.04)
export SOURCE_ROOT=/<source_root>/
cd $SOURCE_ROOT
wget https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-s390x.tar.xz
tar xf node-v16.3.0-linux-s390x.tar.xz
mv node-v16.3.0-linux-s390x nodejs
export PATH=$SOURCE_ROOT/nodejs/bin:$PATH npm install pm2 -g # For RHEL 7.x, 8.x and Ubuntu 18.04
sudo npm install pm2 -g # For SLES 12-SP5, SLES 15-SP2 and Ubuntu 20.04, 21.04 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.jsNote: The application server will be started and serving at http://127.0.0.1:8080/.
pm2 monitThe 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.