随着学习的脚步向前,技术不断进步,知识不断积累。我了解到了更好的安装方式,所以更新了这篇博客,分享给大家。
主推采用docker容器的方式进行安装。
【2020-08-23】
至于安装或者使用过程中出现的其它问题,大家可以参考评论区的问答,我已经尽自己努力回答了网友的提问,希望一切顺利!
yum install -y yum-utils #安装yum源管理工具
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # 切换阿里云源
yum install -y docker-ce docker-compose
systemctl restart docker
mkdir /home/omnicore
cd /home/omnicore
vim docker-compose.yaml
version: '3'
services:
omnicored:
image: mpugach/omnicored
volumes:
- /home/omnicore:/home/bitcoin/.bitcoin
- /home/omnicore/data:/omnicore/data
ports:
- "18886:18886"
command: "-server -testnet=0 -txindex -rpcuser=username -rpcpassword=password -rpcallowip=0.0.0.0/0 -rpcport=8886 -printtoconsole"
docker-compose up -d #启动容器
docker-compose ps #查看容器是否启动成功
docker exec -it omnicore_omnicored_1 bash
# 在容器内执行
omnicore-cli -rpcport=8886 -rpcuser=username -rpcpassword=password getblockchaininfo
# 在容器内执行
omnicore-cli -rpcport=8886 -rpcuser=username -rpcpassword=password getnewaddress
- 以下为我最初使用之方法,鉴于安装比较麻烦,故弃用!
yum -y install nodejs git wget vim goaccess gcc gcc-c++ autoconf automake make pcre pcre-devel zlib zlib-devel libxml2 libxml2-devel openssl openssl-devel gd libjpeg libjpeg-devel libpng libpng-devel libaio libtool boost boost-devel libevent-devel
mkdir /home/libdb4
cd /home/libdb4/
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-devel-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-4.8.30-13.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-devel-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-4.8.30-13.el7.x86_64.rpm
rpm -ivh libdb4-cxx-devel-4.8.30-13.el7.x86_64.rpm
cd /home
git clone https://github.com/OmniLayer/omnicore.git
cd /home/omnicore/
./autogen.sh
./configure
make & make install
cd /root/.bitcoin/
vim bitcoin.conf
server=1
testnet=0 #测试链填 1 主链填 0
rpcuser=xirigh # RPC用户名
rpcpassword=[PASSWORD] #RPC密码
rpcallowip=0.0.0.0/0 #允许链接的IP
rpcport=8886 #RPC访问端口
txindex=1
mkdir /home/usdt
omnicored -conf=/root/.bitcoin/bitcoin.conf -datadir=/home/usdt
omnicore-cli -conf=/root/.bitcoin/bitcoin.conf getblockchaininfo
omnicore-cli getnewaddress # mmRTfHS4M6jX3dq6Jrjxhca1yu1fhwDLwP