mysql集群之mysql-mmm在centos下的全程安装和配置(三)
2013-07-24 10:21
686 查看
mmm安装,配置,启动,监控
一: 下载安装MYSQL-MMM
db1,db2,db3,db4都要安装:
/soft]# wget http://mysql-mmm.org/_media/:mmm2:mysql-mmm-2.2.1.tar.gz
# mv :mmm2:mysql-mmm-2.2.1.tar.gz mysql-mmm-2.2.1.tar.gz
# tar -zxvf mysql-mmm-2.2.1.tar.gz
# cd mysql-mmm-2.2.1
# make install
二: MYSQL-MMM使用的目录和存放文件简介
文件目录 描述
/usr/lib/perl5/vendor_perl/5.8.8/MMM MMM使用的perl模块
/usr/lib/mysql-mmm MMM的脚本插件
/usr/sbin MMM的命令保存路径
/var/log/mysql-mmm MMM的日志保存路径
/etc MMM配置文件保存的路径
/etc/mysql-mmm MMM配置文件保存的路径,优先级最高
/etc/init.d/ agentd和monitor的启动关闭脚本
三: 配置MYSQL-MMM-AGENTD
db1:
# cat /etc/mysql-mmm/mmm_agent.conf
include mmm_common.conf
this db1
db2,db3类似操作。
cat /etc/mysql-mmm/mmm_common.conf 拷贝一份到db1,2,3,4
注意1:Don't forget to copy this file to all other hosts (including the monitoring host).
注意2:On the database hosts we need to edit /etc/mysql-mmm/mmm_agent.conf. Change “db1” accordingly on the other hosts:
上面是我的配置 ,只供参考。
启动MYSQL-MMM_AGENT,以及相关的一些命令,如下
/etc/init.d/mysql-mmm-agent start
/etc/init.d/mysql-mmm-agent status
ps aux | grep mmm
netstat -tulnp | grep mmm
/etc/init.d/mysql-mmm-agent --help
四。配置MYSQL-MMM-MONITOR
cat /etc/mysql-mmm/mmm_mon.conf
include mmm_common.conf
<monitor>
ip 10.1.1.12(或127.0。0.1)
pid_path /var/run/mmm_mond.pid
bin_path /usr/lib/mysql-mmm/
status_path /var/lib/misc/mmm_mond.status
ping_ips 10.77.50.11, 10.77.50.12, 10.77.50.13 (真实ip)
</monitor>
<host default>
monitor_user mmm_monitor
monitor_password mmm_monitor (创建的用户和密码)
</host>
debug 0 (0的时候不打印,1的时候打印信息)
启动MYSQL-MMM-MONITOR
/etc/init.d/mysql-mmm-monitor start
/etc/init.d/mysql-mmm-monitor --help
ps aux | grep mmm (展示如下)
root 2737 0.0 0.2 13764 8892 ? S 15:10 0:00 mmm_mond
root 2738 1.3 0.9 108480 39992 ? Sl 15:10 0:00 mmm_mond
root 2745 0.4 0.1 10676 6668 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker ping_ip
root 2748 0.5 0.1 12860 7776 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker mysql
root 2750 0.4 0.1 10676 6668 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker ping
root 2752 0.5 0.1 12860 7824 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker rep_backlog
root 2754 0.5 0.1 12860 7820 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker rep_threads
mmm管理工具的一些命令,通过help可以查看
具体实用的一些命令:
一: 下载安装MYSQL-MMM
db1,db2,db3,db4都要安装:
/soft]# wget http://mysql-mmm.org/_media/:mmm2:mysql-mmm-2.2.1.tar.gz
# mv :mmm2:mysql-mmm-2.2.1.tar.gz mysql-mmm-2.2.1.tar.gz
# tar -zxvf mysql-mmm-2.2.1.tar.gz
# cd mysql-mmm-2.2.1
# make install
二: MYSQL-MMM使用的目录和存放文件简介
文件目录 描述
/usr/lib/perl5/vendor_perl/5.8.8/MMM MMM使用的perl模块
/usr/lib/mysql-mmm MMM的脚本插件
/usr/sbin MMM的命令保存路径
/var/log/mysql-mmm MMM的日志保存路径
/etc MMM配置文件保存的路径
/etc/mysql-mmm MMM配置文件保存的路径,优先级最高
/etc/init.d/ agentd和monitor的启动关闭脚本
三: 配置MYSQL-MMM-AGENTD
db1:
# cat /etc/mysql-mmm/mmm_agent.conf
include mmm_common.conf
this db1
db2,db3类似操作。
cat /etc/mysql-mmm/mmm_common.conf 拷贝一份到db1,2,3,4
注意1:Don't forget to copy this file to all other hosts (including the monitoring host).
注意2:On the database hosts we need to edit /etc/mysql-mmm/mmm_agent.conf. Change “db1” accordingly on the other hosts:
上面是我的配置 ,只供参考。
启动MYSQL-MMM_AGENT,以及相关的一些命令,如下
/etc/init.d/mysql-mmm-agent start
/etc/init.d/mysql-mmm-agent status
ps aux | grep mmm
netstat -tulnp | grep mmm
/etc/init.d/mysql-mmm-agent --help
四。配置MYSQL-MMM-MONITOR
cat /etc/mysql-mmm/mmm_mon.conf
include mmm_common.conf
<monitor>
ip 10.1.1.12(或127.0。0.1)
pid_path /var/run/mmm_mond.pid
bin_path /usr/lib/mysql-mmm/
status_path /var/lib/misc/mmm_mond.status
ping_ips 10.77.50.11, 10.77.50.12, 10.77.50.13 (真实ip)
</monitor>
<host default>
monitor_user mmm_monitor
monitor_password mmm_monitor (创建的用户和密码)
</host>
debug 0 (0的时候不打印,1的时候打印信息)
启动MYSQL-MMM-MONITOR
/etc/init.d/mysql-mmm-monitor start
/etc/init.d/mysql-mmm-monitor --help
ps aux | grep mmm (展示如下)
root 2737 0.0 0.2 13764 8892 ? S 15:10 0:00 mmm_mond
root 2738 1.3 0.9 108480 39992 ? Sl 15:10 0:00 mmm_mond
root 2745 0.4 0.1 10676 6668 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker ping_ip
root 2748 0.5 0.1 12860 7776 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker mysql
root 2750 0.4 0.1 10676 6668 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker ping
root 2752 0.5 0.1 12860 7824 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker rep_backlog
root 2754 0.5 0.1 12860 7820 ? S 15:10 0:00 perl /usr/lib/mysql-mmm//monitor/checker rep_threads
mmm管理工具的一些命令,通过help可以查看
具体实用的一些命令:
相关文章推荐
- mysql集群之mysql-mmm在centos下的全程安装和配置(四)
- mysql集群之mysql-mmm在centos下的全程安装和配置(一)
- mysql集群之mysql-mmm在centos下的全程安装和配置(二)
- CentOS 6.2安装配置LAMP服务器(Apache+PHP5+MySQL)
- CentOS 7 yum安装配置mysql
- CentOS下使用yum安装Mysql,以及Mysql主从复制的配置
- CentOS下安装配置 Ngnix_tomcat_PHP_Mysql
- Hadoop集群安装配置教程_Hadoop2.6.0_Ubuntu/CentOS
- CentOS和Ubuntu下安装配置Greenplum数据库集群(包括安装包和源码编译安装)
- Hadoop集群(第1期)CentOS安装配置
- mysql-mmm 安装配置(双主)
- 阿里云服务器CentOS 5.7(64位)安装配置LAMP服务器(Apache+PHP5+MySQL)
- CentOS系统安装配置Nginx+tomcat+jdk+MySQL服务器环境
- CentOS一键完成MySQL安装、配置密码、修改ip访问权限
- Hadoop集群(第1期)_CentOS安装配置
- mysql 5.7.17 安装配置方法图文教程(CentOS7)
- CentOS 7下httpd-2.4.6的mod_auth_mysql安装及配置
- Hadoop集群(第1期)_CentOS安装配置
- MySQL集群安装与配置
- 阿里云CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)