Thursday, June 10, 2021

RHEL7 - Repurpose RHEL7 machine

 Our one of the physical machine is retired. We have to repurpose it. Had to perform the following tasks.


1. Remove software

2. Rename hostname

3. Change ILO info

4. Update monitoring tools

5. Modify backup

 

========================

1. Removed the software

- Since this is a linux physical machine, the software I had to removed came with uninstall script. 

- just ran the script, its done. 

- Remove user/group

- Remove all the files reference to the application

- Delete temp files

 

2. Rename hostname

# hostnamectl - help

 

3. Update mornitoring tools

- If you use nagios, change it or any other tools, go to settings /config and change it

 

3. Change ILO info

- Login to console and reboot your OS

- Press F9 to go to BIOS when the menu is displayed.  

- Select system config

- ILO configuration utility

- Network options

-  Change the hosttname here, it says change the DNS Name: mylxhost

- Click on save and exit

- Update DNS record (either on Windows or linux)

-  Reboot the system

- Login back and click on Security -> SSL Certificate -> Generate CSR

- Go to your cert server: 192.168.10.20/certserv

- Copy the the key (csr) and submit here.   

- Download the cert - issue : 64 base encoded


Imporrt

-> Go back and click on import/copy the downloaded certificate


4. Update the hostname record and backup

- Update your master server database 

- Schedule backup

 

 =========================

 

Change the hostname in RHEL7

There are multiple ways you can change hostname on RHEL7

1. Using hostname control - hostnamectl command
2. using NetworkManager - nmcli command
3. useing NetworkManager text user interface - nmtui command
4. Modify /etc/hostname file and reboot the machine

1. Using hostname control - hostnamectl command
# hostnamectl -h
# hostnamectl status
# hostnamectl set-hostname myhost01
# hostnamectl

2. using NetworkManager - nmcli command
# nmcli -h
# nmcli general hostname
# nmcli general hostname myhost01
# service systemd-hostnamed restart
# hostname

3. using NetworkManager TUI - nmtui command
Here, you type the command nmtui at the command prompt
- select the option "set the hostname" and press enter
- Type your hostname here and press enter
- change hostname nmtui
- Confirm the change
- and quit the screen
- Restart the systemd-hostnamed service
# systemctl status systemd-hostnamed
# hostnamectl

4. Modify /etc/hostname file and reboot the machine
1. Edit the hostfile and make the change
# vi /etc/hostname.

2. Reboot the machine and verify it
# shutdown -r now
# hostnamectl; hostname

No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...