How to show line number in vi editor

I believe everyone facing this problem before there is no line number show in the long configuration file. Example: below screenshot, there is an syntax error at line 27 and it will take sometime to identify that particular line.

Did your guys know we can display the line number in vi text editor

Below are the steps:

  1. Press the Esc key if you are currently in insert or append mode.
  2. Press : (the colon). The cursor should reappear at the lower left corner of the screen next to a : prompt.
  3. Enter the following command:

set number

4. A column of sequential line numbers will appear at the left side of the screen. Each line number references the text located directly to the right.

🙂

RHUI – Unable to register CDS server due to certificate error

I just done RHUA setup, but i facing an error when i try to add CDS server to RHUA server. Upon check, i noticed that my RHUA certificate got issue. It is because i just changed the server hostname and the server hostname will not update the RHUI configuration files and certificate.

Below are steps to solve this issue:-

i. stop the pulp services

systemctl stop pulp\*

ii. Run the RHUI installer to update the hostname and certificate

rhui-installer –rhua=hostname <new-hostname> –certs-update

iii. Start the pulp service

systemctl start pulp\*

Now you can try to re-add the CDS server and it should working fine now.

RHEL 7/CentOS 7 – Setup local yum repository with OS installation disk or ISO file

If your server hosted in the secure environment with any internet connection, local repo is the best option for you to perform server upgrade or install software available on OS installation disk or ISO.

To perform this task, first you need to download the RHEL or CentOS installation disk or ISO file.

i. Insert the installation disk or mount the installation disk. Your may click HERE to view my previous tutorial on how to mount ISO.

In my environment, i used DVD media

Continue reading