下载redis的安装包:http://download.redis.io/releases/redis-3.0.3.tar.gz
Download, extract and compile Redis with:
$ wget http://download.redis.io/releases/redis-3.0.3.tar.gz $ tar xzf redis-3.0.3.tar.gz $ cd redis-3.0.3 $ make
The binaries that are now compiled are available in the src
directory. Run Redis with:
$ src/redis-server
You can interact with Redis using the built-in client:
$ src/redis-cli redis> set foo bar OK redis> get foo "bar"
离线安装GCC方法
# rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm # rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm # rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm # rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm # rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm
离线包:http://pan.baidu.com/s/1i3lg73Z
by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交流群:217722918
mail: liuyg#liuyingguang.cn
博主首页(防止爬虫):http://blog.liuyingguang.cn
OpenBI问答社区:http://openbi.liuyingguang.cn/
http://www.keepalived.org/software/
首先检查安装openssl-devel
# ./configure --prefix=/usr/local/keepalived --with-kernel-dir=/usr/src/kernels/2.6.32-279.el6.x86_64
Keepalived configuration------------------------Keepalived version : 1.2.19Compiler : gccCompiler flags : -g -O2Extra Lib : -lssl -lcrypto -lcryptUse IPVS Framework : YesIPVS sync daemon support : YesIPVS use libnl : Nofwmark socket support : YesUse VRRP Framework : YesUse VRRP VMAC : YesSNMP support : NoSHA1 support : NoUse Debug flags : No
执行安装命令
设置keepalived开机启动脚本
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
cp /usr/local/keepalived/sbin/keepalived /usr/sbin/
chkconfig keepalived on
新建一个配置文件,默认keepalived启
原因:
由于开启了SELINUX。
解决方法:
编辑文件/etc/sysconfig/selinux
把SELINUX设为disabled
重启后就会忽略selinux,或者直接执行命令
setenforce 0
立即生效。
by 刘迎光@萤火虫工作室
OpenBI交流群:495266201
MicroService 微服务交
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
源码下载: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
源码解压:tar -xzvf percona-xtrabackup-2.1.7-721-Linux-x86_64.tar.gz
cd percona-xtrabackup-2.1.7-Linux-x86_64/bin/
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
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.
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
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