比特幣Bitcoin源代碼安裝編譯
作者:Petter Liu
來源 https://www.cnblogs.com/wintersun/p/3813424.html
比特幣 (貨幣符號: ฿;英文名:Bitcoin;英文縮寫: BTC),是一種用於開源的P2P軟件而產生的電子貨幣。比特幣全局圖是這樣的:
在這兒主要介紹Linux下的比特幣Bitcoin安裝,我們選擇ubuntu 12.04的環境,安裝相對容易得多。Windows下並不推薦,因為基於mingW配置相以繁瑣。
同時也可以參考build官方文檔。
https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md
https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
先拉下源代碼:
git clone https://github.com/bitcoin/bitcoin.git
安裝Berkeley DB 4.8以上版本:
sudo apt-get install libdb5.1++-dev
然后進入到相關目錄:
cd bitcoin
./autogen.sh./configure
如果你遇到這樣的提示:configure: error: Found Berkeley DB other than 4.8, required for portable wallets 那就可以這樣:
./configure --with-incompatible-bdb
如查遇到到這樣的提示:checking for boostlib >= 1.20.0… configure: We could not detect the boost libraries (version 1.20 or higher). 那這樣:
sudo apt-get install libboost-all-dev
然后再次configure,如果你需要bitcoin-qt前端,那需要安裝
sudo apt-get install libqt4-core libqt4-gui libqt4-dev
再次configure,這次可以了
make
開始編譯,大約5分鍾,然后安裝編譯好的二進制文件
make install
想運行前端那執行
bitcoin-qt
服務端是
bitcoind -server –printtoconcole
接到下,是否挖礦就看您自己了。以當前時間為起點,連接testnet有9G的blockchain數據需要下載,livesite有35G的數據需要下載。
也可以從這里下載文件,以加快速度。后續會介紹關於比特幣的更多內容。有興趣可以閱讀它的源代碼。
資料LINK:
BitCoin比特幣 wiki
https://en.bitcoin.it/wiki/Main_Page
Bitcoin比特幣 源代碼文檔
https://dev.visucore.com/bitcoin/doxygen/files.html
Bitcoin比特幣 中國
================ End