install unix program without internet access - linux

I have a red hat server (server 1) which does not have access to internet.
I also have another another red hat server (server 2) which DOES have access to internet and it can also access server 1.
I need to install programs on server 1. In this case it is about a node module called pm2. I am not sure how this can be done. Should I install the module on server 2 and then upload it to the server 1?
Or generally: what is the approach to take in this situation?

Not a RH user... but if yum works the same way as apt then if you install the package(s) on server2 then you can simply copy teh RPMs to server1 (sneaker net, etc) and then install them. So really you just need to find where yum saves rpms it downloads before it installs them.

You can install the package "downloadonly" on server 2:
# yum install yum-plugin-downloadonly
Then download the packages you want:
# yum install --downloadonly --downloaddir=<directory> <package>
Transfer and install them on Server 1:
# rpm -ivh package.rpm

Related

wget command not found on linux server

I have a linux server (completely new, web hosting, nothing is installed into it), and want to use a "wget" command. Currently, it is not found. Kernel version 2.6.32-896.16.1.lve1.4.54.el6.x86_64
I am completely new to linux, tried to solve this issue by myself, but couldn't do it. I log in into this linux server via PuTTY via my Windows OS laptop.
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz
To get "wget" to work, I will need to install it. I guess I will need to install first "sudo" and/or "apt" and/or "apt-get". But couldn't do it. Please give me a short list of steps in which order to install them.
Given your kernel version, it looks like your Linux distribution is CentOS 6 or RHEL 6. Try installing wget with this command:
yum install wget
You must be root when you run this command.
Incase you using Debian version of Linux, use the following:
sudo apt-get install wget
From kernel version, it looks like you are using RHEL/Centos 6.
Please check -
https://centos.pkgs.org/6/centos-x86_64/wget-1.12-10.el6.x86_64.rpm.html
If the mentioned dependencies exist in your system, you can directly fire the rpm command
rpm command guide -
https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch02s03.html
If it doesn't work, you need to use yum command. (You need to configure yum command first, if not configured already)
yum install wget
To configure yum command in centos6 -
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/sec-configuring_yum_and_yum_repositories
Note - you need to be root user for above activities.

Reset Realm Object Server on Linux

Can I ask that are there any scripts in Linux that similar to reset-server-realms.command on Mac that can delete all realms on server. Actually I need to reset the server and clean it before use the application officially. I try to uninstall regarding to the guides on Realm website but somehow the old data still comes up.
Thanks
Uninstalling the package doesn't remove any data. This is done on purpose, so that the upgrade process of RPMs and debs works properly.
We don't provide a script, but the easiest way to wipe everything is simply to run:
sudo rm -rf /var/lib/realm
# CentOS
sudo yum remove realm-object-server-de
sudo yum install realm-object-server-de
# Ubuntu
sudo apt-get install --reinstall realm-object-server-de
Please note that this will preserve your configuration, still. The configuration is stored in /etc/realm.

Install packages without internet Red Hat

I need to install Hyperledger on a Red Hat Enterprise Linux server that won't be connected to the internet. What I'll need to install is likely the Go language and Docker however given I have no internet connection I can't just use a package manager.
I've read about methods to do this with Ubuntu that mention copying .deb files over or otherwise using tools - would this work with RHEL and if not would anyone be able to recommend a way of doing this? (or any advice for achieveing this generally).
You can install the package "downloadonly" on a RHEL Server with internet connection:
# yum install yum-plugin-downloadonly
Then download the packages you want:
# yum install --downloadonly --downloaddir=<directory> <package>
Transfer and install them on a Server without internet connection:
# rpm -ivh package.rpm

How to run mc, htop on linux(virtual server) without compiling?

I am using a virtual shared server and I would like to have on it some programms like Midnight Commander (mc) or Htop.
The host provider doesn't provide these programs and I don't have access to any package manager or compiler.
I have ssh access to the system and I was wondering if there is a way to just copy and execute these programs without installing or compiling them.
Are there some pre-compiled versions?
PS: If you have a better sugestion for the question/title, please let me know.
You said you can't run a package manager. So the only solution I think is:
1- Upload the program, like mc to your home directory.
2- Change the permission to 774. it make mc executable
3- Open an ssh to the server and try to run it.
Maybe, if there are all the files needed installed, MC run.
But another solution if using FTP link.
You can RUN MC in you PC and LINK to the server by FTP.
FTP Link
By default, MC will show you 2 column interfaces. Left and right. Those columns are not only for local directory. You can make one of them or both connected to remote computer using FTP link.
In this case, MC will act as a FTP Client. To connect it into FTP service, you need to press “F9” > FTP Link. MC will ask credential of the FTP.
http://www.tecmint.com/midnight-commander-a-console-based-file-manager-for-linux/
You may not have access to a package manager, but are you sure you don't have a compiler?
You can get the MC source in a tar file from here.
Save it in your "local" or "src" directory and unpack with:
tar -xvjf mc-4.8.17.tar.bz2
cd into the new directory "mc-4.8.17" and compile with:
./configure --prefix=PATH
where "PATH" is the full path to your "local" directory.
Then run:
make
make install
You can install them with your package manager.
On a redhat based distribution (using rpm) :
yum install htop mc
On a debian based distribution (using deb) :
apt-get install htop mc
On others, tell me your distribution (arch linux, gentoo, slackware...)
htop install in CentOS
yum -y install epel-release
yum update
yum install htop

How to resolve dependencies while installing application on linux (CentOS 7.1)

When I tried install deluge on my CentOS 7.1 I was facing dependecy problems due to some el6 which are not meant for CentOS 7.1. So, I found this page:
https://gist.github.com/dasgoll/111f6f3364e2ab97bc08
His instructions:
Centos 7.1
yum -y install wget wget hxxp://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
rpm -ivh nux-dextop-release-0-5.el7.nux.noarch.rpm
yum -y install deluge-web
systemctl start deluge-web
systemctl stop firewalld
browse http://192.168.3.101:8112
check it
yum install deluge-console
And my question is: Why he installed "nux-dextop-release-0-5.el7.nux.noarch.rpm" from li.nux.ro (if I'm not wrong it's a repository, correct me if I'm)? Because I had this dependency problem earlier when I tried installing deluge. But when I used his instructions it resolved all the dependencies automatically for me. So does this rpm file he installed on the first place was for resolving dependencies? If not then how can one work around with dependencies while installing a piece of software/application. Than You in advance.
P.S. I asked the same question in comments there too. But I'm uncertain of receiving reply there (no offence for the guy/girl - dasgoll).
Third party package repos will often use a *-release package to contain both a yum repo definition and a rpm signing public key so that end users can install packages directly from the repo using yum instead of having to find and then download them one by one.

Resources