Search This Blog

Tuesday, April 22, 2014

Bitcoin and Ubuntu 12.04

This article contains some help for those starting to get into using bitcoin and contains help I have found when reading through different forums and experiences made.


It also assumes some basic knowledge about Bitcoin in general, bitcoin client the meaning of mining, mining software, blocks, hashing rate and so on. All this information can be found in the Bitcoin Wiki and only requires some reading and no actual deep programming knowledge.


Contents of this Article:

About Bitcoin

Installing the Bitcoin Client

Mining & Mining Software

Where to Mine

Downloads & Links

Earn Your First Coins (for free)

Sources
About Bitcoin


“Bitcoin uses peer-to-peer technology to operate with no central authority or banks; managing transactions and the issuing of bitcoins is carried out collectively by the network. Bitcoin is open-source; its design is public, nobody owns or controls Bitcoin and everyone can take part.”


Originally Bitcoin was developed by an anonymous person calling himself “Satoshi Nakamoto”, his real identity is still unknown.


The network uses the SHA256 algorithm that is very fast to compute and hence allowed technology companies to develop specialized hardware for bitcoin mining, the coin generation process. The mining process includes a “puzzle” a machine can solve and based on the outcome of this puzzle a block might be generated. Upon finding a new block, 25 BTC is added to the miner. Blocks are generated on a predictable rate (1 block every 10 minutes) and the reward for finding a block halves on a pre-determined basis. These factors limit the total number of available bitcoins in the system, which will be 21 million coins once the system reaches this point in the future.


The easy calculation of SHA256 hashes made it available to develop specialized hardware such as FPGAs (Field programmable Gate Array) and ASICs (Application Specific Integrated Circuit) that specialize in bitcoin mining. Such hardware have dramatically shifted the bitcoin mining process and increased the global hash rate of the network. Whether this is good or bad, everyone has to decide for him/herself. one thing is for sure, bitcoin is growing faster than before. Currently 1 coin (BTC) is worth over 500$ and it does not seem to slow down.


And here is a short video explaining a few things and introducing Bitcoin.



Installing the Bitcoin Client


First of all what you should know that there are 2 versions of the official bitcoin client, bitcoin and bitcoin-qt. Bitcoin is the command line client that is for more advanced users while bitcoin-qt is the graphical user interface (GUI) version that is easier to use (aim to use the bitcoin-qt, GUI version).


Known issue with the client under Ubuntu: The icon does not show in the Unity menu bar (top of the screen where email etc is.). It shows up when first installing, but after that it is gone. As said above, I tried building from source to see if the problem is solved that way, but it isn’t. Not a big impact, just a minor issue, but I personally would like to be displayed there, hopefully this will be fixed soon. Update: This issue has been fixed in the Latest Client (as far as I saw).


1. Amending Software Sources (PPA)


Update: This seems to be the predominantly supported and easiest way of installing bitcoin-qt on an Ubuntu system.


Edit your software sources by,

sudo gedit /etc/apt/sources.list

and add the 2 lines at the end of the file,

deb http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu YOUR_UBUNTU_VERSION_HERE main

deb-src http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu YOUR_UBUNTU_VERSION_HERE main


Where of course you replace “YOUR_UBUNTU_VERSION_HERE” with the name of your Ubuntu version, e.g. 12.04 is “precise”. If this is not perfectly clear for you or you are using another version than 12.04 of Ubuntu then check out this link for help: https://launchpad.net/~bitcoin/+archive/bitcoin. After this simply run in the terminal,

sudo apt-get update sudo apt-get install bitcoin-qt

It is now installed on your system in /home/[USER]/.bitcoin You can create a desktop launcher or launch it from unity panel or your favourite place. If you need more help: Bitcoin.org


2. Installing the Bitcoin Client — Alternative 1


Installation by downlaoding the latest bitcoin *.tar.gz file. As per the README file tells:

Download the latest *.tar.gz file from bitcoin.org

Unzip the contents into a folder

Run sudo apt-get install libqtgui4 to install Qt4 runtime libraries (if you had a previous version installed this should already exist on your system)

Run either of the 4 executable installers (according to your system)

bin/32/bitcoin-qt (GUI, 32-bit) bin/32/bitcoind (headless, 32-bit) bin/64/bitcoin-qt (GUI, 64-bit) bin/64/bitcoind (headless, 64-bit)

This should install the bitcoin client onto your system.


3. Building from Source — Alternative 2


To get the bitcoin client clone the official github repository first and then decide whether you need the GUI version (bitcoin-qt) or just the terminal one. Clone the github repository,

git clone https://github.com/bitcoin/bitcoin ROUTE

where “ROUTE” is the route to the folder you want to copy to. Leave empty to clone it to your home directory. Also you will need some packages installed, get these by running

sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb4.8++-dev
3.a. Terminal Version


This is fully in the terminal. After the github repository as been downloaded and the necessary packages applied, simply execute (as per doc/readme-qt.rst)

qmake make

Now note that as said this is the terminal version of the bitcoin client, it comes with no graphical interface, all arguments must be given in the terminal. It is highly advised that you do not use this option.

If qmake gives an error, try

qmake “USE_UPNP=-” make
3.b. GUI Version


You have to get a program called “Qt-creator” from the software centre so go ahead and download it.


Also you will need the packages as mentioned above so install those if you have not done so already.

If you have it navigate to the cloned github repository, right-click bitcoin-qt.pro and select “Open with Qt Creator”


This will open up Qt, here click on run on the bottom left of the screen


and this will create an executable file in the bitcoin folder that will run bitcoin-qt. Run as you would any other file.


Mining & Mining Software


You can either mine alone — in “solo” — where the possibility of you finding a block (25 BTC ~ 5000 Euros, but doesn’t matter as it is changing all the time) is above 40 years, or you can mine for a group — called “pools” — where you get a share of the 25 BTC based on the help you provided. With solo mining you may not receive anything at all, but you might find a block and get the total 25 BTC, whereas in a pool you will have more steady, but smaller payments. As the difficulty and global hash rate are high, it is highly advised to join and mine a pool.


Installing poclbm-GUI


Either way you want to go, you need a software to mine and start hashing. I suggest using poclbm-gui miner which is easy to set up and gives the same functions as the terminal version. The things you will need on your system installed are,

python 2.6 or above (3 is not supported)

wxpython, get them from synaptic package manager.


nVidia Cards:

numpy and PyOpenCL, that can again be again installed from synaptic package manager.


Launch synaptic package manager with: sudo synaptic and make a search for the packages and install.


ATI video cards: If you have an ATI card and plan to use it for mining (which will be much faster than CPU or nVidia cards) the you also need an ATI Stream SDK downloaded and installed. You can get the latest version of poclbm GUI miner from github,

git clone https://github.com/Kiv/poclbm

and then to run,

cd /home/[USER]/poclbm

python guiminer.py

This will run the guiminer (the front end software) and also poclbm miner, however if you want to use other mining software (e.g. cgminer), it has to be downloaded and installed manually (see links at end of the post and at List of Bitcoin Mining Software). I leave this to you, you have to decide what software you want to use or rather what does your hardware support (!). With all the different ASICS out you will need to check for support. Cgminer is generally a good option to go for and installing it is very simple and it is described in the readme file.


Look for what you need; clone git repo, cd to git repo, ./configure, make, make install or refer to documentation. After say you have downlaoded cgminer, you can use the GUIminer to control it. This virtually poses no overhead on your hash rate. Make sure you set the correct path to your mining software! Refer to software screenshots below. I recommend you create a “miners” directory within the guiminer and put all miners you use in here. Just to keep things in one place.


Mining in Solo


Firstly go to ~/.bitcoin directory (to see hidden folders press “Ctrl+H” in the file manager, in your home directory) and create a new file called bitcoin.conf if you do not have it already. Put 3 lines in the file,

rpcuser=local_username rpcpassword=password_you_want_to_use_make_it_long_and_strong

rpcport=8332

Keep these secure. Setting up solo mining requires the bitcoin client to be started up in server mode. To do this, close the client if you have it already running and and start bitcoin-qt with the following command from the terminal,

bitcoin-qt -server -RPCALLOWIP=192.168.0.* -RPCPORT=8332

Alternatively

Add the line:

server=1

into ~/.bitcoinbitcoin.conf too.

###

If you are using Windows this is quite similar, open the command line and do,

cd Program Files (x86)\Bitcoin

bitcoin-qt.exe -server -RPCALLOWIP=192.168.0.* -RPCPORT=8332

###

Where192.168.0.* is you local IP address range, note that this might be different based on your home network settings. This is to tell the client to allow miner connections from the local network. Start mining software as normal and set up a new solo miner, refer to picture below.


Ext. Path: Absolute path to your miners installed. Make sure it is pointing to the right executable file.

Server: Choose solo

Host: localhost

Port: Just use 8332, make sure it is the same as you have launched the client with & set in your bitcoin.conf

Username: As per set in ~/.bitcoin/bitcoin.conf

Password: As per set in ~/.bitcoin/bitcoin.conf

Extra flags: Flags for the miner, like “-v -w 128′, this depends on the miner and graphics card you are using. You can look up a list of best settings for different cards Bitcoin Wiki After setting up to mine in solo, you should see a similar window:

Ubuntu


Windows


If you have launched the client right, got the matching username & password you should be mining in solo.



Mining for a Pool


Pooled mining is the “easier” from the 2. From the dropdown menu simply choose which pool you want to mine for — or choose “other” if it is not listed — type in your account credentials and other information necessary, specified on the pool’s homepage and start mining. Please refer to the images and information discussed above in “Mining in Solo”. Of course, username and password in this case will be the ones specific to your pool’s one and not the one set it ~/.bitcoin/bitcoin.conf ! If you are looking for a pool to mine for, scroll to the bottom of this post!


Note: Setting all these up is not difficult at all, once you have figured out how to do it. I hope I could save you some time of looking around the internet and browsing through different forums for finding the right information. If you however require any further help or anything was not clear or just got stuck, leave a comment and I will get back to you and do my best to help.



Downloads & Links

poclbm with GUI — Github (Kiv); GPU miner using OpenCL, Nvida & ATI; Recommended as it contains GUI and mining software alike!

Ufasoft CPU/GPU miner — darkgamex.ch; has to be built from source (Windows & Linux)

Diablo GPU miner — Github (Diablo);Uses Java ant the OpenCL framework for hashing; ATI & Nvidia cards

cgminer — ck.kolivas.org; multi-threaded multi-pool GPU, FPGA and CPU miner

phoenix miner — Github;

Bitcoin client — Bitcoin.org (Windows & Linux)

To learn more about miner software read Bitcoin Wiki
Mining Hardware comparison and best Flags Bitcoin Wiki


Earn Your First Coins (for free)


Guugll Search Free Bitcoins


 


Where to Mine


Guugll Zetacoin P2Pool — EU (SHA-256)


Guugll Feathercoin P2Pool — EU (scrypt)


 


Exchanges


Cryptsy: http://cryptsy.com/

Coins-e:http://coins-e.com/

Bter: http://bter.com/


 



source: http://ubuntuhak.blogspot.cz/2012/11/bitcoin-basics-and-ubuntu-1204.html


Guugll Search


http://www.guugll.eu/bitcoin-ubuntu-12-04/

No comments:

Post a Comment