1. bitcoind.sh 파일 생성 

# vi bitcoind.sh
BITCOIN_TAG="v0.15.0"

# EPEL
sudo yum install -y epel-release

# DEPENDENCY
sudo yum install -y \
    autoconf \
    automake \
    boost-devel \
    gcc-c++ \
    git \
    libdb4-cxx \
    libdb4-cxx-devel \
    libevent-devel \
    libtool \
    shtool \
    openssl-devel \
    wget


# OPENSSL
cd ~
mkdir openssl
cd openssl
wget https://www.openssl.org/source/openssl-1.0.1l.tar.gz
tar zxvf openssl-1.0.1l.tar.gz
cd openssl-1.0.1l
export CFLAGS="-fPIC"
./config --prefix=/usr/rpc/openssl-lib shared enable-ec enable-ecdh enable-ecdsa
make all
sudo make install

# BITCOIND
cd ~
git clone https://github.com/bitcoin/bitcoin.git
cd ~/bitcoin
git checkout ${BITCOIN_TAG}
./autogen.sh
autoreconf -i
./configure --prefix=/usr/rpc/bitcoin-${BITCOIN_TAG} PKG_CONFIG_PATH=/usr/rpc/openssl-lib/lib/pkgconfig LIBS=-Wl,-rpath,/usr/rpc/openssl-lib/lib
make
sudo make install

cd ~
rm -rf bitcoin openssl


# LINK
sudo rm -f /usr/bin/bitcoind
sudo rm -f /usr/bin/bitcoin-cli
sudo ln -s /usr/rpc/bitcoin-${BITCOIN_TAG}/bin/bitcoind /usr/bin/bitcoind
sudo ln -s /usr/rpc/bitcoin-${BITCOIN_TAG}/bin/bitcoin-cli /usr/bin/bitcoin-cli

# CONFIG
mkdir /data/rpc/bitcoin
touch /data/rpc/bitcoin/bitcoin.conf
chmod 600 /data/rpc/bitcoin/bitcoin.conf

2. bitcoind.sh 파일 실행

# sh bitcoind.sh

3. bitcoin.conf 파일 설정

# vi /data/rpc/bitcoin/bitcoin.conf
server=1
testnet=1
txindex=1
rpcuser=user
rpcpassword=userpw
rpcallowip=0.0.0.0/0
rpcport=18332

4. 데몬 실행

# bitcoind -deamon

'서버설정 및 설치 > SERVER' 카테고리의 다른 글

Centos7 gitlab 설치 및 nginx 연동  (0) 2021.09.24
centos nginx 설치  (0) 2020.11.24
Spring Boot - jar로 서비스 등록  (0) 2020.03.27
openjdk 설치  (0) 2020.03.27
sendmail 설치  (1) 2018.07.11