1. 程式人生 > >eos:ubuntu18.04環境配置

eos:ubuntu18.04環境配置

1. 虛擬機器硬體要求:記憶體8G、雙核(單核執行eosio-cpp會卡住)。

2. 安裝eosio1.5.0

wget https://github.com/eosio/eos/releases/download/v1.5.0/eosio_1.5.0-1-ubuntu-18.04_amd64.deb
sudo apt install ./eosio_1.5.0-1-ubuntu-18.04_amd64.deb

3. 安裝eosio.cdt-1.4.1

wget https://github.com/eosio/eosio.cdt/releases/download/v1.4.1/eosio.cdt-1.4.1.x86_64.deb
sudo apt install ./eosio.cdt-1.4.1.x86_64.deb

4. 啟動keosd 

keosd &

5. 啟動nodeos

nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /home/bit/bin/eosio/data --config-dir /home/bit/bin/eosio/config --http-server-address=0.0.0.0:8888 --access-control-allow-origin='*' --contracts-console --http-validate-host=false —filter-on='*' 

 6. 修改配置config.ini

# Track actions which match receiver:action:actor. Actor may be blank to include all. Action and Actor both blank allows all from Recieiver. Receiver may not be blank. (eosio::history_plugin)
#filter-on =  -> filter-on = *

# The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin)
http-server-address = 127.0.0.1:8888 -> http-server-address = 0.0.0.0:8888

7. 重啟nodeos

pkill nodeos
nodeos -e -p eosio --plugin ......

8. 測試是否正常執行

    在虛擬機器內

http://localhost:8888/v1/chain/get_info

     在主機

http://xxxx:8888/v1/chain/get_info
xxxx:虛擬機器IP地址