Linux下keepalived+mysql实现高可用
# ps aux | grep keepalivedroot 25180.00.041796 936 ? Ss 19:35 0:00 keepalived -D
root 25190.00.1439002152 ? S 19:35 0:00 keepalived -D
root 25200.00.0439001572 ? S 19:35 0:00 keepalived -D
root 26100.00.0 103240 860 pts/0 S+ 23:07 0:00 grep keepalived
# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2237/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1041/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1416/master
tcp 0 0 0.0.0.0:5672 0.0.0.0:* LISTEN 1429/qpidd
tcp 0 0 :::22 :::* LISTEN 1041/sshd
tcp 0 0 ::1:25 :::* LISTEN 1416/master
# service mysqld stop
Shutting down MySQL... SUCCESS!
# ps aux | grep keepalived
root 26400.00.0 103240 856 pts/0 S+ 23:07 0:00 grep keepalived
# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1041/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1416/master
tcp 0 0 0.0.0.0:5672 0.0.0.0:* LISTEN 1429/qpidd
tcp 0 0 :::22 :::* LISTEN 1041/sshd
tcp 0 0 ::1:25 :::* LISTEN 1416/master
#
页:
[1]