Sunday 13 May 2012

Change eth1 back to eth0


Change network device name from eth1 back to eth0

            The interface name of a network device increases if the mac address of the physical or virtual network card changes. A common case is if you made a clone of a virtual machine for example via VMware or KVM or replaced a physical network card in a non virtualized server.

            If it’s a CentOS 6 machine we need to change 2 files to rename the interface for example from eth1 back to eth0.

            One file “70-persistent-net.rules” is the udev rule for network devices which is located in “/etc/udev/rules.d” directory.

# vim /etc/udev/rules.d/70-persistent-net.rules                      (Edit this file)

            Copy the new mac address to the line of our eth0 rule and delete the new rule for eth1.

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:50:56:b2:23:e0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

            Modify the network configuration located under “/etc/sysconfig/network-scripts/ifcfg-eth0”,  and replace the old IP with the new one and the old mac address with the new mac address.

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

             To be sure everything works fine reboot the machine.
# init 6

Monday 7 May 2012

Disable SELinux


Disable SELinux

4 method to disable SELinux temporarily or permanently.

Method 1: Disable Temporarily.
# echo 0 > /selinux/enforce
# cat /selinux/enforce
  0
# setenforce 0

Method 2: Disable Permanently.
# vim /etc/selinux/config
  SELINUX=disables
:wq!
Method 3: Disable from Grub Boot loader.
# vim /boot/grub/grub.conf
Go to the end of “kernel” line and add “selinux=0”
:wq!

Method 4: Disable only a specific service in SELinux – HTTP/Apache.
# vim /etc/selinux/targeted/Booleans
  httpd_disable_trans=1
:wq!
# service httpd restart

To check SELinux status
# sestatus

Boot to UEFI Mode or legacy BIOS mode

Boot to UEFI Mode or legacy BIOS mode Choose UEFI or legacy BIOS modes while installing Windows. After Windows is installed, if you nee...