CentOS / RHEL v6.x: Install And Configure Serial Console

To install and configure a serial console on CentOS or RHEL v6.x, you need to make changes to the system’s GRUB configuration, as well as the /etc/securetty and /etc/inittab files. Here are the steps you need to follow:

  1. Edit the GRUB configuration file:
    sudo nano /etc/grub.conf
  2. Add the following lines to the end of the kernel line:
    console=ttyS0,115200n8
  3. Configure the serial port in /etc/securetty:
    sudo nano /etc/securetty
  4. Add the following line to the end of the file:
    ttyS0
  5. Edit the /etc/inittab file:
    sudo nano /etc/inittab
  6. Add the following line to the end of the file:
    S0:2345:respawn:/sbin/agetty ttyS0 115200 vt100-nav
  7. Save the changes and restart the system:
    sudo reboot

After the system reboots, you should be able to access the console through the serial port using a terminal program such as minicom or screen. To connect using minicom, use the following command:

sudo minicom -b 115200 -o -D /dev/ttyS0

Note: The above steps assume that the serial port is connected to /dev/ttyS0. If your system uses a different device file for the serial port, you’ll need to adjust the steps accordingly.

Leave a Comment