Percona-xtrabackup    2017-07-19 22:39:16    1198

Xtrabackup是什么Xtrabackup是一个对MySQL InnoDB做数据备份的工具,支持在线热备份(备份时不影响数据读写),是商业备份工具InnoDB Hotbackup的一个很好的替代品。

Xtrabackup有两个主要的工具:xtrabackup、innobackupex1.xtrabackup只能备份InnoDB和XtraDB两种数据表,而不能备份MyISAM数据表2.innobackupex是参考了InnoDB Hotbackup的innoback脚本修改而来的.innobackupex是一个perl脚本封装,封装了xtrabackup。主要是为了方便的同时备份InnoDB和MyISAM引擎的表,但在处理myisam时需要加一个读锁。并且加入了一些使用的选项。如slave-info可以记录备份恢复后,作为slave需要的一些信息,根据这些信息,可以很方便的利用备份来重做slave。

工具/原料

  • Ubuntu 13.10_X64+MySQL-server-5.5.35+percona-xtrabackup-2.1.7

方法/步骤

  1. 源码下载:http://www.percona.com/redir/downloads/XtraBackup/XtraBackup-2.1.7/binary/Linux/x86_64/percona-xtrabackup-2.1.7-721-Linux-x86_64.tar.gz

  2. 源码解压:tar -xzvf percona-xtrabackup-2.1.7-721-Linux-x86_64.tar.gz

  3. cd percona-xtrabackup-2.1.7-Linux-x86_64/bin/

  4. ll

    drwxr-xr-x 2 master master     4096 Jan 23 22:12 ./

    drwxr-xr-x 4 master master     4096 Jan 23 22:05 ../

    -rwxr-xr-x 1 master master   169816 Jan 23 22:12 innobackupex*

    lrwxrwxrwx 1 master master       12 Jan 23 22:12 innobackupex-1.5.1 -> innobackupex*

    -rwxr-xr-x 1 master maste

2017-07-19 22:38:06    1348
参考文章:http://www.ttlsa.com/mysql/mysql-high-availability-with-nginx-and-galera/

借鉴文档:http://www.unixmen.com/setup-mariadb-galera-cluster-10-0-centos/


MariaDB is a relational database management system (RDBMS) and  MariaDB Galera Cluster is a synchronous multi-master cluster for MariaDB. It is available on Linux only, and only supports theXtraDB/InnoDB storage engines. This article explains how to setup MariaDB Galera Cluster 10.0 with 3 nodes running on CentOS 6.5 x86_64 resulting in a HA (high-availability) database cluster.

CLUSTER DETAILS

We using 3 freshly deployed VMs running a minimal install of CentOS 6.5 x86_64.

Cluster node 1 has hostname db1 and IP address 1.1.1.1
Cluster node 2 has hostname db2 and IP address 1.1.1.2
Cluster node 3 has hostname db3 and IP address 1.1.1.3

Step 1: Add MariaDB Repositories

Create a mariadb repository /etc/yum.repos.d/mariadb.repo using following content in your system.

For CentOS 6 – 64bit:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/c
MariaDB HA Galera Cluster    2017-07-19 22:37:03    982
部署方案:
1、安装MariaDB Galera Cluster,参考文章:http://blog.liuyingguang.cn/blog/post/lightingfire/CentOS-6.5-%E6%88%96-CentOS-7-%E5%AE%89%E8%A3%85%C2%A0MariaDB-Galera-Cluster-10.0
2、安装Percona-xtrabackup,参考文章:http://blog.liuyingguang.cn/blog/post/lightingfire/Percona-xtrabackup%E6%BA%90%E7%A0%81%E5%AE%89%E8%A3%85
3、解决MariaDB Calera Cluster 运行中需要修改的linux系统配置:http://blog.liuyingguang.cn/blog/post/lightingfire/failed-to-open-gcomm-backend-connection-13-error-while-trying-to-listen-tcp
4、配置MariaDB Galera Cluster:
    参见第1点,
    额外修改wsrep_sst_method为xtrabackup
 
 

 

by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(防止爬虫):http://blog.liuyingguang.cn
OpenBI问答社区:http://openbi.liuyingguang.cn/

AWS Centos    2017-07-19 22:35:22    957
1、需要用pem文件连接到centos系统中,
    xshell 使用pem文件登录:http://blog.liuyingguang.cn/blog/post/lightingfire/pem%E6%96%B9%E5%BC%8F%E7%99%BB%E5%BD%95%E7%9A%84CentOS%E7%B3%BB%E7%BB%9F%E4%BF%AE%E6%94%B9%E4%B8%BA%E5%AF%86%E7%A0%81%E7%99%BB%E5%BD%95%E6%96%B9%E5%BC%8F

2、修改root密码
    sudo passwd root

然后输入两次密码


3、修改centos登录方式为密码登录
    打开配置文件 /etc/ssh/sshd_config (ubuntu 为/etc/ssh/sshd-config),设置如下几个参数
PermitRootLogin yes
PubkeyAuthentication no (也可用#号注释)
PasswordAuthentication yes
4、重启sshd服务
    /etc/init.d/sshd restart



 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn

CentOS freeswitch 通信 呼叫中心    2017-07-19 22:34:28    894

官方Installation地址:https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video


1、添加RPM源

rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
或者
rpm -ivh http://mirror.cedia.org.ec/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm

 

2、安装必须的依赖包

 
yum install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel

3、安装FreeSWITCH

cd /usr/src

git clone https://freeswitch.org/stash/scm/fs/freeswitch.git  (##我用此版本,即1.6版本安装失败)
或者

cd /usr/src/freeswitch
./bootstrap.sh -j

如果你想要添加或删除模块儿的话,可以修改modules.conf,在每行前面添加#来注释掉不需要的模块儿
如果不需要自定义模块儿,可以跳过此步骤
./configure -C
make && make install

按照官方文档,做到此就完成安装了,可是我使用的1.6版本的,即以上git地址的第一个,可是按照网上的一些说法,解决了一部分错误以后,还是报错,于是根据另一篇文章(
http://niyirangrujiu.blog.163.com/blog/static/9817337201581584910990/)所说,别人也是无法完成安装,于是我也换了1.4版本的,安装就成功了
20/48