forked from dArkjON/BTDX-Masternode-Setup-Ubuntu-1404
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbtdxsetup.sh
86 lines (78 loc) · 2.8 KB
/
btdxsetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
# This script will install all required stuff to run a Bitcloud (BTDX) Masternode.
# BitSend Repo : https://github.com/LIMXTEC/Bitcloud
# !! THIS SCRIPT NEED TO RUN AS ROOT !!
######################################################################
clear
echo "*********** Welcome to the Bitcloud (BTDX) Masternode Setup Script ***********"
echo 'This script will install all required updates & package for Ubuntu 14.04 !'
echo 'Clone & Compile the BTDX Wallet also help you on first setup and sync'
echo '****************************************************************************'
sleep 3
echo '*** Step 1/5 ***'
echo '*** Creating 2GB Swapfile ***'
sleep 1
dd if=/dev/zero of=/mnt/mybtdxswap.swap bs=2M count=1000
mkswap /mnt/mybtdxswap.swap
swapon /mnt/mybtdxswap.swap
sleep 1
echo '*** Done 1/5 ***'
sleep 1
echo '*** Step 2/5 ***'
echo '*** Running updates and install required packages ***'
sleep 2
sudo apt-get update -y
sudo apt-get dist-upgrade -y
sudo apt-get install automake build-essential libtool autotools-dev autoconf pkg-config libssl-dev -y
sudo apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server -y
sudo apt-get install software-properties-common -y
sudo apt-get install libevent-dev -y
add-apt-repository ppa:bitcoin/bitcoin
apt-get update -y
apt-get install libdb4.8-dev libdb4.8++-dev -y
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh
source ~/.profile
echo '*** Done 2/5 ***'
sleep 1
echo '*** Step 3/5 ***'
echo '*** Cloning and Compiling Bitcloud Wallet ***'
cd
git clone https://github.com/LIMXTEC/Bitcloud.git
cd Bitcloud
./autogen.sh
./configure --disable-dependency-tracking --enable-tests=no --without-gui
make
cd
cd Bitcloud/src
strip bitcloudd
strip bitcloud-cli
strip bitcloud-tx
cp bitcloudd /usr/local/bin
cp bitcloud-cli /usr/local/bin
cp bitcloud-tx /usr/local/bin
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 8329 -j ACCEPT
cd
echo '*** Done 3/5 ***'
sleep 2
echo '*** Step 4/5 ***'
echo '*** Configure bitcloud.conf and download and import bootstrap file ***'
sleep 2
bitcloudd
sleep 3
echo -n "Please Enter a STRONG Password or copy & paste the password generated for you above and Hit [ENTER]: "
read usrpas
echo -n "Please Enter your masternode genkey respond and Hit [ENTER]: "
read mngenkey
echo -e "rpcuser=btdxdmasternodeservice2387645 \nrpcpassword=$usrpas \nrpcallowip=127.0.0.1 \nserver=1 \nlisten=1 \ndaemon=1 \nlogtimestamps=1 \nmasternode=1 \npromode=1 \nmasternodeprivkey=$mngenkey \n" > ~/.bitcloud/bitcloud.conf
echo '*** Done 4/5 ***'
sleep 2
echo '*** Step 5/5 ***'
echo '*** Last Server Start also Wallet Sync ***'
echo 'After 1 minute you will see the 'getinfo' output from the RPC Server...'
bitcloudd
sleep 60
bitcloud-cli getinfo
sleep 2
echo 'Have fun with your Masternode !'
sleep 2
echo '*** Done 5/5 ***'