Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to install EOS Block chain platform to build and develop dapp Environment

Shulou Source: shulou.com Published: 2022-06-01 19:26:39 10月02日 Update

This article mainly shows you the "EOS blockchain platform construction and development dapp environment how to install", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "EOS blockchain platform construction development dapp environment how to install" this article.

EOSIO component

EOSIO is made up of three component.

Nodeos: the component that manages the blockchain nodes.

Keosd: a component that manages wallets.

Cleos: controls the blockchain and wallet CLI tool.

Install EOSIO

This document is based on MacOS Darwin 10.12.

Download the source code from EOSIO's github library.

$git clone https://github.com/EOSIO/eos-- recursive

To install xcode and homebrew code. If it is not already installed, set up xcode and homebrew first.

Xcode: https://developer.apple.com/xcode/

Homebrew: https://brew.sh

The source code contains the build script and the build implementation.

$cd eos$. / eosio_build.sh

If successful, the following message will appear.

Linking CXX executable unit_test [100%] Built target unit_test_ / (_) | (\ /) | | (\ /) ( | | () | (_ _ | (_ /\ | (_ _) | /\ _) | _) (_) | (_ / (_)\ _)\ _ / (_) EOSIO has been successfully built. 00:11:21To verify your installation run the following commands:/usr/local/bin/mongod-f / usr/local/etc/mongod.conf & cd / Users/scion/git/eos/build; make testFor more information:EOSIO website: https://eos.ioEOSIO Telegram channel @ https://t.me/EOSProjectEOSIO resources: https://eos.io/resources/EOSIO Stack Exchange: https://eosio.stackexchange.comEOSIO wiki: https://github.com/EOSIO/eos/wiki

Solve the problem

If an error like this occurs during build:

CMake Error at / usr/local/Cellar/cmake/3.11.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Failed to find Gettext libintl (missing: Intl_INCLUDE_DIR) Call Stack (most recent call first): / usr/local/Cellar/cmake/3.11.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_ FPHSA_FAILURE_MESSAGE) / usr/local/Cellar/cmake/3.11.3/share/cmake/Modules/FindIntl.cmake:47 (FIND _ PACKAGE_HANDLE_STANDARD_ARGS) programs/cleos/CMakeLists.txt:29 (find_package)

The gettext of homebrew should be connected to an incorrect version. Just change the connection information:

$brew link gettext-force

Add gettoxt path to the environment variables file (~ / .profile):

Export PATH= "/ usr/local/opt/gettext/bin:$PATH"

Reference: https://github.com/EOSIO/eos/issues/2174

This can also happen:

Mac OS 10.13.3 build error "path mongo-cxx-driver already exists"

The solution is as follows:

Sudo rm-rf / tmp/mongo*cd / path/to/eosrm-rf build/git pullgit submodule update-init-recursive./eosio_build.sh

Reference: https://github.com/EOSIO/eos/issues/3197

Verification

The installation completed successfully. To verify, execute the test script.

$/ usr/local/bin/mongod-f / usr/local/etc/mongod.conf & $cd build/$ make testRunning tests...Test project / Users/scion/git/eos/buildStart 1: test_cypher_suites1/35 Test # 1: test_cypher_suites. Passed 0.04 secStart 2: validate_simple.token_abi2/35 Test # 2: validate_simple.token_abi. Passed 0.08 secStart 3: validate_eosio.token_abi...34/35 Test # 34: restart-scenarios-test-hard_replay... Passed 151.83 secStart 35: validate_dirty_db_test35/35 Test # 35: validate_dirty_db_test. Passed 4.42 sec100% tests passed, 0 tests failed out of 35

The following completes the installation:

$cd build$ sudo make install runs EOSIO

Try running the components of EOSIO. This is to build a development environment, so you can use a node first.

Nodeos

Just execute it directly with the command with option

$nodeos-e-p eosio-- plugin eosio::chain_api_plugin-- plugin eosio::history_api_plugin

Where:

E: block generation

P eosio: block producer name-plugin eosio::chain_api_plugin: block chain related API plug-in-plugin eosio::history_api_plugin: history related API plug-in

You can replace parameters with configuration files.

Config file location: ~ / Library/Application Support/eosio/nodeos/config/config.ini

The file is automatically generated when nodeos runs for the first time.

$vi ~ / Library/Application\ Support/eosio/nodeos/config/config.ini... # enable-stale-production = falseenable-stale-production = true...# producer-name = producer-name = eosio...plugin = eosio::chain_api_pluginplugin = eosio::history_api_plugin...

Perform nodeos:

$nodeos

If it works properly, you can see the message that the block is generated in 0.5 seconds on the console.

To confirm that nodeos is working properly, let's try the application API interface.

Try HTTP Request on the application service running on port 8888:

$curl-k-v 'http://127.0.0.1:8888/v1/chain/get_info'-X GET Note: Unnecessary use of-X or-- request GET is already inferred.* Trying 127.0.0.1. * TCP_NODELAY set* Connected to 127.0.0.1 (127.0.0.1) port 8888 (# 0) > GET / v1/chain/get_info HTTP/1.1 > Host: 127.0.0.1 GET 8888 > User-Agent: curl/7.54.0 > Accept: * / * >

< HTTP/1.1 200 OK< Connection: close< Content-Length: 529< Content-type: application/json< Server: WebSocket++/0.7.0 GET /v1/wallet/list_wallets HTTP/1.1>

Host: 127.0.0.1 Host 8900 > User-Agent: curl/7.54.0 > Accept: * / * > < HTTP/1.1 200 OK < Connection: close < Content-Length: 2 < Content-type: application/json < Server: WebSocket++/0.7.0

Tags: Run block file environment development command port component generation platform information content article application service configuration location application software situation plug-in Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Linux Docker Redmi NVidia