mysql-mmm
一、关系图
二、安装mysql-mmm
1)安装epel
相关文档参见:http://fedoraproject.org/wiki/EPEL
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
2) monitor软件安装
[root@localhost ~]# yum install –y mysql-mmm-monitor-*
包如下:
[root@localhost ~]# rpm -qa|grep mysql
mysql-mmm-monitor-2.2.1-1.el5
mysql-mmm-2.2.1-1.el5
mysql-5.0.77-4.el5_5.4
3)数据库所在机器安装(包括master,slave)
[root@localhost ~]# yum install –y mysql-mmm-agent*
包如下:
[root@localhost ~]# rpm -qa|grep mysql
mysql-test-5.0.77-4.el5_5.4
mysql-mmm-agent-2.2.1-1.el5
mysql-5.0.77-4.el5_5.4
mysql-server-5.0.77-4.el5_5.4
mysql-devel-5.0.77-4.el5_5.4
mysql-bench-5.0.77-4.el5_5.4
mysql-mmm-2.2.1-1.el5
mysql-connector-odbc-3.51.26r1127-1.el5
三、配置文件
1)monitor配置文件
[root@localhost ~]# vi /etc/mysql-mmm/mmm_mon.conf
include mmm_common.conf
<monitor>
ip 127.0.0.1
pid_path /var/run/mysql-mmm/mmm_mond.pid
bin_path /usr/libexec/mysql-mmm
status_path /var/lib/mysql-mmm/mmm_mond.status
ping_ips 172.16.71.128,172.16.71.130 #master,slave实际数据库ip
auto_set_online 60
</monitor>
<host default>
monitor_user mmm_monitor
monitor_password 10jqka
</host>
Debug
2)通用的配置文件,在monitor及master,slave上放置的这个文件都一致
[root@localhost ~]# vi /etc/mysql-mmm/mmm_common.conf
active_master_role writer
<host default>
cluster_interface eth0
pid_path /var/run/mysql-mmm/mmm_agentd.pid
bin_path /usr/libexec/mysql-mmm/
replication_user replicant
replication_password 10jqka
agent_user mmm_agent
agent_password 10jqka
</host>
<host db1>
ip 172.16.71.128 #真实master数据库ip
mode master
peer db2
</host>
<host db2>
ip 172.16.71.130 #真实master数据库ip
mode master
peer db1
</host>
#<host db3>
# ip 192.168.100.51 #真实slave数据库ip
# mode slave
#</host>
相关新闻>>
- 发表评论
-
- 最新评论 更多>>