Bitcoin Forum
June 14, 2024, 09:10:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoind buildscript  (Read 1164 times)
coinrevo (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
December 30, 2013, 10:58:55 PM
Last edit: January 04, 2014, 09:51:26 AM by coinrevo
 #1

Ubuntu build script. Tested with ubuntu 13.04.

Work in progress. Latest version at the top.

Needed fixes:

* berkeley DB not working
* incompatible BerkeleyDB version.
* user management

Based on
https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
http://bitcoin.stackexchange.com/questions/10010/how-to-install-a-bitcoin-client-on-ubuntu-server

Quote
#!/bin/bash
#
# bitcoind linux buildscript
#
# tested on ubuntu 13
# v.0.03
# last updated 3/1/2014
#
#

#----------------------------------------------------------
#required packages
#----------------------------------------------------------

apt-get -y upgrade
apt-get -y update
apt-get install -y git
apt-get install -y build-essential
apt-get install -y python-pip

apt-get install -y libssl-dev
apt-get install -y libboost-all-dev
apt-get install -y dh-autoreconf

apt-get install -y ccache
apt-get install -y pkg-config

#undocumented issues with bitcoin unix install
apt-get install -y libdb++-dev
apt-get install -y libprotobuf-dev
apt-get install -y alien


#----------------------------------------------------------
# Build berkley db4.8
#----------------------------------------------------------

cd $HOME/Downloads

if [ ! -e db-4.8.30 ]
then
wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar zxvf db-4.8.30.tar.gz
rm -f db-4.8.30.tar.gz
fi

cd db-4.8.30/build_unix
sh ../dist/configure --prefix=/usr/local --enable-cxx
make
sudo make install
cd $HOME/Downloads
rm -fr db-4.8.30/

#----------------------------------------------------------
#build bitcoin from source
#----------------------------------------------------------

mkdir $HOME/bitcoin; cd bitcoin
git clone git://github.com/bitcoin/bitcoin.git $HOME/bitcoin
/bin/bash $HOME/bitcoin/autogen.sh
 
#build without QT
cd $HOME/bitcoin && ./configure --without-qt
sudo make

#copy the binary. better perhaps a init script and change privs
cp $HOME/bitcoin/src/bitcoind /usr/local/bin

#----------------------------------------------------------
#create config
#----------------------------------------------------------

mkdir $HOME/.bitcoin
touch $HOME/.bitcoin/bitcoin.conf

echo "########### Creating config"
config=".bitcoin/bitcoin.conf"
touch $config
echo "server=1" > $config
echo "daemon=1" >> $config
echo "connections=40" >> $config
randUser=`< /dev/urandom tr -dc A-Za-z0-9 | head -c30`
randPass=`< /dev/urandom tr -dc A-Za-z0-9 | head -c30`
echo "rpcuser=$randUser" >> $config
echo "rpcpassword=$randPass" >> $config

# other config

#echo "########### Firewall rules; allow 22,8333"
#ufw allow 22/tcp
#ufw allow 8333/tcp
#ufw --force enable

#echo "########### Creating Swap"
#dd if=/dev/zero of=/swapfile bs=1M count=1024 ; mkswap /swapfile ; swapon /swapfile
#echo "/swapfile swap swap defaults 0 0" >> /etc/fstab


#echo "########### Setting up autostart (cron)"
#crontab -l > tempcron
#echo "@reboot bitcoind -daemon" >> tempcron
#crontab tempcron
#rm tempcron
#rebootoot password!"
#passwd
coinrevo (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
January 01, 2014, 11:19:23 AM
Last edit: January 04, 2014, 09:32:26 AM by coinrevo
 #2

see top
dewdeded
Legendary
*
Offline Offline

Activity: 1232
Merit: 1011


Monero Evangelist


View Profile
January 01, 2014, 03:49:30 PM
 #3

Works on Debian?
coinrevo (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
January 01, 2014, 04:23:57 PM
Last edit: January 04, 2014, 09:33:07 AM by coinrevo
 #4

see top
dewdeded
Legendary
*
Offline Offline

Activity: 1232
Merit: 1011


Monero Evangelist


View Profile
January 01, 2014, 04:35:57 PM
 #5

So which script do we use now on Ubuntu? First or second post?
coinrevo (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
January 01, 2014, 04:51:12 PM
Last edit: January 04, 2014, 09:33:18 AM by coinrevo
 #6

see top
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!