Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1018
  • Last Modified:

This is interesting, I am running CentOS 5.2 64bits. I removed YUM and RPM by accident, any idea how to install rpm or yum on the server again?

This is interesting, I am running CentOS 5.2 64bits. I removed YUM and RPM by accident, any idea how to install rpm or yum on the server again?

I did a mistake by using, "yum remove sqlite -y". RPM, YUM and a bunch of other related packages got deleted. Now I would like to have RPM or YUM back on the server. Any one know the best way to do it?

Its CentOS 5.2 64bits.
Thanks
0
Octalys
Asked:
Octalys
  • 3
2 Solutions
 
ben-gurCommented:
If you have X Windows install, then run the Package Management Tool - from the Main Menu => System Settings => Add/Remove Applications, reselect the packages you accidentally uninstalled and click the "update" button.
You will need the installation CD's

Second method would be a bit harder and involved installing yum from source. Download yum:
http://yum.baseurl.org/download/3.2/yum-3.2.19.tar.gz
extract to somewhere, and type "make" and "make install" (follow the INSTALL file).

Third option would be to download rpm source from here:
http://www.rpm.org/releases/rpm-4.4.x/rpm-4.4.2.3.tar.gz
Follow the INSTALL file to install rpm from source.
You might also need the help of the cpio program after installing from source. Check this thread:
http://forums.fedoraforum.org/archive/index.php/t-76200.html

Good luck,
Adam.
0
 
MysidiaCommented:
Get your install media back.

The install CDs and the CentOS FTP site both contain all the RPM files you need.

Unfortunately, since you uninstalled RPM also, you will be unable to install RPM packages.

First of all: I suggest backing up your RPM database as a just-in-case measure (not that things can get a lot worse)

I suggest booting from CD and attempting an "upgrade" procedure.


Or alternatively...

install rpm2tgz  on a second  system,   and convert the RPM files you need to "re-bootstrap"  your package management system  to  .TAR.GZ  format

Then copy the .TAR.GZ  files to the crippled system and untar the files manually.


You need to get the dependencies to make RPM working  (including SQL lite)

Once  RPM is working,  then you can use   "rpm"  commands to install package files manually.

YUM should return when you finish re-installing the YUM RPM and its dependencies.







0
 
OctalysAuthor Commented:
Thanks,

Easiest for me was to find a rpm2tgz convert then untar it. When I have installed rpm rpm-libs and sqlite, rpm was working perfectly.
0
 
OctalysAuthor Commented:
Bigdump description:
To restore the very large backup of your mySQL database (or a part of it) into the new or the same mySQL database. You can't access the server shell and you can't import the dump using phpMyAdmin or any other scripts due to hard memory resp. runtime limit of the web server.

I dont want to restore, just backup and I have access to the shell~
0
 
OctalysAuthor Commented:
Oeps, wrong window......
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now