centos7 安装couchbase集群

linux版本

➜  ansible ansible -i hosts cache -u root -m shell -a 'uname -a '                 
10.39.47.62 | SUCCESS | rc=0 >>
Linux i-ec0m1585 3.10.0-327.4.5.el7.x86_64 #1 SMP Mon Jan 25 22:07:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

10.39.47.60 | SUCCESS | rc=0 >>
Linux i-knnb6822 3.10.0-327.4.5.el7.x86_64 #1 SMP Mon Jan 25 22:07:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

10.39.47.63 | SUCCESS | rc=0 >>
Linux i-gsnsfm8y 3.10.0-327.4.5.el7.x86_64 #1 SMP Mon Jan 25 22:07:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

10.39.47.61 | SUCCESS | rc=0 >>
Linux i-39x6lylx 3.10.0-327.4.5.el7.x86_64 #1 SMP Mon Jan 25 22:07:14 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

机器列表

hostnameip
couchbase-6010.39.47.60
couchbase-6110.39.47.61
couchbase-6210.39.47.62
couchbase-6310.39.47.63

检查防火墙是否关闭

➜  ansible ansible -i hosts cache -u root -m shell -a 'systemctl status firewalld'
10.39.47.63 | FAILED | rc=4 >>
Unit firewalld.service could not be found.non-zero return code

10.39.47.61 | FAILED | rc=4 >>
Unit firewalld.service could not be found.non-zero return code

10.39.47.62 | FAILED | rc=4 >>
Unit firewalld.service could not be found.non-zero return code

10.39.47.60 | FAILED | rc=4 >>
Unit firewalld.service could not be found.non-zero return code

如果没有关闭就关闭

systemctl stop firewalld

更新源

ansible -i hosts cache -u root -m shell -a 'yum update -y '

开始安装
下载Couchbase

[root@couchbase-60 ~]# wget https://packages.couchbase.com/releases/4.6.2/couchbase-server-enterprise-4.6.2-centos7.x86_64.rpm

安装包依赖检查

#安装pkgconfig
ansible -i hosts cache -u root -m shell -a 'yum -y install pkgconfig '
#查看OpenSSL是否安装
ansible -i hosts cache -u root -m shell -a 'rpm -qa | grep "openssl"'
#如果没有安装,用下面命令安装
[root@apollo ~]# ansible -i hosts cache -u root -m shell -a 'yum -y install openssl'

使用rpm包安装couchbase

[root@couchbase-60 ~]# rpm -ivh couchbase-server-enterprise-4.6.2-centos7.x86_64.rpm.2 
Preparing...                          ################################# [100%]
Warning: Transparent hugepages looks to be active and should not be.
Please look at http://bit.ly/1ZAcLjD as for how to PERMANENTLY alter this setting.
Warning: Swappiness is not set to 0.
Please look at http://bit.ly/1k2CtNn as for how to PERMANENTLY alter this setting.
Minimum RAM required  : 4 GB
System RAM configured : 3.70 GB

Minimum number of processors required : 4 cores
Number of processors on the system    : 2 cores

Updating / installing...
   1:couchbase-server-4.6.2-3905      ################################# [100%]
Created symlink from /etc/systemd/system/multi-user.target.wants/couchbase-server.service to /usr/lib/systemd/system/couchbase-server.service.

You have successfully installed Couchbase Server.
Please browse to http://couchbase-60:8091/ to configure your server.
Please refer to http://couchbase.com for additional resources.

Please note that you have to update your firewall configuration to
allow connections to the following ports:
4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11209 to 11211,
11214, 11215, 18091 to 18093, and from 21100 to 21299.

By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.

安装完成之后,直接在浏览器访问http://10.39.47.60:8091/ui/index.html

couchbase-01
至此,单机版的couchbase安装成功,后文将持续讲解couchbase的集群与使用。


接下来部署集群

根据couchbase的安装经验,couchbase集群必须初始化。你可以通过以下方法来初始化couchbase集群:

  • Couchbase的web控制台 (Couchbase Web Console)
  • Couchbase的命令行 (Couchbase Command Line Interface)
  • Couchbase的富API接口(Couchbase REST API)

通过界面操作之后,最后启动couchbase集群成功的标志如下:
9988

接下来添加其他机器
下载couchbase软件包

ansible -i hosts cache -u root -m shell -a 'wget https://packages.couchbase.com/releases/4.6.2/couchbase-server-enterprise-4.6.2-centos7.x86_64.rpm'

添加63节点
00-63

如果遇到问题
如下
09

直接点击右上角的rebalance按钮就可以解决

最终如下
97

参考:
官网
centos6.8 内存数据库Couchbase集群部署详细操作
CentOS7.0配置couchbase集群

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值