7

I've googled a lot for this issue. Hehe. I have found some tutorials, but they were of no use because they are for systems that do have a GUI. I have no plans to install a GUI on that system, and I want to use bitcoin from the command line, or via RPC API. This is the system I run:

Linux redacted 3.2.0-40-generic-pae #64-Ubuntu SMP Mon Mar 25 21:44:41 UTC 2013 i686 athlon i386 GNU/Linux

I found I can do this:

sudo apt-get install bitcoind

But hardly I know what to do with it after that. It installs successfully. If you are going to ask a reason why I want this, it's because I want to communicate with it via PHP or I'll see how, but mostly it's for automating services with it. Please help. :-(

2
  • When installed, can I use the client for getting payed on apache (php or tomcat) web pages? Commented Dec 17, 2013 at 13:59
  • 1
    If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context.
    – Murch
    Commented Dec 17, 2013 at 23:30

7 Answers 7

9

Once you've installed bitcoind, you should create a configuration file (stored in ~/.bitcoin/bitcoin.conf) containing at least an RPC username and password, and then you just run bitcoind to start the server.

1
  • Thanks! I'm checking right now how can I add it to system startup.
    – ParanoidE
    Commented Apr 20, 2013 at 16:07
6

Edited answer after Tom van der Woerdt's comment about using an untrusted repo

from: https://gist.github.com/WyseNynja/2503687

sudo apt-get update
sudo apt-get install -y git-core build-essential libssl-dev libboost-all-dev libdb5.1-dev libdb5.1++-dev libgtk2.0-dev

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/src

make -f makefile.unix clean; make -f makefile.unix USE_UPNP= bitcoind

# from #bitcoin-dev:
# sacarlson: USE_UPNP= : don't build upnp, USE_UPNP=0 : build but disable by default, USE_UPNP=1 : build but enable by default

# optionally, 
strip bitcoind

download blockchain (check against http://blockexplorer.com/q/getblockcount):

bitcoind

test bitcoind:

bitcoind getbalance
bitcoind getaccountaddress account #(where account is the rpcuser account you created earlier in your bitcoind.conf file.) It will look like this: 1djfdLXSgqrwtexqkn9JewSrCJU4vu74eR4

send coins to the address and doublecheck bitcoind getbalance

3
  • Baaaad idea. Untrusted repo, while the default ones have it too. Commented May 13, 2013 at 19:11
  • I don't think this is correct. Can anyone else confirm this, because the INSTALL file tells you to install using ./autogen.sh && ./configure && make
    – puk
    Commented Dec 4, 2013 at 23:01
  • After cloning a repo, for reliable operation, you should git checkout the current stable release version.
    – Willtech
    Commented Feb 3, 2018 at 7:56
0

I already posted this answer, but it's gone for some reason. If some moderator deleted it, then I am ok with it, but shame on them for not informing me. In any case, here is the shell script I run on my computers to get bitcoin up and running:

#!/bin/bash

# Word of caution, I am not an experienced shell programmer. All I can #
# guarantee is that this script has worked for me, and that it has     #
# done so on multiple Ubuntu machines (one 11.10 and one 13.10), so    #
# hopefully it will work for you too                                   #

# Install some packages as instructed on various web sites
sudo apt-get -y install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev
sudo apt-get -y install libtool autotools-dev autoconf
sudo apt-get -y install libdb4.8-dev     # Generally this step fails
sudo apt-get -y install libdb4.8++-dev   # Generally this step fails
sudo apt-get -y install libboost1.37-dev # Sometimes this step fail
sudo apt-get -y install libboost-all-dev # Sometimes this step fail
sudo apt-get -y install libminiupnpc-dev
sudo apt-get -y install libdb++-dev
sudo apt-get -y install libprotobuf-dev
sudo apt-get -y install libqrencode-dev


# Build berkley db4.8
# Technically, this should only be installed if the above              #
# libdb4.8XX-dev packages failed to install but nothing beats a little #
# overkill =)                                                          #
cd ~/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
../dist/configure --prefix=/usr/local --enable-cxx # If this doesn't work, try removing or changing prefix
make
sudo make install
cd ~/Downloads
rm -fr db-4.8.30/

# Build bitcoin
cd ~/Downloads
if [ ! -e bitcoin ]
then
   git clone https://github.com/bitcoin/bitcoin ~/Downloads/bitcoin
fi

cd bitcoin

./autogen.sh
./configure # Non Ubuntu 13.xx versions
# ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu # Ubuntu 13.xx version
make
sudo make install

cd ~/Downloads
rm -fr bitcoin
1
  • If any of your posts were deleted you can see them by checking your profile. At the bottom of answers/questions overview is a link "show recently deleted answers/questions". I think you might also get a "response flag" (not sure). If you wish to inquire what happened to your answer, please see How can I know why my post was deleted?, and if that doesn't resolve it for you, please post a question in Bitcoin Meta.
    – Murch
    Commented Dec 10, 2013 at 14:07
0

This is ubuntu we're talking about.

sudo apt-get install bitcoin


will work.

0

In the Open Synaptic Package manager, search: bitcoin and click install. Bitcoin is already in the UBUNTU repositories.

0

i am able to get them but i am getting the api of functionalities which are in the link https://en.bitcoin.it/wiki/Running_Bitcoin bit not related to client api list which are in https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

1
  • Welcome to BitcoinSE! Your answer can be improved if you state what "them" are and possibly explain how you use the api.
    – Willtech
    Commented Feb 3, 2018 at 8:56
-1

Oh, once you run it after install, It could take up to 7 hours to update your wallet. After it's updated. Remember to encrypt your bitcoin wallet with a hard password but one you can never forget. Because if you do forget your password, All your bitcoins will be lost.

1
  • Please edit your answers to improve them or comment on them instead of adding additional answers.
    – Murch
    Commented Dec 5, 2013 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.