Couchbase是一个强大的、可靠的NoSql数据库.
Couchbase是CouchDB和MemBase的合并。而MemBase是基于Memcached的。因此Couchbase联合了CouchDB的简单可靠和Memcached的高性能和可扩展性.
/etc/selinux/config文件中的SELINUX="" 为disabled/etc/modprobe.d/blacklist.confblacklist ipv6
setenforce 0
swapoff -a
chkconfig ip6tables off
chkconfig iptables off
service ip6tables stop
service iptables stop
/etc/rc.d/rc.local#wjw_add
su root -lc 'swapoff -a'
/etc/sysctl.conf#wjw_add
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
kernel.pid_max = 65536
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.core.rmem_default = 16777216
net.core.rmem_max = 16777216
net.core.wmem_default = 16777216
net.core.wmem_max = 16777216
net.core.somaxconn = 262144
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 262144
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 16384 16777216
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_congestion_control=cubic
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_retries2 = 5
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_keepalive_time = 30
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_max_orphans = 262144
net.ipv4.conf.lo.arp_ignore = 0
net.ipv4.conf.lo.arp_announce = 0
net.ipv4.conf.all.arp_ignore = 0
net.ipv4.conf.all.arp_announce = 0
net.nf_conntrack_max = 655360
net.netfilter.nf_conntrack_tcp_timeout_established = 180
net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.ipv4.tcp_rmem=4096 87380 16777216
net.ipv4.tcp_wmem=4096 16384 16777216
net.ipv4.tcp_congestion_control=cubic
net.ipv6.conf.all.disable_ipv6=1
vm.swappiness=0
sysctl -p/etc/security/limits.conf* soft nproc 655350
* hard nproc 655350
* soft nofile 655350
* hard nofile 655350
/etc/pam.d/loginsession required /lib64/security/pam_limits.so
swapoff -a
sync
echo 3 > /proc/sys/vm/drop_caches
scp admin@192.168.2.113:/opt/install/couchbase-server-enterprise-3.0.2-centos6.x86_64.rpm /opt/
rpm -ivh /opt/couchbase-server-enterprise-3.0.2-centos6.x86_64.rpm
Rebalance!Fail Over方式拿掉要升级的节点,然后做Rebalance!service couchbase-server stop当
service couchbase-server stop不能停止时:
要使用:killall epmd和killall beam.smp后再用ps -ef | grep -i 'couchbase' | grep -v grep查看是否还有/opt/couchbase目录下的进程,如果有就kill掉!
Auto-Failoveryum install coreutils!service couchbase-server stop不能停止时:要使用:`killall epmd`和`killall beam.smp`后再用`ps -ef | grep -i 'couchbase' | grep -v grep`查看是否还有/opt/couchbase目录下的进程,如果有就kill掉!
service couchbase-server stop
ps -ef | grep -i 'couchbase' | grep -v grep
rpm -qa | grep -i 'couchbase'
/opt/couchbase/bin/couchbase-cli cluster-init -c 192.168.1.41:8091 -u admin -p youyuan --cluster-init-ramsize=110000
/opt/couchbase/bin/couchbase-cli bucket-compact -c 192.168.1.71:8091 -u admin -p youyuan --bucket=default
/opt/couchbase/bin/couchbase-cli setting-compaction -c 192.168.1.71:8091 -u admin -p youyuan --compaction-period-from= --compaction-period-to=
/opt/couchbase/bin/couchbase-cli bucket-edit -c 192.168.1.71:8091 -u admin -p youyuan --bucket=default --compaction-period-from= --compaction-period-to=
/opt/couchbase/bin/cbbackup -u admin -p youyuan -b conf http://${host}:8091 /opt/backups-couchbase/backup-conf
例如(备份指定的Bucket): /opt/couchbase/bin/cbbackup -u admin -p youyuan -b conf http://localhost:8091 /opt/backups-couchbase/backup-conf-20140415
/opt/couchbase/bin/cbrestore -u admin -p youyuan -b conf /opt/backups-couchbase/backup-conf http://${host}:8091
不要使用
service couchbase-server stop,要使用:killall epmd和killall beam.smp后再用ps -ef | grep -i 'couchbase' | grep -v grep查看是否还有/opt/couchbase目录下的进程,如果有就kill掉!