EOS笔记一:从安装到生成钱包

安装过程

参考王大锤的eos搭建笔记

自己搭建的时候因为自身的环境出现一些的错误
特记录下来安装过程

主要流程

1 安装

# step 1
git clone https://github.com/EOSIO/eos --recursive
# step 2
./eosio_build.sh

# 出现错误
CMake Error at /usr/local/Cellar/cmake/3.12.1/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.12.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
 /usr/local/Cellar/cmake/3.12.1/share/cmake/Modules/FindIntl.cmake:47 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  programs/cleos/CMakeLists.txt:29 (find_package)
# 解决办法
brew unlink gettext && brew link --force gettext
# step 3
cd build
sudo make install
# step 4 运行nodeos服务 成功
cd programs/nodeos
./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin

ps 注意添加 cleos / keosd 两个文件夹中的执行文件到path

# 创建钱包成功 path: ~/eosio-wallet/
cleos wallet create [--to-console/--file]

2 连接主网

在源笔记上 按流程参考教程2:连接主网 的方式有一点问题

#在~/Library/Application\ Support/eosio/nodeos/config/config.ini
#中添加插件列表:
plugin = eosio::chain_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::net_plugin
plugin = eosio::net_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
plugin = eosio::http_plugin
plugin = eosio::http_client_plugin
plugin = eosio::wallet_api_plugin
p2p-peer-address = p2p.prod.eosgravity.com:80
p2p-peer-address = eu-west-nl.eosamsterdam.net:9876
p2p-peer-address = p2p.mainnet.eosgermany.online:9876
p2p-peer-address = 54.38.250.15:19878
p2p-peer-address = p2p.genereos.io:9876
p2p-peer-address = mainnet.eospay.host:19876
p2p-peer-address = 130.211.59.178:9876
p2p-peer-address = 54.153.59.31:9999
p2p-peer-address = 94.130.250.22:9806  
p2p-peer-address = peer.main.alohaeos.com:9876
p2p-peer-address = peer.eosn.io:9876
p2p-peer-address = prod.mainnet.eos.cybex.io:9888
p2p-peer-address = p2p-1.eosnetwork.io:9876
p2p-peer-address = p.jeda.one:3322
p2p-peer-address = eosbattles.com:9877
p2p-peer-address = 34.226.76.22:9876
p2p-peer-address = mainnet.eosoasis.io:9876
p2p-peer-address = node.eosflare.io:1883
p2p-peer-address = p2p.eosio.cr:1976
p2p-peer-address = p2p.eosio.cr:5418
p2p-peer-address = eno.eosvan.io:19866
nodeos --genesis-json ~/genesis.json
//plugin = eosio::wallet_api_plugin 新版需要注释掉这个插件 
#查询命令
cleos get info
#查询某个区块命令
cleos get block 10

3 钱包生成

参考教程3:钱包生成中写的已经较为清楚。

# 创建钱包
cleos wallet create -n <想创建的钱包名称> --to-console
# 解锁命令如下:
cleos wallet unlock -n cowkeys --password 
password:xxxxxxxxxxx
# 创建公钥和私钥 (创建账户需要两个)
cleos create key --to-console
# 在https://eos-account-creator.com/success/ 导入两个公钥,创建账户之后
# 导入两个私钥到钱包
cleos wallet import -n cowkeys

你可能感兴趣的:(EOS笔记一:从安装到生成钱包)