Category: Uncategorized


Network configuration under RHEL 6 has slightly changed. No configuration found if you perform an minimum installation.Networking is managed with NetworkManager by default. On a server, using GUI tools is best to avoid when possible.

To make your networking work out of the box, some changes are needed in a few files.
To make the network interface to configure available with the right information, add any changes in /etc/sysconfig/networking-scripts/ifcfg-eth0. This file should contain at least the following lines :

DEVICE=eth0
HWADDR=MAC_ADDRESS
IPADDR=IP address server
NETMASK= its netmask
BROADCAST= its broadcast
BOOTPROTO=static
ONBOOT=yes
NM_CONTROLLED=no

NM_CONTROLLED set to no just tells the system not to use NetworkManager as default networking management tool.

Next step, add the following information in /etc/sysconfig/network :

NETWORKING=yes
GATEWAY= default gateway for the server
HOSTNAME=FQDN of the server

Do not forget to populate /etc/hosts file with localhost, your server’s IP address, its FQDN and aliases

Add the IP addresses of your DNS servers in /etc/resolv.conf :

cat /etc/resolv.conf

search your_domain
nameserver DNS_server1_IP_Address
nameserver DNS_server2_IP_Address

After any changes on the networking configuration, restart the related service :

root@localhost:~#service restart network

To check that the requested network interfaces are up and well configured, check their status :

root@localhost: ~#service status network

If you need to add more parameters to the configuration files above, have a look at this document available on your server :

cat /usr/share/doc/initscripts-9.03.31/sysconfig.txt

With the recent upgrade of pulseaudio to version 1.1-3, you will probably encounter error messages while playing an audio file as the ones below :

[AO_ALSA] alsa-lib: conf.c:1220:(parse_def) show is not a compound
[AO_ALSA] alsa-lib: conf.c:1686:(snd_config_load1) _toplevel_:24:26:Unexpected char
[AO_ALSA] alsa-lib: conf.c:3406:(config_file_open) /usr/share/alsa/pulse-alsa.conf may be old or corrupted: consider to remove or fix it

I had the messages above with mplayer while listening to an on-line radio.

After searches, this has been recently filed as a bug : Debian bug 661095

Look at the following configuration file : /usr/share/alsa/pulse-alsa.conf

Make a copy of it before doing any changes :

root@localhost:~# cp /usr/share/alsa/pulse-alsa.conf /usr/share/alsa/pulse-alsa.conf.save

With your favorite text editor, remove all the lines starting at line 20 until the last line. Here is what you should have at last :

root@localhost:~# cat /usr/share/alsa/pulse-alsa.conf

# This file is referred to by /usr/share/alsa/pulse.conf to set pulseaudio as
# the default output plugin for applications using alsa when PulseAudio is
# running.

pcm.!default {
    type pulse
    hint {
        show {
            @func refer
            name defaults.namehint.basic
        }
        description “Playback/recording through the PulseAudio sound server”
    }
}

ctl.!default {
    type pulse
}

You can now play any audio file with no more error messages.

Hope this help !

While executing a Python program, if you get this message “TypeError: an integer is required” , check which modules are imported. In fact, there are two methods for open(). One is a built-in function whereas the other is part of the os module.

So, if you do an import of all the methods of the os module like this way “from os import *“,  then your program will not use the open() built-in fonction. It will use os.open() instead.

Be careful !


Follow

Get every new post delivered to your Inbox.