Centos安裝CouchDB

來源:互聯網
上載者:User

1、系統已經安裝好gcc、make、libtool等工具

2、yum安裝icu、libcul

yum install libicu-devel -yyum install curl-devl -y

3、編譯安裝Erlang、SpiderMonkey JS Engine 、CouchDB

安裝Erlang

安裝Erlang之前需要配置java編譯環境,其他的fop(fakefop)、wxWidgets提示不存在可以忽略。建議使用javac進行編譯

在/etc/profile檔案裡面設定Erlang的環境變數

#Erlang Environment
export ERL_HOME=/usr/local/erlang
export PATH=${ERL_HOME}/bin:${PATH}

輸入erl,出現命令提示字元>


安裝SpiderMonkey JS Engine 

建立安裝指令碼

#vim inst

#!/bin/bashif test "$USER" = root; then    wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz -O- | tar xvz    cd js/src    make -f Makefile.ref    mkdir -p /usr/include/smjs/ -v    cp *.{h,tbl} /usr/include/smjs/ -v    cd Linux_All_DBG.OBJ    cp *.h /usr/include/smjs/ -v    mkdir -p /usr/local/{bin,lib}/ -v    cp js /usr/local/bin/ -v    cp libjs.so /usr/local/lib/ -velse    echo "You must be root. Try sudo $0"fi增加執行許可權:chmod u+x ./inst執行安裝:./inst

輸入js,可以看到js的命令提示字元>


安裝CouchDB

./configure 失敗

錯誤提示:configure: error: Could not find the jsapi header. 錯誤提示很明顯,找不到js相關的標頭檔。

./configure --help中有--with-js-include配置選項

利用該選項:

# ./configure --prefix=/usr/local/couchdb --with-js-include=/usr/include/smjs

配置成功

#make

#make install

#useradd couchdb#chown -R couchdb /usr/local/couchdb/var/#cp /usr/local/couchdb/etc/rc.d/couchdb /etc/init.d/couchdb

將couchdb/etc/couch/default.ini檔案中的bind_address=127.0.0.1改為192.168.3.199(主機IP),是其他機器能夠訪問。

CouchDB的安裝環境比較附加,其中Erlang和SpiderMonkey的安裝容易出現各種問題,需要耐心。


參考:

【1】http://www.ibm.com/developerworks/cn/opensource/os-cn-couchdb/

【2】http://blog.csdn.net/bbiao/article/details/5021032



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.