How to change a timezone on RHEL7 Linux server

Changing a timezone on Redhat 7 Linux server is a easy task which can be done on a command line with a few commands. First find your timezone using timedatectl command. The following linux command will list all timezones:

[root@rhel7 ~]# timedatectl list-timezones

To narrow down the search you can use grep to search for a specific city. For example:

[root@rhel7 ~]# timedatectl list-timezones | grep -i bratislava
Europe/Bratislava

Read more

Using timedatectl command to change time and date on RHEL7 Linux system

When not using NTP you may need to set your system time manually. You have two options to set time and date on your RHEL7 linux. First option is to use date command to do this job or engage dedicated systemd timedatectl command. By default and without any arguments timedatectl will display a current time, local, universal and RTC times:

[root@rhel7 ~]# localectl
   System Locale: LANG=en_AU.iso88591
       VC Keymap: us
      X11 Layout: us
[root@rhel7 ~]# timedatectl
      Local time: Thu 2014-09-04 18:30:11 WST
  Universal time: Thu 2014-09-04 10:30:11 UTC
        RTC time: Thu 2014-09-04 10:30:10
        Timezone: Australia/Perth (WST, +0800)
     NTP enabled: n/a
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a

Read more

Sync an accurate time using ntpdate on RHEL7 Linux server

To sync a correct time on your Redhat server with a NTP publicly available time servers first you need to install ntpdate package:

[root@rhel7 ~]# yum install ntpdate

To check your current time use date command:

[root@rhel7 ~]# date
Thu Sep  4 17:20:42 WST 2014

Next, we can use pool.ntp.org timeserver to synchronize our time. This is be done with ntpdate command:

[root@rhel7 ~]# ntpdate pool.ntp.org
11 Dec 06:08:13 ntpdate[2225]: step time server 173.230.144.109 offset 8426822.014383 sec

Read more

Update GRUB2 menu timeout on RHEL 7 Linux

The default settings for the GRUB2 timeout menu selection during the system boot is 5 seconds. To change this value open /etc/default/grub grub default config file. The content of the file looks similar the the one shown below:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root crashkernel=auto  \ 
rd.lvm.lv=rhel/swap vconsole.font=latarcyrheb-sun16 vconsole.keymap=us rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

Read more

Persistent/Automatic after reboot kernel module loading on CentOS/Redhat Linux

This config will describe a procedure on how to persistently load kernel modules during a boot time on CentOS or Redhat Linux system. In the below commands will use nf_conntrack_pptp as a sample module. Replace the name of this module with a module name you wish to load.

First, create a script within /etc/sysconfig/modules/ directory with a file extension modules. Where the name of the script can be any name of your choice. In our case the script will be called nf_conntrack_pptp.modules. Enter a following code into your new nf_conntrack_pptp.modules script while replacing the name of the module with the one you wish to load:

#!/bin/sh
exec /sbin/modprobe nf_conntrack_pptp  >/dev/null 2>&1

Read more

memtest+ redhat 7 grub menu available

Installation of Memtest+ RAM memory test tool on Redhat 7 Linux

Installation of Memtest+ RAM memory test tool on Redhat 7 Linux

Memtest is a quite handy tool when troubleshooting hardware problem and specifically problems related to Random Access Memory (RAM). After installation the memtest+ tool will become available among other boot options. To install memtest+ on RHEL 7 Linux server execute the following linux command:

# yum install memtest86+
...
Running transaction
  Installing : memtest86+-4.20-12.el7.x86_64      1/1 
  Verifying  : memtest86+-4.20-12.el7.x86_64      1/1 

Installed:
  memtest86+.x86_64 0:4.20-12.el7

Read more

How to reset the root password in RHEL7/CentOS7/Scientific Linux 7- based systems

Objective

Resetting the root password in RHEL7/CentOS7/Scientific Linux 7

Requirements

RHEL7 / CentOS7 / Scientific Linux 7

Difficulty

MODERATE

Instructions

Things have changed in the RHEL7 world and so has the preferred way of resetting the root password. Although the old way of interrupting the boot process (init=/bin/bash) still works, it is no longer bulletproof and recommended.
‘Systemd’ uses ‘rd.break’ to interrupt the boot. Let’s have a quick walk through the whole procedure.

Read more