Disable SELinux:

CentOS:

To disable SElinux, the security system within centos, you need to modify the SElinux file. Reasons for wanting to disable SElinux, would be that your server is internal, and to configure each service is a waste of time. SELinux is good for machines that are facing the internet, within a De-militarized Zone.

The SELinux configuration file is located at

/etc/selinux/config

To disable SELinux go to the configuration file look for the following line

SELINUX

then change the line to

SELINUX=disabled

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection. SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definitition file.
SETLOCALDEFS=0

The above with take effect during the next reboot, but if you need the effect to be immediate you can disable SELinux immediately at the command line with the following command

# setenforce 0

Network Time Protocol:

Keeping track of time on your server can become a bit daunting, when you start having multiple number of servers. A solution is called ntp (network time protocol). The machine ever so often, loses time, by going out up to a few hours. Defined period checks with a main time server, and adjusts your machines time if it is out from the main timeserver.

CentOS:

The following commands below will install and configure ntp under CentOS.

# yum install ntp
# chkconfig ntpd on
# ntpdate pool.ntp.org
# /etc/rc.d/init.d/ntpd restart

The results will be shown as below.

Shutting down ntpd:    [ OK ]
Starting ntpd:              [ OK ]

Ubuntu:

The following commands below will install and configure ntp under Ubuntu.

# apt-get install ntp

# /etc/init.d/ntp restart

Configuring the ntp.conf files will not be needed as they are automatically configured during installation.

Generic

Another way around this issue is to manually have the ntpdate application run directly via the cron to update the time. This issue is caused on virtual machines where the virtual software forces the virtual machine to sync with the host machine. Below is a work around. Just enter this into cron. The ip of the time server is au.pool.ntp.org

# crontab -e

*/5 * * * * /sbin/ntpdate -u 149.20.68.17