Configure serial port connection for CENTOS
1. Modify vi/boot/grub. conf (the content is marked in red)
# Grub. conf generated by anaconda
#
# Note that you do not have to rerun grubafter making changes to this file
# NOTICE: You have a/boot partition. Thismeans that
# All kernel and initrd paths are relative to/boot/, eg.
# Root (hd0, 0)
# Kernel/vmlinuz-version ro root =/dev/sda5
# Initrd/initrd-[generic-] version. img
# Boot =/dev/sda
Default = 0
Timeout = 5
Splashimage = (hd0, 0)/grub/splash.xpm.gz
Hiddenmenu
Serial -- unit = 0 -- speed = 115200 -- word = 8 -- parity = no -- stop = 1
Title CentOS (2.6.32-431. el6.x86 _ 64)
Root (hd0, 0)
Kernel/vmlinuz-2.6.32-431.el6.x86_64 roroot = UUID = f0013145-01cc-41ba-b202-0d9b6bc785c7console = tty0 console = ttyS0, 115200rd_NO_LUKS rd_NO_MDcrashkernel = auto LANG = zh_CN.UTF-8 rd_NO_LVM rd_NO_DM
Initrd/initramfs-2.6.32-431.el6.x86_64.img
2. Modify vi/etc/inittab (the content is marked in red)
# Default runlevel. The runlevels used are:
#0-halt (Do NOT set initdefault to this)
#1-Single user mode
#2-Multiuser, without NFS (The same as 3, if you do not have networking)
#3-Full multiuser mode
#4-unused
#5-X11
#6-reboot (Do NOT set initdefault to this)
#
Id: 3: initdefault:
# Run agetty on COM1/ttyS0 and COM2/ttyS1
S0: 2345: respawn:/sbin/agetty-L-f/etc/issueserial 115200 ttyS0 vt102
3. Modify vi/etc/securetty (marked in red)
Console
Vc/1
Vc/2
Vc/3
Vc/4
Vc/5
Vc/6
Vc/7
Vc/8
Vc/9
Vc/10
Vc/11
Tty1
Tty2
Tty3
Tty4
Tty5
Tty6
Tty7
Tty8
Tty9
Tty10
Tty11
TtyS0
TtyS1
4. After the configuration is complete, restart.