下载节点
请从官网下载节点:https://zcash.readthedocs.io/en/latest/rtd_pages/Debian-Ubuntu-build.html或使用如下代码:
sudo apt-get install -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python3 python3-zmq zlib1g-dev curl bsdmainutils automake libtinfo5
git clone https://github.com/zcash/zcash.git
cd zcash/
./zcutil/fetch-params.sh
./zcutil/clean.sh
./zcutil/build.sh -j$(nproc)
配置节点
详细配置请参考:https://zcash.readthedocs.io/en/latest/rtd_pages/zcash_conf_guide.html
mkdir -p ~/.zcash
touch ~/.zcash/zcash.conf
vi ~/.zcash/zcash.conf
写入配置:
genproclimit=1 # Set the number of threads to be used for mining Zcash
rpcuser=zcash12345 # user name,需要自定义!!!
rpcpassword=zcash12345 # password,需要自定义!!!
运行节点
可以测试一下运行
./zcash/src/zcashd
后台执行:
./zcash/src/zcashd --daemon
停止节点
./zcash/src/zcash-cli stop