Manage different architecture rpm on RHEL/CentOS

As the new RHEL/CentOS distribution allow to manage coexists different architecture rpms in the same machine with minimum fuss. It is also highly enhancement factor for the system administrators to look into the matter of package management on those distributions.

So in this article I am trying to give you a trick or two manage different architecture rpm on same machine efficiently.

First of all you just cannot distinguish whether an rpm is a 32bit or 64bit…can you?? I don’t think so by looking at it naked eyes.

So we need a mechanism to provide some sort information us to make us understand that it is an particular architecture rpm.

Here we go:

Step 1: :Please put this line into the .rpmmacro file like this:

cat >> ~/.rpmmacros
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

and then try to run the below command to get an information about any damn package installed in the system.

Now spare of thoughts that what you try to accomplish..if you want to install only the x86_64 bit packages then you need configure the /etc/yum.conf properly i.e exclude=*.i386 *.i586 *.i686

And even if you want keep the i386* packages and install the particular x86_64 version of some packages then do it below:

yum install packagename.arch

i.e

yum install mysql.x86_64

Hope this will help.

Bhaskar Chowdhury

About unixbhaskar
GNU/Linux Consultant

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: