{"id":593,"date":"2011-03-16T01:49:54","date_gmt":"2011-03-15T17:49:54","guid":{"rendered":"http:\/\/www.strongd.net\/?p=593"},"modified":"2011-03-16T01:49:54","modified_gmt":"2011-03-15T17:49:54","slug":"%e5%9c%a8centos-5-4%e4%b8%8a%e5%ae%89%e8%a3%85couchdb","status":"publish","type":"post","link":"https:\/\/www.strongd.net\/?p=593","title":{"rendered":"\u5728CentOS 5.4\u4e0a\u5b89\u88c5CouchDB"},"content":{"rendered":"<p><a href=\"http:\/\/couchdb.apache.org\/\" target=\"_blank\">CouchDB<\/a>\u4e00\u79cd\u534a\u7ed3\u6784\u5316\u9762\u5411\u6587\u6863\u7684\u5206\u5e03\u5f0f\uff0c\u9ad8\u5bb9\u9519\u7684\u6570\u636e\u5e93\u7cfb\u7edf\uff0c\u5177\u4f53\u7684\u53ef\u4ee5\u53c2\u89c1\u5176\u7f51\u7ad9\u4e0a\u7684\u6587\u6863\uff0c\u4ee5\u53ca<a href=\"http:\/\/www.javaeye.com\/topic\/319839\" target=\"_blank\">\u8fd9\u91cc<\/a>\u7684\u4e00\u7bc7\u6280\u672f\u7b80\u4ecb\u7684\u7ffb\u8bd1\u3002CouchDB\u5728Ubuntu\u4e0b\u5b89\u88c5\u975e\u5e38\u65b9\u4fbf\uff0c\u53ea\u9700\u8981\u4f7f\u7528sudo apt-get install couchdb\u5373\u53ef\uff0c\u6211\u4ee5\u4e3a\u5728CentOS\u4e2d\u4e5f\u4f1a\u6bd4\u8f83\u5bb9\u6613\uff0c\u6ca1\u60f3\u5230\u5374\u9047\u5230\u4e86\u6bd4\u8f83\u591a\u7684\u95ee\u9898\u3002\u4e3b\u8981\u5305\u62ec\uff1a<\/p>\n<ol>\n<li>CentOS\u7684\u5b89\u88c5\u6e90\u91cc\u4e0d\u5305\u542bCouchDB<\/li>\n<li>CouchDB\u9700\u8981Erlang\u7684\u8fd0\u884c\u65f6\u652f\u6301\uff0cCentOS\u7684\u5b89\u88c5\u6e90\u91cc\u4e5f\u6ca1\u6709Erlang<\/li>\n<\/ol>\n<p>OK\uff0c\u6211\u4eec\u4e00\u6b65\u4e00\u6b65\u6765\u641e\u5b9a\u5728CentOS\u4e0b\u5b89\u88c5CouchDB\u3002\u9996\u5148\u9700\u8981\u5b89\u88c5Erlang\uff0c\u5374Erlang\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6e90\u7801\uff0c\u7136\u540e\u5728\u672c\u5730\u7f16\u8bd1\u5b89\u88c5\uff1a\u5177\u4f53\u7684\u811a\u672c\u4e3a\uff1a<\/p>\n<div>\n<div>\n<pre>   1: wget http:\/\/www.erlang.org\/download\/otp_src_R13B02-1.tar.gz<\/pre>\n<pre>   2: tar\u2013xzvf otp_src_R13B02-1.tar.gz<\/pre>\n<pre>   3: cd otp_src_R13B02-1<\/pre>\n<pre>   4: .\/configure<\/pre>\n<pre>   5: make &amp;&amp; make install<\/pre>\n<\/div>\n<\/div>\n<p>\u4e2d\u9014\u6709\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u4f9d\u8d56\u7684\u95ee\u9898\uff0c\u6bd4\u5982\u7f3a\u5c11icu\u3001ncurses\u3001wxWindows\u7b49\uff0c\u524d\u9762\u51e0\u4e2a\u5927\u7565\u90fd\u53ef\u4ee5\u4eceyum\u65f6\u884c\u5b89\u88c5\uff0cwxWindows\u53ef\u4ee5\u4e0d\u95ee\uff0c\u5982\u679c\u4f60\u4e4b\u540e\u4e0d\u51c6\u5907\u4f7f\u7528Erlang\u8fdb\u884cUI\u7f16\u7a0b\u7684\u8bdd\uff0c\u8fd9\u4e9b\u4e5f\u8db3\u591f\u7528\u4e86\u3002<\/p>\n<p>Erlang\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u6d4b\u8bd5\u4e00\u4e0b\u5728bash\u91ccerl\u548cerlc\u80fd\u5426\u4f7f\u7528\uff0c\u82e5\u80fd\uff0c\u5219\u8fd9\u4e00\u6b65\u5c31\u5b8c\u6210\u4e86\u3002<\/p>\n<p>\u63a5\u7740\u662f\u5b89\u88c5CouchDB\uff0c\u7531\u4e8eCouchDB\u91cc\u7528\u5230\u4e86JavaScript\uff0c\u6240\u4ee5\u5176\u4f9d\u8d56\u4e8e<a href=\"http:\/\/www.mozilla.org\/js\/spidermonkey\/\" target=\"_blank\">SpiderMonkey<\/a>\uff0c\u9700\u8981\u5148\u5b89\u88c5libmozjs\u8fd9\u4e2a\u5e93\uff0c\u6b65\u9aa4\u4e3a\uff1a<\/p>\n<div>\n<div>\n<pre>   1: wget ftp:\/\/ftp.mozilla.org\/pub\/mozilla.org\/js\/js-1.8.0-rc1.tar.gz<\/pre>\n<pre>   2: tar\u2013xzvf js-1.8.0-rc1.tar.gz<\/pre>\n<pre>   3: cd js\/src<\/pre>\n<pre>   4: make BUILD_OPT=1\u2013f Makefile.ref<\/pre>\n<\/div>\n<\/div>\n<p>\u7f16\u8bd1\u5e94\u8be5\u4e0d\u4f1a\u51fa\u4ec0\u4e48\u95ee\u9898\uff0c\u5982\u679c\u4f60\u7684\u673a\u5668\u6ca1\u6709\u914d\u7f6e\u7f16\u8bd1\u73af\u5883\uff0c\u4f60\u53ef\u4ee5\u53c2\u8003<a href=\"https:\/\/developer.mozilla.org\/en\/Linux_Build_Prerequisites\" target=\"_blank\">\u8fd9\u7bc7<\/a>\u6587\u7ae0\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<p>\u53ef\u4ee5\u5f53\u6211\u6267\u884cmake \u2013f Makefile.ref install\u7684\u65f6\u5019\u50bb\u4e86\uff0c\u6ca1\u6709\u8fd9\u4e2atarget\uff0c\u597d\u5427\uff0c\u6211\u4eec\u81ea\u5df1\u5199\u811a\u672c\u5b89\u88c5\u8fd9\u4e2a\u5e93\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<div>\n<div>\n<pre>   1: #!\/bin\/bash<\/pre>\n<pre>   2: mkdir -p \/usr\/include\/mozjs\/ -v<\/pre>\n<pre>   3: cp *.{h,tbl}<\/pre>\n<pre>   4: \/usr\/include\/mozjs\/ -v<\/pre>\n<pre>   5: cd Linux_All_OPT.OBJ<\/pre>\n<pre>   6: cp *.h \/usr\/include\/mozjs\/ -v<\/pre>\n<pre>   7: mkdir -p \/usr\/local\/{bin,lib}\/ -v<\/pre>\n<pre>   8: cp js \/usr\/local\/bin\/ -v<\/pre>\n<pre>   9: cp libjs.so \/usr\/local\/lib\/ -v<\/pre>\n<\/div>\n<\/div>\n<p>\u628a\u4e0a\u9762\u7684\u4ee3\u7801\u4fdd\u5b58\u6210install.sh\uff0c\u5e76\u653e\u5728src\u6587\u4ef6\u5939\u4e0b\uff0c\u6267\u884c\u4e00\u904d\u5373\u53ef\u3002<\/p>\n<p>\u7ec8\u4e8e\u53ef\u4ee5\u7f16\u8bd1CouchDB\u4e86\uff0c\u811a\u672c\u5982\u4e0b\uff1a<\/p>\n<div>\n<div>\n<pre>   1:<\/pre>\n<pre>   2: wget http:\/\/labs.xiaonei.com\/apache-mirror\/couchdb\/0.10.0\/apache-couchdb-0.10.0.tar.gz<\/pre>\n<pre>   3: tar\u2013xzvf apache-couchdb-0.10.0.tar.gz<\/pre>\n<pre>   4: cd apache-couchdb-0.10.0<\/pre>\n<pre>   5: .\/configure<\/pre>\n<pre>   6: make &amp;&amp; make install<\/pre>\n<\/div>\n<\/div>\n<p>\u8fd9\u6b21\u7f16\u8bd1\u5e94\u8be5\u4e0d\u4f1a\u51fa\u4ec0\u4e48\u95ee\u9898\uff0c\u5982\u679c\u51fa\u4e86\uff0c\u4e5f\u5e94\u8be5\u662f\u6bd4\u8f83\u597d\u89e3\u51b3\u7684\uff0c\u6211\u4eec\u5047\u8bbe\u4f60\u770b\u8fd9\u7bc7\u6587\u7ae0\u7684\u65f6\u5019\uff0c\u6709\u8fd9\u4e2a\u80fd\u529b\u6765\u89e3\u51b3\u90a3\u4e9b\u5c0f\u95ee\u9898\u3002<\/p>\n<p>\u7136\u540e\u8fd9\u4e2a\u65f6\u5019\u5c31\u5b89\u88c5\u6210\u529f\u4e86\u3002\u63a5\u7740\u662f\u914d\u7f6eCouchDB\uff0c\u5b98\u65b9\u5efa\u8bae\u4e0d\u8981\u7528root\u5e10\u6237\u6765\u8fd0\u884c\uff0c\u6240\u4ee5\uff0c\u6211\u4eec\u65b0\u5efa\u4e00\u4e2a\u8d26\u6237\u8ddf\u7ec4\u6765\u8fd0\u884c\u3002\u811a\u672c\u5982\u4e0b\uff1a<\/p>\n<div>\n<div>\n<pre>   1: groupadd couchdb<\/pre>\n<pre>   2: useradd couchdb\u2013g couchdb\u2013d \/usr\/local\/var\/lib\/couchdb<\/pre>\n<pre>   3: su\u2013 couchdb\u2013c \u201c\/user\/local\/bin\/couchdb -b\u201d<\/pre>\n<\/div>\n<\/div>\n<p>\u6700\u540e\u4e00\u884c\u662f\u7528\u6765\u542f\u52a8couchdb\u7684\u540e\u53f0\u8fdb\u7a0b\uff0c\u5982\u679c\u8981\u505c\u6b62\uff0c\u628a\u53c2\u6570\u4ece-b\u6539\u6210-d\u5373\u53ef\u3002<\/p>\n<p>\u65b0\u7248\u672c\u7684\u914d\u7f6e\u6587\u4ef6\u597d\u50cf\u662f\/user\/local\/etc\/couchdb\/local.ini\uff0c\u5404\u53d6\u6240\u9700\uff0c\u81ea\u5df1\u4fee\u6539\u5427\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CouchDB\u4e00\u79cd\u534a\u7ed3\u6784\u5316\u9762\u5411\u6587\u6863\u7684\u5206\u5e03\u5f0f\uff0c\u9ad8\u5bb9\u9519\u7684\u6570\u636e\u5e93\u7cfb\u7edf\uff0c\u5177\u4f53\u7684\u53ef\u4ee5\u53c2\u89c1\u5176\u7f51\u7ad9\u4e0a\u7684\u6587\u6863\uff0c\u4ee5\u53ca\u8fd9\u91cc\u7684\u4e00\u7bc7\u6280\u672f\u7b80\u4ecb\u7684\u7ffb\u8bd1\u3002CouchDB\u5728Ubuntu\u4e0b\u5b89\u88c5\u975e\u5e38\u65b9\u4fbf\uff0c\u53ea\u9700\u8981\u4f7f\u7528sudo apt-get install couchdb\u5373\u53ef\uff0c\u6211\u4ee5\u4e3a\u5728CentOS\u4e2d\u4e5f\u4f1a\u6bd4\u8f83\u5bb9\u6613\uff0c\u6ca1\u60f3\u5230\u5374\u9047\u5230\u4e86\u6bd4\u8f83\u591a\u7684\u95ee\u9898\u3002\u4e3b\u8981\u5305\u62ec\uff1a CentOS\u7684\u5b89\u88c5\u6e90\u91cc\u4e0d\u5305\u542bCouchDB CouchDB\u9700\u8981Erlang\u7684\u8fd0\u884c\u65f6\u652f\u6301\uff0cCentOS\u7684\u5b89\u88c5\u6e90\u91cc\u4e5f\u6ca1\u6709Erlang OK\uff0c\u6211\u4eec\u4e00\u6b65\u4e00\u6b65\u6765\u641e\u5b9a\u5728CentOS\u4e0b\u5b89\u88c5CouchDB\u3002\u9996\u5148\u9700\u8981\u5b89\u88c5Erlang\uff0c\u5374Erlang\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6e90\u7801\uff0c\u7136\u540e\u5728\u672c\u5730\u7f16\u8bd1\u5b89\u88c5\uff1a\u5177\u4f53\u7684\u811a\u672c\u4e3a\uff1a 1: wget http:\/\/www.erlang.org\/download\/otp_src_R13B02-1.tar.gz 2: tar\u2013xzvf otp_src_R13B02-1.tar.gz 3: cd otp_src_R13B02-1 4: .\/configure 5: make &amp;&amp; make install \u4e2d\u9014\u6709\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u4f9d\u8d56\u7684\u95ee\u9898\uff0c\u6bd4\u5982\u7f3a\u5c11icu\u3001ncurses\u3001wxWindows\u7b49\uff0c\u524d\u9762\u51e0\u4e2a\u5927\u7565\u90fd\u53ef\u4ee5\u4eceyum\u65f6\u884c\u5b89\u88c5\uff0cwxWindows\u53ef\u4ee5\u4e0d\u95ee\uff0c\u5982\u679c\u4f60\u4e4b\u540e\u4e0d\u51c6\u5907\u4f7f\u7528Erlang\u8fdb\u884cUI\u7f16\u7a0b\u7684\u8bdd\uff0c\u8fd9\u4e9b\u4e5f\u8db3\u591f\u7528\u4e86\u3002 Erlang\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u6d4b\u8bd5\u4e00\u4e0b\u5728bash\u91ccerl\u548cerlc\u80fd\u5426\u4f7f\u7528\uff0c\u82e5\u80fd\uff0c\u5219\u8fd9\u4e00\u6b65\u5c31\u5b8c\u6210\u4e86\u3002 \u63a5\u7740\u662f\u5b89\u88c5CouchDB\uff0c\u7531\u4e8eCouchDB\u91cc\u7528\u5230\u4e86JavaScript\uff0c\u6240\u4ee5\u5176\u4f9d\u8d56\u4e8eSpiderMonkey\uff0c\u9700\u8981\u5148\u5b89\u88c5libmozjs\u8fd9\u4e2a\u5e93\uff0c\u6b65\u9aa4\u4e3a\uff1a 1: wget ftp:\/\/ftp.mozilla.org\/pub\/mozilla.org\/js\/js-1.8.0-rc1.tar.gz 2: tar\u2013xzvf js-1.8.0-rc1.tar.gz 3: cd js\/src 4: make BUILD_OPT=1\u2013f Makefile.ref \u7f16\u8bd1\u5e94\u8be5\u4e0d\u4f1a\u51fa\u4ec0\u4e48\u95ee\u9898\uff0c\u5982\u679c\u4f60\u7684\u673a\u5668\u6ca1\u6709\u914d\u7f6e\u7f16\u8bd1\u73af\u5883\uff0c\u4f60\u53ef\u4ee5\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0\u8fdb\u884c\u914d\u7f6e\u3002 \u53ef\u4ee5\u5f53\u6211\u6267\u884cmake \u2013f Makefile.ref install\u7684\u65f6\u5019\u50bb\u4e86\uff0c\u6ca1\u6709\u8fd9\u4e2atarget\uff0c\u597d\u5427\uff0c\u6211\u4eec\u81ea\u5df1\u5199\u811a\u672c\u5b89\u88c5\u8fd9\u4e2a\u5e93\u3002\u4ee3\u7801\u5982\u4e0b\uff1a 1: #!\/bin\/bash 2: mkdir -p \/usr\/include\/mozjs\/ -v 3: cp *.{h,tbl} 4: &hellip; <a href=\"https:\/\/www.strongd.net\/?p=593\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u5728CentOS 5.4\u4e0a\u5b89\u88c5CouchDB<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[8],"class_list":["post-593","post","type-post","status-publish","format-standard","hentry","category-linux","category-nosql","tag-couchdb-nosql"],"_links":{"self":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=593"}],"version-history":[{"count":2,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/593\/revisions"}],"predecessor-version":[{"id":595,"href":"https:\/\/www.strongd.net\/index.php?rest_route=\/wp\/v2\/posts\/593\/revisions\/595"}],"wp:attachment":[{"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strongd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}