Thursday, August 30, 2012

Disabling virbr0

I notice there is virbr0 interface on my CentOS Machine. There is no kvm running on this machine so I guess there is no need for this interface.
virbr0    Link encap:Ethernet  HWaddr 52:54:00:56:BD:B2
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:9410 (9.1 KiB)
To disable, just do the following:
[root@centosprod1 iptables-1.4.7]# virsh net-list
Name                 State      Autostart
-----------------------------------------
default              active     yes

[root@centosprod1 iptables-1.4.7]# virsh net-destroy default
Network default destroyed

[root@centosprod1 iptables-1.4.7]# virsh net-undefine default
Network default has been undefined

[root@centosprod1 iptables-1.4.7]# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon: 16:46:33.012: 2051: info : libvirt version: 0.9.4, package: 23.el6 (CentOS BuildSystem , 2011-12-08-01:26:50, c6b18n3.bsys.dev.centos.org)
16:46:33.012: 2051: warning : virGetHostname:1884 : getaddrinfo failed for 'centosprod1': Name or service not known
                                                           [  OK  ]
virbr0 is now gone. Verify it by running ifconfig -a
[root@centosprod1 iptables-1.4.7]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:80:8D:19
          inet addr:10.0.1.101  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe80:8d19/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:743 errors:0 dropped:0 overruns:0 frame:0
          TX packets:708 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:71738 (70.0 KiB)  TX bytes:111377 (108.7 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:78 errors:0 dropped:0 overruns:0 frame:0
          TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6054 (5.9 KiB)  TX bytes:6054 (5.9 KiB)

[root@centosprod1 iptables-1.4.7]# virsh net-list
Name                 State      Autostart
-----------------------------------------

Monday, August 27, 2012

apu library not found

I'm compiling mod_security to patch with apache. However, I encountered the following when patching mod_security with the command apxs on the apache.
checking for libapu config script... no
configure: *** apu library not found.
configure: error: apu library is required
Solution:
Install apr-util-devel. I install it via yum and this resolves the error.
yum -y install apr-util-devel