Skip to main content

Posts

Showing posts from July, 2013

munin apache server-status

When you want to monitor Apache with Munin, you have to let Munin node access the extended server status.

The server status is available on http://server/server-status and it has to be secured.

Firts, enble Extended Server Status.
In httpd.conf (or whatever is used by you installation)
ExtendedStatus On Second, in the same file:

<Location /server-status>    SetHandler server-status    Order deny,allow    Deny from all    Allow from 127.0.0.1</Location>
With these settings, you should get Apache accesses graph on Munin.

CentOS6 packaging basic environment

When working on packaging some unpackaged yet software for CentOS, I often start with a clean minimal VM and then setup a new development+packaging environment.

This becomes repetitive so that I needed a memo in order to just copy/paste.

Note that this is just the very basic packaging tools I need and this does not override any official packaging guide.


sudo yum -y install rpm-build rpmdevtools redhat-rpm-config make gcc autoconf automake gcc-c++ yum-utils
sudo yum -y groupinstall "Development Tools"
Then I install the complete build dependencies depending on the package I want to build.

After this, I have to setup a minimal build environment:
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacrosWhen building with "rpmbuild" I might encouter some insatisfied build dependencies.
This is solved with 

yum-builddep /path/to/package.spec


Libvirt KVM fixed IP address

When playing with KVM LibVirt Vms, I often need them to have fixed IP address. Ironically, I enjoy fixing them with DHCP. Here is the “default” configuration I use in order to fix them.
Redefining the "default" network is done with:

virsh --connect qemu:///system net-destroy default
virsh --connect qemu:///system net-undefine default virsh --connect qemu:///system net-define /tmp/network.xml virsh --connect qemu:///system net-start default
Feel free to get inspiration: <network> <name>default</name> <uuid>7efbc96f-94e8-443f-820c-615d2e0331d5</uuid> <forwardmode='nat'/> <bridgename='virbr0'stp='on'delay='0' /> <ipaddress='192.168.122.1'netmask='255.255.255.0'> <dhcp> …