背景:非docker形式多机部署fabric 1.0,需要启用couchdb功能,couchdb的查询功能比较nb,也方便调试
一 安装couchdb,安装教程见 http://docs.couchdb.org/en/2.1.0/install/unix.html
因为我安装在ubuntu 14.04,主要列举ubuntu 14.04的安装步骤
《1》Run the command:
$echo "deb https://apache.bintray.com/couchdb-deb trusty main"|sudo tee -a /etc/apt/sources.list
《2》install the repository key:
$ curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc|sudo apt-key add -
《3》update the repository cache and install the package:
$ sudo apt-get update&&sudo apt-get install couchdb
《4》配置couchdb能远程浏览器访问
$ cd /opt/couchdb/etc/
$ vim default.ini
找到 chttpd节点下的= 127.0.0.1,修改为bind_address = 0.0.0.0,存盘
《5》重启couchdb
$stop couchdb
$start couchdb
《6》通过浏览器远程访问http://127.0.0.1:5984/_utils#setup
配置管理员的用户名,密码, 监听地址(设置为0.0.0.0)
二 修改hyperledger fabric的配置
《1》 停止所有peer进程
《2》到fabric配置文件路径,编辑fabric的core.yaml
$ vim core.yaml
找到ledger-》blockchain-》state节点
《2.1》stateDatabase的属性,由goleveldb修改为CouchDB
《2.2》然后配置couchDBConfig节点下的地址,用户名,密码
couchDBAddress: 127.0.0.1:5984
username: admin
password: xxxxxx
《2.3》存盘
《3》重新启动peer进程
Congratulations @baidang! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
You made your First Comment
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit