Thursday 14 May 2020

Permanent hostname setup for RHEL7

Step 1

Set the host name on NMTUI tool like following

nmtui


set host name  

then save and exit

Step 2

add the following line in last line of /etc/sysctl.conf

vi  /etc/sysctl.conf

kernel.hostname = hostname.example.com

then save and exit the editor and run the following command

sysctl -p

Step 3

now add the following line that mentioned below in the following file last line  /etc/cloud/cloud.cfg

vi /etc/cloud/cloud.cfg

preserve_hostname: true

save and exit  

then reboot and try again.

How to provide full access for shm partition

For the full access permission for the /dev/shm, just modify the following file with following changes.

open the following file with vi editor

vi /usr/lib/dracut/modules.d/95fcoe/cleanup-fcoe.sh


Just modify the 7th line mkdir -m 0755 to 0777 


then save and restart your server and check

Thursday 16 April 2020

How to change default kernel in rhel 7

Step 1 

check the running kernel version

uname -a


Step 2 

List the kernel 

awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg



Step 3 

set the kernel that you want to put it default with following command

grub2-set-default 2


Step 4

Changes to /etc/default/grub require rebuilding the grub.cfg file as follows

grub2-mkconfig -o /boot/grub2/grub.cfg

reboot and check


Permanent hostname setup for RHEL7

Step 1 Set the host name on NMTUI tool like following nmtui set host name   then save and exit Step 2 add the following l...