installing yum CentOS 6

Discussion in 'General Discussion' started by hostingblogerh, Dec 5, 2011.

  1. hostingblogerh

    hostingblogerh New Member

    Hello, what rpms need to install yum on CentOS 6?
  2. Faris Raouf

    Faris Raouf Product Expert

    You can just use "vzup2date -z" then select the Centos 6 (or the 64-bit version).

    Note that you should press F2 after selecting it in order to customise what gets downloaded. By default it will add Plesk 10 and various other things you may now want.
  3. hostingblogerh

    hostingblogerh New Member

    i'm talking about VPS, but not hardware node. How to install yum on VPS with CentOS 6?
  4. Faris Raouf

    Faris Raouf Product Expert

    Well, you can get the RPM from a Centos mirror. Wget it or otherwise copy it, then rpm -Ivh packagename.rpm

    It has some dependancies -- Python/python-libs, I think? It should warn you about them when you try to install the yum rpm, and you'll then be able to get the appropriate packages and then rpm -Ivh one.rpm two.rpm three.rpm all in one go.

    However, it would be far easier for you to request that your VPS provider installs it for you. Are they refusing to do so?
  5. hostingblogerh

    hostingblogerh New Member

  6. Faris Raouf

    Faris Raouf Product Expert

    Well, basically you do exactly as I explaned:

    (NOTE: This is from 64-bit repo. SHould be OK for 32bit as it says "noarch" but best to check)

    rpm -Uvh yum-3.2.29-17.el6.centos.noarch.rpm

    At this point you will get a lot of errors about dependencies (I hope!)
    As long as you go then make a note of what it wants and wget all those packages from the same place (for the exact versions of each package, go to and see. Copy the url and wget it)

    Then rpm -Uvh all-the-packages-separated-by-spaces-except-for-"yum-*"

    then, finally, rpm -Uvh yum-*.rpm

    Or at least something along the lines of the above. I might have missed something out, and more importantly, if rpm -Uvh does not tell you what dependancies are missing, then all this is useless - sorry.

    But seriously - why not contact your host? A one-line command will install everything for you. If they refuse then you are with the wrong host and need to move to a provider more suited to your needs.
  7. figjam

    figjam New Member


    I've tested this on a 64 bit container but it should work on 32 bit as well. You should be able to just copy and paste to the command line. There are two separate commands because there is a stupid circular reference between yum and yum-plugin-fastestmirror/yum-metadata-parser which means that they have to be installed with the "--nodeps" switch. I have also used the generic "6" path (/centos/6/os/) which means that it definitely works on CentOS 6.2. If you try to use it on an earlier version you may get file not found errors. To correct these you will need to change the "6" to your specific version ("6.0" or "6.1") and the correct filename for the package.

    rpm -Uvh --nodeps$(uname -i)/Packages/yum-metadata-parser-1.1.2-16.el6.$(uname -i).rpm \$(uname -i)/Packages/yum-plugin-fastestmirror-1.1.30-10.el6.noarch.rpm

    rpm -Uvh$(uname -i)/Packages/gpgme-1.1.8-3.el6.$(uname -i).rpm \$(uname -i)/Packages/pygpgme-0.1-18.20090824bzr68.el6.$(uname -i).rpm \$(uname -i)/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm \$(uname -i)/Packages/python-urlgrabber-3.9.1-8.el6.noarch.rpm \$(uname -i)/Packages/python-pycurl-7.19.0-8.el6.$(uname -i).rpm \$(uname -i)/Packages/rpm-python-4.8.0-19.el6.$(uname -i).rpm \$(uname -i)/Packages/yum-3.2.29-22.el6.centos.noarch.rpm

    If you get any errors that you can't solve, post them here and I'll try to help.


  8. ainindi

    ainindi New Member

    I used the list of files to create a single command as shown below:

    for file in \
    gmp-4.1.4-10.el5.i386.rpm \
    readline-5.1-1.1.i386.rpm \
    python-2.4.3-19.el5.i386.rpm \
    libxml2-2.6.26-2.1.2.i386.rpm \
    libxml2-python-2.6.26-2.1.2.i386.rpm \
    expat-1.95.8-8.2.1.i386.rpm \
    python-elementtree-1.2.6-5.i386.rpm \
    sqlite-3.3.6-2.i386.rpm \
    python-sqlite-1.1.7-1.2.1.i386.rpm \
    elfutils-0.125-3.el5.i386.rpm \
    rpm-python-4.4.2-37.el5.i386.rpm \
    m2crypto-0.16-6.el5.1.i386.rpm \
    python-urlgrabber-3.1.0-2.noarch.rpm \
    do rpm -Uvh$file;

    The nice thing about doing it this way is that if you decided to use a local/faster mirror you only need to change the base site in one place (ie changing in the above to your mirror's location of the CentOS files).

    After installing yum you then need to run:

    yum -y update

    viagra in india

Share This Page