Post
Topic
Board Altcoin Discussion
Topic OP
LINUX: wallet & miner in linux / cloud / raspberryPI (MANUALS, SCRIPTS)
by
drakoin
on 11/02/2014, 16:15:38 UTC
# Shortcut: www.tiny.cc/LinuxWallet links to here now. Easy to remember.
#
# ------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------
#
# Completely overhauled NEW instructions (28/9/2014, 20/2/2015)
# Will work for many altcoins. On your linux, in the cloud (VPS), on raspberryPi.
#
# Wallet --> posting # 31 -->
# https://bitcointalk.org/index.php?topic=460178.msg9007912#msg9007912
#
# Wallet quickstart autoinstaller script --> posting # 32 -->
# https://bitcointalk.org/index.php?topic=460178.msg9009832#msg9009832
#
# cpuMiner --> posting # 39 -->
# https://bitcointalk.org/index.php?topic=460178.msg10522742#msg10522742
#
# linux VPS for 0.25 BTC / year, detailed instructions --> posting # 38 -->
# https://bitcointalk.org/index.php?topic=460178.msg10513565#msg10513565
#
#
# ------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------
# -- END OF EDIT. (very) old posting following now: -----------------------------------
# ------------------------------------------------------------------------------------------------

# walletd - compile and install from github sources

# in this case duckduckcoin, which was forked
# from litecoin, like most other altcoins.
# So this should work for other coins, too.

# I succeeded with this on Ubuntu 12.04 and Debian 7.0 x64

# N.B.: the compilation fails with 500 MB RAM, so start with the
# 10$ droplet (1GB)
; after the compilation you can resize to 5$
# droplet. If you already have the smallest, power it down,
# resize it to at least 1GB of RAM, and power up again.
# Thanks to btcltcdigger for this hint.

# What?  "droplet"?  Your own server for 5$/month running costs!
# A cheap linux virtual server (VPS) in the cloud, created in 55seconds
# At digital ocean http://tiny.cc/digocean NL USA Singapur
# with code SSD2014 you get 10$ welcome bonus
# Buy 10$ droplet for 1 hour compilation, later downgrade to 5$/month.

# Create droplet. Wait for the email with the root password.
# To connect use ssh / putty.exe (data... auto-login: root)

passwd

sudo -i

# prep the system to be able to git & compile & build
cd ~
apt-get update
apt-get install git screen make automake build-essential libboost-all-dev

# might be necessary for other tools, for this wallet on Debian 7 is not:
# apt-get install yasm binutils libcurl4-openssl-dev openssl libssl-dev





# For some reason, bitcoin is stuck in an old database version,
# which is not supported by newest ubuntu / debian anymore,
# so we get it manually:

# Get db4.8 source, compile and install
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar zxf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
../dist/configure --enable-cxx
make
sudo make install

# Tell your system where to find db4.8
sudo ln -s /usr/local/BerkeleyDB.4.8/lib/libdb-4.8.so /usr/lib/libdb-4.8.so
sudo ln -s /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so /usr/lib/libdb_cxx-4.8.so
export BDB_INCLUDE_PATH="/usr/local/BerkeleyDB.4.8/include"
export BDB_LIB_PATH="/usr/local/BerkeleyDB.4.8/lib"

# rm -R ~/db-4.8.30.NC*   # perhaps not good to delete?



# EDIT: slower but cheap (free)
# create a SWAP FILE instead of the necessity for 1 MB RAM:
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile





# Get the wallet sources from github
# and build the headless server daemon "duckduckcoind"
cd ~
git clone https://github.com/duckduckcoin/duckduckcoin
cd ~/duckduckcoin/src
make -f makefile.unix USE_UPNP=-
cp duckduckcoind ..


 

# first time start creates folder wallet & blockchain & config
cd ~
./duckduckcoin/duckduckcoind  # just to create the folder,
# stops with password missing error



# create a config file (copy paste the whole paragraph in one go):

cat << "CONFIG" >> ~/.duckduckcoin/duckduckcoin.conf

# enable RPC
server=1
rpcport=12122
rpcuser=yourusername
rpcpassword=yoursuperdooperpassword
daemon=1
# no mining:
gen=0
# seed nodes:
addnode=69.90.132.182
addnode=69.90.132.181
addnode=69.90.132.64

CONFIG





# start server
~/duckduckcoin/duckduckcoind

# should answer with: Duckduckcoin server starting


# most important RPC API commands to control your accounts
~/duckduckcoin/duckduckcoind getbalance  
~/duckduckcoin/duckduckcoind getinfo
~/duckduckcoin/duckduckcoind getnewaddress forDonations
~/duckduckcoin/duckduckcoind listtransactions forDonations
~/duckduckcoin/duckduckcoind listaccounts
~/duckduckcoin/duckduckcoind getaddressesbyaccount forDonations
~/duckduckcoin/duckduckcoind getaddressesbyaccount ""

# the full list of commands
~/duckduckcoin/duckduckcoind help


# now to save money, you can power down the droplet,
# resize it back to 0.5GB of RAM (5$ per month),
# and power up again





# If you liked this tutorial, send me some duckduckcoins to try out your new abilities:
~/duckduckcoin/duckduckcoind sendtoaddress dTyYVSVEoHjVSA84h8uKJk3QHz573iU1VA 0.00005 ThankYouForYourTutorial

# or in other currencies at www.tiny.cc/drakointip


#