日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Starzhou:EOSIO1.0 版本环境搭建

發布時間:2025/3/21 编程问答 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Starzhou:EOSIO1.0 版本环境搭建 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.


EOSIO本地環境搭建

eos.io的本地環境的搭建主要是參考eos.io在GitHub的Wiki,同時記錄一下搭建過程中遇到的坑。

Getting the Code

首先需要獲得eos.io的source code,通過以下的命令clone到本地:?
git clone https://github.com/EOSIO/eos --recursive?
命令行的–recursive這個flag確保克隆eos倉庫和它的子模塊,如果clone時沒有使用這個flag,則通過下面的命令也可以取得子模塊:?
git submodule update --init --recursive

Building EOSIO

Automated build script

最簡單的方法是使用eos的自動編譯腳本,自動編譯腳本支持以下的系統:

1. Amazon 2017.09 and higher. 2. Centos 7. 3. Fedora 25 and higher (Fedora 27 recommended). 4. Mint 18. 5. Ubuntu 16.04 (Ubuntu 16.10 recommended). 6. MacOS Darwin 10.12 and higher (MacOS 10.13.x recommended).
  • System Requirements (all platforms)

同時,所有的操作平臺,需要滿足:

1. 8GB的可用內存 2. 20GB的可用磁盤
  • 如果內存不滿足,腳本將會給出提示并且終止當前編譯。

Run the build script

cd eos?
./eosio_build.sh?
腳本會check系統的環境,如果某些依賴不存在,腳本會提示進行安裝。?
如下是博主在macOS Darwin 10.13.4上運行腳本后出現的依賴不存在情況:

Checking dependencies. Checking automake ... automake NOT found. Checking Libtool ... Libtool NOT found. Checking OpenSSL ... OpenSSL NOT found. Checking llvm ... llvm NOT found. Checking wget ... wget NOT found. Checking CMake ... CMake NOT found. Checking GMP ... GMP NOT found. Checking gettext ... gettext NOT found. Checking MongoDB ... MongoDB NOT found. Checking Doxygen ... Doxygen NOT found. Checking Graphviz ... Graphviz NOT found. Checking LCOV ... LCOV NOT found. Checking Python3 ... python3 NOT found.The following dependencies are required to install EOSIO.1. automake 2. Libtool 3. OpenSSL 4. llvm 5. wget 6. CMake 7. GMP 8. gettext 9. MongoDB 10. Doxygen 11. Graphviz 12. LCOV 13. Python 3Do you wish to install these packages? 1) Yes 2) No #?
  • build seccess將會出現以下畫面:
_______ _______ _______ _________ _______( ____ \( ___ )( ____ \\__ __/( ___ )| ( \/| ( ) || ( \/ ) ( | ( ) || (__ | | | || (_____ | | | | | || __) | | | |(_____ ) | | | | | || ( | | | | ) | | | | | | || (____/\| (___) |/\____) |___) (___| (___) |(_______/(_______)\_______)\_______/(_______)EOS.IO has been successfully built. 1:6:15To verify your installation run the following commands:/usr/local/bin/mongod -f /usr/local/etc/mongod.conf &cd /Users/lauyearh/Blockchain/EOS/eos/build; make testFor more information:EOS.IO website: https://eos.ioEOS.IO Telegram channel @ https://t.me/EOSProjectEOS.IO resources: https://eos.io/resources/EOS.IO wiki: https://github.com/EOSIO/eos/wiki

Build validation

可以通過一組測試用例,驗證你的編譯。?
如果是在Linux平臺:?
~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf &?
如果是在macOS:?
/usr/local/bin/mongod -f /usr/local/etc/mongod.conf &?
然后執行以下命令,不管在Linux還是macOS:?
cd build?
make test?
最后出現這樣的提示說明測試通過:

100% tests passed, 0 tests failed out of 33Total Test time (real) = 806.70 sec
  • Install the executables

通過安裝可執行檔案,可以在系統中方便操作eos,相當于把cmd寫到PATH變量中,但是其實是把內容安裝到/usr/local:?
cd build?
sudo make install

Creating and Launching a Single Node Testnet

運行下面的命令,將啟動一個簡單的節點:?
cd build/programs/nodeos?
./nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::account_history_api_plugin?
這個時候,默認的config路徑,在macOS上是$HOME/Library/Application Support/eosio/nodeos/config,里面包含config.ini和genesis.json兩個文件。當然,你也可以在啟動nodeos時通過–config-dir指定config路徑,并且需要建立ini和json兩個文件。

總結

博主build時用的是macOS,同時系統配置滿足要求,使用自動編譯腳本的時候沒遇到什么坑,順利build通過。Source code是master?branch,commit id是19227c9b0a095683c1df3668c110cef2d91cbb15。

參考

  • https://github.com/EOSIO/eos/wiki/Local-Environment

博主:starzhou

總結

以上是生活随笔為你收集整理的Starzhou:EOSIO1.0 版本环境搭建的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。