设为首页 收藏本站
查看: 812|回复: 0

[经验分享] centos 7.4部署couchbase集群

[复制链接]

尚未签到

发表于 2019-2-15 14:43:07 | 显示全部楼层 |阅读模式
       couchbase是一个较新的、发展迅速的nosql数据库技术。2014年,viber宣布使用couchbase替换mongodb,以适应10亿级的用户量,目前,couchbase已大量运用于生产环境,国内使用的公司主要有新浪,腾讯等。由于中文资料较少,阅读了官方文档中的部分介绍后,将资料翻译和汇总如下。

       couchbase是CouchDB和MemBase的合并。而memBase是基于Memcached的。因此couchbase联合了couchbase的简单可靠和memcached的高性能,以及membase的可扩展性。

      

       couchbase可用于单机环境,也可以和其他服务器一起提供分布式的数据存储。



  一、安装couchbase(node1、node2、node3)
  1、关闭防火墙和selinux
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@localhost ~]# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@localhost ~]# setenforce 0  2、下载couchbase
[root@localhost ~]# wget https://packages.couchbase.com/releases/4.6.2/couchbase-server-enterprise-4.6.2-centos7.x86_64.rpm  couchbase官网地址:https://×××w.couchbase.com/downloads
  

  3、确认依赖包是否安装,如果没安装yum安装下。
[root@localhost ~]# rpm -qa | grep "pkgconfig"
pkgconfig-0.27.1-4.el7.x86_64
[root@localhost ~]# rpm -qa | grep "openssl"
openssl-libs-1.0.1e-42.el7.9.x86_64
openssl-1.0.1e-42.el7.9.x86_64  4、安装couchbase
[root@localhost ~]# rpm -ivh couchbase-server-enterprise-4.6.2-centos7.x86_64.rpm
准备中...                          ################################# [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 : 0.95 GB
Minimum number of processors required : 4 cores
Number of processors on the system    : 1 cores
正在升级/安装...
   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://localhost.localdomain: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.  5、服务状态与开机自启
[root@test1 ~]# systemctl status couchbase-server
[root@test1 ~]# systemctl enable couchbase-server  二、couchbase集群配置(node1)
  集群初始化有以下方式,这里我们以web控制台方式为例:
  * Couchbase的web控制台 (Couchbase Web Console)
  * Couchbase的命令行 (Couchbase Command Line Interface)
  * Couchbase的API接口(Couchbase REST API)
  1、浏览器输入http://192.168.146.126:8091/访问

  2、选择“Strat a new cluster”选项,这里主要是设置RAM Quota、Database path和Indexes path
  在配置服务器界面,你有如下选项:
  * 创建新的集群(Start a new cluster)
  * 加入已有集群(Join a cluster now)
  * 配置存储(Configure Disk Storage)
  * 配置服务器的主机名(Configure Server Hostname)


  3、按照默认设置

  4、缺省的bucket不建议分配过大,勾选Flush下的Enable复选框


  5、勾选同意

  6、设置后台管理Administrator密码

  7、登陆后首页


  8、创建新的Bucket,RAM建议默认,默认会将除了default的所有内存分配给这个Bucket。勾选Flush下的Enable复选框



  9、点击刚才创建的bucket进行刷新,如下图

  10、新增集群节点,并同步




  11、按照上一步的方法添加第三台,效果如下:

  其它链接:
  http://rdc.hundsun.com/portal/article/736.html
  http://rdc.hundsun.com/portal/article/761.html

  

  





运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-672545-1-1.html 上篇帖子: vmware 中centos静态ip无法联网 下篇帖子: centos7Failed to start LSB: Bring up/down networki
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表