Tag Archive: service


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

By mistake, I deleted all the content of the directory /etc/apache2/mods-enabled/.
I was unable to restart the Apache server.
I got the following error :

root@localhost:~# service apache2 restart
Restarting web server: apache2Syntax error on line 143 of /etc/apache2/apache2.conf:
Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration failed!

A similar problem has already been met and registered as a Debian bug :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392349

The command ‘Order’ in Apache configuration file is managed through authz_host module.
Following their solution, I reloaded the modules below:

root@localhost:~# a2enmod authz_host
root@localhost:~# a2enmod mime
root@localhost:~# a2enmod alias
root@localhost:~# a2enmod setenvif

and then I restarted the Apache server successfully :

root@localhost:~# service apache2 restart

For more information about Apache modules, please have a look at their official documentation :
http://httpd.apache.org/docs/2.2/

Follow

Get every new post delivered to your Inbox.