PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, May 15, 2022

[FIXED] What exact command is to install pm2 on offline RHEL

 May 15, 2022     linux, node.js, pm2, redhat, ubuntu     No comments   

Issue

First of all it's not a duplicate question of below:-

How to install npm -g on offline server

https://stackoverflow.com/questions/40976100/how-to-installl-pm2-on-offline-server

I install npmbox (https://github.com/arei/npmbox) on my offline REHL server but I'm still do not know how to install pm2 or any other package using that.

Please advise.


Solution

You use npm install & pack

First on a machine that is online you install

$ npm install pm2

Then you pack it up

$ npm pack pm2

That gives you a tar file -- you copy that tar file to your offline machine and install, like

$ npm install pm2-2.2.1.tgz 

The above however only create a tarball for the specific module expluding dependencies, and you may still have dependencies that you need to resolve. While you could simply walk through and pack every dependency manually, there is a modules that will automated that for you

$ npm install -g npm-bundle

Then you can do

$ npm-bundle pm2

for the individual packages, or if you have a package.json for your project

$ npm-bundle

to pack everything in one big tarball



Answered By - Soren
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing