Tag Archive : centos

/ centos

How to Set Up Repoforge Repository

December 9, 2015 | Article | 2 Comments

Repoforge, previously known as RPMforge, maintains a repository of RPM packages for Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux. If you are a RHEL or CentOS user, it is strongly recommended to set up Repoforge repository on your system, as it contains many useful software packages that are not available in existing stock repositories.

The configuration of Repoforge is not so difficult. Here in this article we will try to do it.

In this article, we will use CentOS 6.3 as example machine.


In order to enable Repoforge repository on your CentOS system, you need to check CentOS version. Though we said earlier that we use CentOS 6.3, you can also check your CentOS version by running the following command.

cat /etc/redhat-release

You should also check your architecture, whether 32-bit (i.e., i686) or 64-bit (i.e., x86_64) based:

uname -a

The configuration would depend on your version.

For 32-bit CentOS 6.*:

sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

For 64-bit CentOS 6.*:

sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

For 32-bit CentOS 5.*:

sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm

For 64-bit CentOS 5.*:

sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm


Once repoforge ins installed, you can use yum to install all available packages from the repoforge repo.

How to Set Up EPEL Repository

December 9, 2015 | Article | 1 Comment

EPEL, Extra Packages for Enterprise Linux, a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL). The project was started because many Fedora contributors wanted to use the Fedora packages they maintain on Red Hat Enterprise Linux (RHEL) and its compatible derivatives.

The configuration of EPEL is not so difficult. Here in this article we will try to do it.

Configuring EPEL is strongly recommended if you are using RHEL or its derivatives (CentOS, Fedora, Scientific Linux, etc). Once you set up EPEL repository, you can use yum command to install any of close to 7,000 EPEL packages.

In this article, we will use CentOS 6.3 as example machine.


In order to enable EPEL repository on your CentOS system, you need to check CentOS version. Though we said earlier that we use CentOS 6.3, you can also check your CentOS version by running the following command.

cat /etc/redhat-release

The configuration would depend on your version.

For CentOS 6.*:

sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm

For CentOS 5.*:

sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/5/i386/epel-release-5-4.noarch.rpm


To verify that EPEL yum repository has been set up successfully, run the following command to list all available repositories on your system.

yum repolist

And you should see the list like this:

repo id            repo name                                              status
base               CentOS-6 - Base                                        4,776
epel               Extra Packages for Enterprise Linux 6 - i386           6,913
extras             CentOS-6 - Extras                                         17
updates            CentOS-6 - Updates                                       960
repolist: 12,666

And you have done it.

Bonding Network Interface on CentOS 6

December 9, 2015 | Uncategorized | No Comments

Is your machine has two or more network interface?

Bonding is same as port trunking. Both word refers to same technique.

Technically speaking, bonding will aggregate two or more ports (network interfaces / NIC) into a single group. It will effectively combine them into a single connection, using only one IP address. It allows us to create multi-gigabit pipes to transport traffic through the highest traffic areas of our network.

Imagine we have three megabits ports into one three-megabits trunk port. This is equivalent with having three megabits speed. While in upper layer, we only need to manage one interface which is the bonding channel.

In this article we will discuss about how to implement bonding on CentOS, in specific to CentOS 6.

The Modes

Bonding have several modes of operations which will determines the bond’s behavior.

mode 1: active-backup
Only one slace in the bond is active. A different slave become active if and only if the active slave fails. The bond’s MAC address is externally visible on only one port (network adapter).
mode 2: balance-xor
Transmit based on [ (source MAC address XOR’d with destination MAC address) modulo slave count ]. It looks confusing but it is pretty straightforward. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.
mode 3: broadcast
Transmit everything on all slave interfaces. This mode provides fault tolerance
mode 4: 802.3ad
Refers to IEEE 802.3ad Dynamic Link Aggregation. Create aggregation gorups that share the same speed and duplex settings. It will utilizes all slaves in the active aggregator according to 802.3ad specification. To use this method we need a switch that supports IEEE 802.3ad Dynamic LInk Aggregation. Most switches will require some type of configuration.
mode 5: balance-tlb
Adaptive transmit load balancing. No special switch support. The outgoing traffic is distributed according to the current load which is computed relative to the speed on each slave. Incoming traffic is received by current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
mode 6: balance-alb
Adaptive load balancing. Similar to tlb (transmit load balancing) but also use receive load balancing (rlb) for IPv5 traffic. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP replies sented by the local system on their way out and overwrites the source hardwares address with the unique hardware address of on of the slaves in the bond such that different peers use different hardware address for the server.

For more information, please refers to Linux Channel Bonding Project: http://sourceforge.net/projects/bonding/

Creating a Bonding Channel

Edit /etc/modprobe.conf, make new file if it doesn’t exists. Then write these lines into it:

alias bond0 bonding
options bond0 miimon=80 mode=<mode>

<mode> is the bonding mode, refer to previous section for description of each mode. In this article we will use mode 5.

Creating Interface

Next we create a logical interface. Edit /etc/sysconfig/network-scripts/ifcfg-bond0  (bond-zero) or create it if it doesn’t exists.

# /etc/sysconfig/network-scripts/ifcfg-bond0

Adjust the content with your condition. In this scenario, the bond channel have IP address The bond channel is avalable on boot.

Configuring Interface

At this point, we have create a bonding channel.

Suppose we have two interface, eth0 and eth1 and want to aggregate them into bond0. The eth0 and eth1 will be the slave.

Edit /etc/sysconfig/network-scripts/ifcfg-eth0 or your file corresponded to eth0

# /etc/sysconfig/network-scripts/ifcfg-eth0

Edit /etc/sysconfig/network-scripts/ifcfg-eth1 or your file corresponded to eth1

# /etc/sysconfig/network-scripts/ifcfg-eth1

Then restart the network service.

service network restart

Social Share Buttons and Icons powered by Ultimatelysocial