linux 安装 Zcash

需求

Linux (ubuntu 系统)
64-bit
4GB of free memory

开始
安装依赖的包:

sudo apt-get install \
      build-essential pkg-config libc6-dev m4 g++-multilib \
      autoconf libtool ncurses-dev unzip git python python-zmq \
      zlib1g-dev wget bsdmainutils automake

检查gcc 的版本信息
需要 gcc/g++ 4.9 或者更高的版本
查看 gcc 版本信息如下:

g++ --version

安装 gcc/g++ 4.9

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9

获取软件和参数文件
利用git 获取仓库并执行文件 fetch-params.sh

git clone https://github.com/zcash/zcash.git
cd zcash/
git checkout v1.0.8-1
./zcutil/fetch-params.sh

构建
确保成功安装所有依赖的软件包,执行如下命令

./zcutil/build.sh --disable-rust -j$(nproc)

测试

真实网络测试需要8G内存(此过程可略过)
执行:

./qa/zcash/full-test-suite.sh
./qa/pull-tester/rpc-tests.sh

配置
创建~/.zcash文件夹,并在起目录下利用下述命令创建~/.zcash/zcash.conf (下序命令创建文件夹和文件)

mkdir -p ~/.zcash
echo "addnode=mainnet.z.cash" >~/.zcash/zcash.conf
echo "rpcuser=username" >>~/.zcash/zcash.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >>~/.zcash/zcash.conf

确保 CPU 能挖矿

echo 'gen=1' >> ~/.zcash/zcash.conf
echo "genproclimit=-1" >> ~/.zcash/zcash.conf

运行 Zcash

./src/zcashd

或者后台运行

./src/zcashd --daemon

获取相关信息

./src/zcash-cli getinfo

这里写图片描述

注意中间出现一些问题:
这里写图片描述

解决方法:

apt-get install update
apt-get install upgrade

此外,还遇到一个文件记不清了,当时修改configure.ac 文件.看参考网址.
后续使用参考官网手册

https://github.com/zcash/zcash/wiki/1.0-User-Guide
https://github.com/zcash/zcash/issues/1898
https://github.com/zcash/zcash/blob/master/configure.ac#L443

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值