Category - IT技术

MariaDB HA Galera Cluster    2017-07-19 22:37:03    987
部署方案:
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    960
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    897

官方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版本的,安装就成功了
CentOS MariaDB MySQL    2017-07-19 22:31:53    850
很尴尬的,遇到这个问题,本以为简单的配置,没啥影响,结果CentOS机器起不来了(一直处于进度条状态),

后来发现,在机器启动的时候,进入进度条的时候,按下F4可以查看进程启动情况,

我的还好sshd先启动了,于是我连进去,将mysql关闭,则可以正常启动了

但是问题还是没有解决,我查看了/etc/my.cnf文件,发现我修改了两个配置,如下放置的,以为没问题,其实后台mysql也已经启动成功了,但是进程显示还是启动中

[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
character_set_server=utf8
lower_case_table_names=1

于是,我想,一般配置放在[mysqld]中,于是,将配置信息修改为:
[client-server]

#
# include all files from the config directory
#
#!includedir /etc/my.cnf.d
[mysqld]
character_set_server=utf8
lower_case_table_names=1

则启动mysql一切正常了,解决了

 

 


 

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

haproxy redis    2017-07-19 22:30:33    1164
环境前提:
    redis sentinel配置,三台主机,且配置运行良好
    

配置文件中添加:

frontend ft_redis
 bind 0.0.0.0:6379 name redis
 default_backend bk_redis

backend bk_redis
 option tcp-check
 tcp-check connect
 tcp-check send PING\r\n
 tcp-check expect string +PONG
 tcp-check send info\ replication\r\n
 tcp-check expect string role:master
 tcp-check send QUIT\r\n
 tcp-check expect string +OK
 server R1 10.118.36.10:6379 check inter 1s
 server R2 10.118.36.74:6379 check inter 1s
 server R3 10.118.5.161:6379 check inter 1s

当结果如下所示,则表示成功,那么试着切换redis的master和slave吧

 

 


 

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

9/26