Guide to compile & install Bitcoind on Ubuntu 12.04 using VirtualBox

Have you ever wanted to run your own bitcoind node but figured it was too hard/technical? It shouldn’t be; here’s a simple guide I wrote that will allow anyone to setup their own bitcoin daemon on their own PC’s.

Step 1: VirtualBox & Ubuntu download

Download Oracle’s VM VirtualBox. This will allow us to run a Linux operating system (namely Ubuntu) without the headache of freeing up an actual machine. Technology is amazing right? The beauty of this method is that if you screw up, you can wipe the OS and begin over again in mere seconds. If you want to learn more about how VirtualBox works (along with some cool tips & tricks), I would definitely suggest giving this article a read through.

Next let’s download the ISO for Ubuntu 12.04 LTS. Make sure you get the 32-bit version. You can find the downloads page here: http://releases.ubuntu.com/12.04/ and the direct link I used here: http://releases.ubuntu.com/12.04/ubuntu-12.04.4-desktop-i386.iso. Next, let’s setup our VM (virtual machine).

Step 2: VirtualBox & Ubuntu 12.04 Setup

Open up VirtualBox after you’ve downloaded it and hit the “New” blue star in the upper left hand corner. Select any name such as bitcoind along with selecting Linux -> Ubuntu (32 bit). Assign up to 1024MB of RAM, any less might cause instability. Click “Create a virtual hard drive now“. Choose “VDI (VirtualBox Disk Image)“. Hit “Dynamically Allocated” and choose 8.00GB or higher. You’re ready to rock and roll!

Important! After you are setup you should see bitcoind in your list of Virtual Machines. Right click and go to “Settings“->”Network” and switch it to “Bridged Adapter“.

Installing Ubuntu is pretty easy so once you boot up by hitting “Start” just take the time to install the OS. It will ask you basic questions about your timezone, what username (bitcoind) & password you’d like and all that fun generic stuff that you reminisce about when installing an operating system.

Step 3: Making bitcoind

source for build: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md & source for ppa: https://launchpad.net/~bitcoin/+archive/bitcoin

Step 4: Configure bitcoind

Create an empty ~/.bitcoin/bitcoin.conf file in the .bitcoin folder by running:

Put the following code into the file:

If you’re using nano, hit CTRL+X to save. Also, to get your IP if you are going to be using this in correlation with my opensource PHP Bitcoin Wallet API use the following in your terminal: ifconfig.

To get more detailed information about the bitcoind config and commands, check this page out: https://en.bitcoin.it/wiki/Running_Bitcoin.

Step 5: Run bitcoind for the first time!

Well, we’ve done it! If the next command works, your bitcoin daemon server will be up & running, initially trying to connect to other nodes on the network so that it can begin to download the full blockchain for the first time.

It’s almost as if a mini-universe has just been created all inside another virtual universe that we just created that’s inside our computer which is an … oh, you get the point. Basically all that’s left is to type bitcoind in the terminal window you’ve been using so far.

It should output “Bitcoin server starting”, and there you have it!

Step 6: Allow time to download the entire blockchain

Once bitcoind is started, the blockchain will begin to download. You must let it download entirely until it reaches the current Bitcoin block count to date before proceeding further. Here are some commands to get you started.

To view the status of the download: bitcoind getinfo
To view other commands: bitcoind help
To view the bitcoin current block count: http://blockexplorer.com/q/getblockcount

That’s it! If you noticed any errors please post a comment.

摘自:http://virtuedev.com/bitcoin/guide-to-compile-install-bitcoind-on-ubuntu-12-04-using-virtualbox/

上一篇: