MMM安裝、MHA安裝

pathfinder_cui發表於2015-11-20
yum install -y gcc gcc-c++


安裝MMM的資料來源
wget
rpm -ivh epel-release-6-8.noarch.rpm
yum install -y mysql-mmm*




安裝MHA資料庫源
/etc/init.d/mysql start
echo "/usr/local/mysql/lib" > /etc/ld.so.conf.d/mysql-x86_64.conf
ldconfig
ldconfig -p | grep mysql
export PATH=/usr/local/mysql/bin:$PATH
yum install -y gcc gcc-c++ perl-DBD-MySQL  perl-DBI "perl(DBD::mysql)" "perl(Test::Deep)" "perl(Test::More)" perl-Time-HiRes perl-CPAN

======================================================================================
注:
手工安裝DBD安裝:
export PATH=/usr/local/mysql/bin:$PATH;
wget
tar xf DBD-mysql-4.033.tar.gz
cd DBD-mysql-4.033
perl Makefile.PL - mysql_config=/usr/local/mysql/bin/mysql_config
make
make test
make install
=======================================================================================
自動安裝DBD安裝
vim install.sh
#!/bin/bash
wget --no-check-certificate
mv cpanm /usr/bin
chmod 755 /usr/bin/cpanm
cat >/root/list<<EOF
install Algorithm::Diff
install Class::Singleton
install DBI
install DBD::mysql
install File::Basename
install File::stat
install File::Temp
install Log::Dispatch
install Log::Log4perl
install Mail::Send
install Net::ARP
install Net::Ping
install proc::Daemon
install Thread::Queue
install Time::HiRes
EOF
for pkg in $(cat /root/list)
do
cpanm $pkg
done


在所有伺服器上安裝
cd
wget
tar xf mha4mysql-node-0.53.tar.gz
cd mha4mysql-node-0.53
perl Makefile.PL
make && make install

在監控主機上安裝
wget
tar xf mha4mysql-manager-0.53.tar.gz
cd mha4mysql-manager-0.53
perl Makefile.PL
make && make install

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29620572/viewspace-1842211/,如需轉載,請註明出處,否則將追究法律責任。

相關文章