先下载couchdb安装文件:版本为0.9.1
http://couchdb.apache.org/downloads.html
1开始安装依赖包
sudo apt-get build-dep couchdb
sudo apt-get install libmozjs-dev libicu-dev libcurl4-gnutls-dev
libtool
2.解压缩
tar -zxvf apache-couchdb-0.9.1.tar.gz
3.开始安装
cd apache-couchdb-0.9.1
./configure
make
sudo make install
4.启动couchdb
sudo couchdb
5.访问:http://127.0.0.1:5984/_utils/
启动报错:
$ bin/couchdb
Apache CouchDB 0.9.0a691361-incubating (LogLevel=info) is starting.
{"init terminating in do_boot",{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},
{erl_eval,do_apply,5},{erl_eval,exprs,5},{init,start_it,1},{init,start_em,1}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
查了一下官方wiki:
原来是安装文件夹的权限问题
解决办法:
sudo adduser couchdb
chown -R couchdb:couchdb /usr/local/etc/couchdb
chown -R couchdb:couchdb /usr/local/var/lib/couchdb
chown -R couchdb:couchdb /usr/local/var/log/couchdb
chown -R couchdb:couchdb /usr/local/var/run
chmod -R 0770 /usr/local/etc/couchdb
chmod -R 0770 /usr/local/var/lib/couchdb
chmod -R 0770 /usr/local/var/log/couchdb
chmod -R 0770 /usr/local/var/run
再此启动,看到欢迎界面,所有的testsuite run success,大功告成!
文章来源:http://guming.blogbus.com/logs/45898514.html