之前写过一篇Ubuntu上安装Bitcoin Core的文章,当前比特币扩容之争还在继续,今天决定把Ubuntu上面的Bitcoin Core
换成Bitcoin Unlimited
。下面对安装Bitcoin Unlimited
的过程作个总结。git
安装前须要先备份好数据。github
备份好大家的钱包,备份好你的私钥pwa
bitcoin-cli backupwallet /tmp/backp.datcode
备份好~/.bitcon
目录的数据,这里存放的是所有的区块数据,若是区块数据丢失或者损坏,须要重建索引,或者须要从新下载。索引
中止运行bitcoind
:ip
bitcoin-cli stoprem
备份好数据以及中止了bitcoind
,下一步须要移除Bitcoin Core
。get
以前有安装Core或者Classic的,须要先移除他们,Bitcoin Unlimited
也是使用的bitcoind
,不移除就没法正确安装。
删除客户端:it
sudo apt-get remove bitcoin*ast
若是使用了的是PPA
安装的还须要移除对应的bitcoin的source
,PPA
源的保存文件在/etc/apt/sources.list.d
目录下,名称为:bitcoin-bitcoin-trusty.list
,删除源命令:
sudo rm /etc/apt/source.list.d/bitcoin-.
若是你是使用的源代码安装的Bitcoin Core
,就须要使用make
命令卸载:
cd /path/where/the/code/is/stored
sudo make uninstall
移除Bitcoin Core
以后就能够安装Bitcoin Unlimited
了。
使用PPA
安装Bitcoin Unlimited
也是比较简单的,先添加Bitcoin Unlimited的源,而后直接安装便可:
sudo add-apt-repository ppa:bitcoin-unlimited/bu-ppa-nightly
sudo apt-get update
sudo apt-get install bitcoind
安装成功以后,使用和Bitcoin Core
相同的命令就能够启动bitcoind
了:
bitcoind --daemon
使用bitcoin-cli
能够查看运行状况:
bitcoin-cli getinfo
上述安装过程我写了一个脚本,地址github.com/jjz/script/…