Skip to content

Instantly share code, notes, and snippets.

@you21979
Last active August 29, 2015 14:09
Show Gist options
  • Save you21979/2addc5c408301a96d7ef to your computer and use it in GitHub Desktop.
Save you21979/2addc5c408301a96d7ef to your computer and use it in GitHub Desktop.
BitZenyをコンパイルしてみる ref: http://qiita.com/you21979@github/items/1567d6d91588e53f15d6
#!/bin/sh
#
# bitzenyd Start bitzenyd
#
# chkconfig: 2345 08 92
# description: Starts, stops
#
# Source function library.
. /etc/init.d/functions
#
COINDIR=/opt/bitzeny
DAEMON=$COINDIR/bin/bitzenyd
CONF=$COINDIR/etc/bitzeny.conf
DATA=$COINDIR/data
start() {
$DAEMON -conf=$CONF -datadir=$DATA -daemon
}
stop() {
$DAEMON -conf=$CONF stop
}
restart() {
stop
sleep 3
start
}
getinfo() {
$DAEMON -conf=$CONF getinfo
$DAEMON -conf=$CONF getmininginfo
$DAEMON -conf=$CONF getdifficulty
}
case "$1" in
start)
start
RETVAL=$?
;;
stop)
stop
RETVAL=$?
;;
restart|force-reload)
restart
RETVAL=$?
;;
getinfo)
getinfo
RETVAL=$?
;;
*)
echo $"Usage: {start|stop|restart|getinfo}"
RETVAL=2
;;
esac
exit $RETVAL
rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y libyaml PyYAML ansible
yum install git
git clone https://github.com/you21979-storage/ansible-develop.git
cd ansible-develop
echo "[all]" > hosts
echo "localhost" >> hosts
ansible-playbook devel-cryptocurrency.yml -i hosts -k -c local
yum install automake autoconf libtool
git clone https://github.com/bitzeny/bitzeny.git -b z1.1.x
cd bitzeny
./autogen.sh
./configure LDFLAGS="-L /usr/local/lib64 -lrt -ldl" CXXFLAGS="-I /usr/local/include"
make -j2
# RPCを使うときのユーザー名
rpcuser=bitzenyrpc
# RPCを使うときのパスワード
rpcpassword=nagaipassword
# RPCを利用できるIPアドレス
rpcallowip=192.168.*
# RPCを受け付けるポート番号
rpcport=10000
# RPCを同時に受け付ける数
rpcthreads=10
# マイニングするかどうか。0でしない
gen=0
# P2Pのコネクション数
maxconnections=200
mkdir -p /opt/bitzeny/bin
mkdir -p /opt/bitzeny/etc
mkdir -p /opt/bitzeny/data
cp bitzeny.conf /opt/bitzeny/etc
cp bitzenyd /opt/bitzeny/bin
/opt/bitzeny/bin/bitzenyd -conf=/opt/bitzeny/etc/bitzeny.conf -datadir=/opt/bitzeny/data -daemon
/opt/bitzeny/bin/bitzenyd -conf=/opt/bitzeny/etc/bitzeny.conf getinfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment