1

I am going to work on a remotely located CentOS machine without internet. I do not know its situation and it is very hard for me to move things between. In other words I have only one-shot for setting it up, so I want to be well-prepared for every possible state of the machine.

I will need some programs, so I downloaded .rpm packages in my Windows machine. I am planning to transfer them to the CentOS machine and install with RPM. The question is whether there is a chance that the machine does not have RPM? And if yes, what should I do to get RPM and install the .rpm packages?

4

CentOS is rpm-based; that means that everything on that server is installed with rpms. Theoretically, it is possible that someone removed the rpm package, but then you're in big trouble. If it is just any normal CentOS machine, then rpm is surely present.

3

No; if someone removed yum/rpm it's no longer CentOS. You could bring live ISOs of CentOS/Ubuntu/Manjaro in case you need any base system components. Generally bringing individual rpm files can be a problem because you may be missing the correct version of dependencies, so it's best to bring a copy of a rpm repositories (the base one is included on live ISOs), if you have a fast connection and plenty of free space you can look up how to make a full offline clone of a distributions repositories.

yum install -y createrepo yum-utils
reposync -p /var/www/html/repo -r <REPOID> -l
createrepo /var/www/html/repo
  • Can I make the offline clone on my Windows Pc? – trxrg Dec 4 '18 at 13:40
  • @trxrg yes, but you may want to install CentOS in virtualbox on Windows to make it easy on yourself access.redhat.com/solutions/9892 – user1133275 Dec 4 '18 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.