帶你瞭解比特幣Bitcoin原始碼

大雄45發表於2020-11-26
導讀 比特幣 (貨幣符號: ฿;英文名:Bitcoin;英文縮寫: BTC),是一種用於開源的P2P軟體而產生的電子貨幣。

比特幣全域性圖是這樣的:

帶你瞭解比特幣Bitcoin原始碼帶你瞭解比特幣Bitcoin原始碼

在這兒主要介紹 下的比特幣Bitcoin安裝,我們選擇ubuntu 12.04的環境,安裝相對容易得多。Windows下並不推薦,因為基於mingW配置相以繁瑣。

先拉下原始碼

git clone 

安裝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的資料需要下載。

原文來自:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69955379/viewspace-2737356/,如需轉載,請註明出處,否則將追究法律責任。

相關文章