Last active
August 29, 2015 14:09
-
-
Save you21979/2addc5c408301a96d7ef to your computer and use it in GitHub Desktop.
BitZenyをコンパイルしてみる ref: http://qiita.com/you21979@github/items/1567d6d91588e53f15d6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
yum install -y libyaml PyYAML ansible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RPCを使うときのユーザー名 | |
rpcuser=bitzenyrpc | |
# RPCを使うときのパスワード | |
rpcpassword=nagaipassword | |
# RPCを利用できるIPアドレス | |
rpcallowip=192.168.* | |
# RPCを受け付けるポート番号 | |
rpcport=10000 | |
# RPCを同時に受け付ける数 | |
rpcthreads=10 | |
# マイニングするかどうか。0でしない | |
gen=0 | |
# P2Pのコネクション数 | |
maxconnections=200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/opt/bitzeny/bin/bitzenyd -conf=/opt/bitzeny/etc/bitzeny.conf -datadir=/opt/bitzeny/data -daemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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