在 Linux CentOS 上安装 Couchbase Server

Couchbase 是一个开源的、分布式的、面向文档(document-oriented)的 NoSQL 数据库,并且内置了 Memcached 服务。本文分享的是自己在 Linux 上成功安装 Couchbase Server 的实际操作步骤。

Linux 发行版是 CentOS。

1. 下载 Couchbase 安装包

用 wget 命令进行下载:下载地址:http://www.couchbase.com/

wget http://packages.couchbase.com/releases/2.0.0/couchbase-server-enterprise_x86_64_2.0.0.rpm

2. 用 rpm 命令进行安装 Couchbase

rpm --install couchbase-server-enterprise_x86_64_2.0.0.rpm

重安装命令:rpm -iv --replacepkgs couchbase-server-enterprise_x86_64_2.0.0.rpm

命令运行之后出错:

error: Failed dependencies:
    libcrypto.so.6()(64bit) is needed by couchbase-server-2.0.0-1976.x86_64
    libssl.so.6()(64bit) is needed by couchbase-server-2.0.0-1976.x86_64

3. 安装 openssl

根据第 2 步中的错误,寻找包含 libcrypto.so.6 的安装包,运行下面的命令:

yum provides */libcrypto.so.6

发现 openssl098e-0.9.8e-17.el6.centos.2.x86_64

安装该版本的 opensll 包:

yum install openssl098e-0.9.8e-17.el6.centos.2.x86_64

4. 重新安装 Couchbase

rpm --install couchbase-server-enterprise_x86_64_2.0.0.rpm

安装成功!显示下面的信息:

Starting couchbase-server[  OK  ]

You have successfully installed Couchbase Server.
Please browse to http://cache: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: 11211, 11210, 11209, 4369,
8091 and from 21100 to 21299.

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

然后通过浏览器访问 http://ip:8091 进行相关配置。

【注】安装Couchbase的文件夹要进行这样的授权设置:chown -R couchbase:couchbase .

-----------------------------------------------------------启动-------------------------------------------------------------------------

sudo /opt/couchbase/etc/couchbase_init.d stop 停止
sudo /opt/couchbase/etc/couchbase_init.d start 启动

-------------------------------------------------------------报错信息------------------------------------------------------------------

在ubuntu上编译的东西 拿到CentOS 下运行 提示 :“/lib64/libc.so.6: version `GLIBC_2.14' not found

原因是ubuntu上用的libc 版本较高,而 CentOS 上用的版本太低导致不能执行。

下面是从网上搜到的有关 glibc 的安装。

由于上面提示的版本是 2.14 所以此处就说的是在 CentOS 上安装“glibc-2.14”。

先安装GCC:yum install gcc否则会报:"no acceptable C compiler found in $PATH"

然后安装glibc。

下载地址:http://ftp.gnu.org/gnu/glibc/

或者:http://www.gnu.org/software/libc/download.html

------------------------------------------------------------------------

安装:

下载的glibc的源码解压到某个目录,并进入源码目录 建立构建目录,并cd进入构建目录:

[ghui@StuOS glibc-2.14]$ mkdir build  

[ghui@StuOS glibc-2.14]$ cd build  
 
配置:
运行configure :
 
[ghui@StuOS build]$ opt/ glibc-2.14/configure --prefix=/opt/glibc-2.14  

[ghui@StuOS build]$ make -j4   

[ghui@StuOS build]$ sudo make install  


备注:杀死某个软件下所有进程:

ps -ef|grep LOCAL=NO|grep -v grep|cut -c 9-15|xargs kill -2

ps -aux|grep couchbase |xargs kill -2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值