In our environment, we have a few caching servers that are distributed across branch offices. These branch offices usually lack a KVM - which means tracking down a monitor, keyboard, mouse, etc. What a pain! If only we could simply hook up a serial cable and use Putty - oh wait we can!
- Let's open up our text editor:
nano /etc/sysconfig/grub
- Find the line labeled
GRUB_CMDLINE_LINUX
and addconsole=ttyS0
to the end (this assumes your serial port is ttyS0). It should look something like this:GRUB_CMDLINE_LINUX="rhgb quiet console=ttyS0"
- Save the file and exit
- Run
stty -F /dev/ttyS0 speed 9600
- Then
grub2-mkconfig -o /boot/grub2/grub.cfg
- Finally
systemctl start getty@ttyS0
Now when you boot up the server, you can use the console port for a headless server. And if you happen to find a monitor and keyboard, you can still use that as well!