溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

centos 7.4部署couchbase集群

發(fā)布時(shí)間:2020-07-15 09:48:10 來(lái)源:網(wǎng)絡(luò) 閱讀:1261 作者:賽里 欄目:關(guān)系型數(shù)據(jù)庫(kù)

       couchbase是一個(gè)較新的、發(fā)展迅速的nosql數(shù)據(jù)庫(kù)技術(shù)。2014年,viber宣布使用couchbase替換mongodb,以適應(yīng)10億級(jí)的用戶量,目前,couchbase已大量運(yùn)用于生產(chǎn)環(huán)境,國(guó)內(nèi)使用的公司主要有新浪,騰訊等。由于中文資料較少,閱讀了官方文檔中的部分介紹后,將資料翻譯和匯總?cè)缦隆?br/>
       couchbase是CouchDB和MemBase的合并。而memBase是基于Memcached的。因此couchbase聯(lián)合了couchbase的簡(jiǎn)單可靠和memcached的高性能,以及membase的可擴(kuò)展性。

      

       couchbase可用于單機(jī)環(huán)境,也可以和其他服務(wù)器一起提供分布式的數(shù)據(jù)存儲(chǔ)。

centos 7.4部署couchbase集群


一、安裝couchbase(node1、node2、node3)

1、關(guān)閉防火墻和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官網(wǎng)地址:https://×××w.couchbase.com/downloads


3、確認(rèn)依賴包是否安裝,如果沒(méi)安裝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
準(zhǔn)備中...                          ################################# [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
正在升級(jí)/安裝...
   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、服務(wù)狀態(tài)與開(kāi)機(jī)自啟

[root@test1 ~]# systemctl status couchbase-server
[root@test1 ~]# systemctl enable couchbase-server



二、couchbase集群配置(node1)

集群初始化有以下方式,這里我們以web控制臺(tái)方式為例:

* Couchbase的web控制臺(tái) (Couchbase Web Console)

* Couchbase的命令行 (Couchbase Command Line Interface)

* Couchbase的API接口(Couchbase REST API)

1、瀏覽器輸入http://192.168.146.126:8091/訪問(wèn)

centos 7.4部署couchbase集群


2、選擇“Strat a new cluster”選項(xiàng),這里主要是設(shè)置RAM Quota、Database path和Indexes path

在配置服務(wù)器界面,你有如下選項(xiàng):

* 創(chuàng)建新的集群(Start a new cluster)

* 加入已有集群(Join a cluster now)

* 配置存儲(chǔ)(Configure Disk Storage)

* 配置服務(wù)器的主機(jī)名(Configure Server Hostname)

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群


3、按照默認(rèn)設(shè)置

centos 7.4部署couchbase集群


4、缺省的bucket不建議分配過(guò)大,勾選Flush下的Enable復(fù)選框

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群


5、勾選同意

centos 7.4部署couchbase集群


6、設(shè)置后臺(tái)管理Administrator密碼

centos 7.4部署couchbase集群


7、登陸后首頁(yè)

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群


8、創(chuàng)建新的Bucket,RAM建議默認(rèn),默認(rèn)會(huì)將除了default的所有內(nèi)存分配給這個(gè)Bucket。勾選Flush下的Enable復(fù)選框

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群


9、點(diǎn)擊剛才創(chuàng)建的bucket進(jìn)行刷新,如下圖

centos 7.4部署couchbase集群


10、新增集群節(jié)點(diǎn),并同步

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群

centos 7.4部署couchbase集群


11、按照上一步的方法添加第三臺(tái),效果如下:

centos 7.4部署couchbase集群



其它鏈接:

http://rdc.hundsun.com/portal/article/736.html

http://rdc.hundsun.com/portal/article/761.html



向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI