Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 视频教程 | 打赏(Donations) | About
知乎专栏多维度架构微信号 netkiller-ebook | QQ群:128659835 请注明“读者”

第 4 章 EOS 安装

目录

4.1. CentOS
4.2. Mac
4.3. Docker 开发环境
4.4. 主网
4.5. 启动 EOS 节点
4.5.1. EOS 本地网
4.5.1.1. 单节点私链
4.5.1.2. 单机多节点
4.5.1.3. 多机多节点
4.5.1.3.1. 节点一
4.5.1.3.2. 节点二
4.5.1.3.3. 节点三
4.5.1.3.4. 进入 Node 1 创建钱包和部署合约
4.5.2. 测试网
4.5.2.1. Public Testnet Endpoints(公共测试网络的接入点)
4.5.2.1.1. testnet1.eos.io
4.5.2.1.2. http://testnet.eoswtz.com
4.5.2.2. 本地连接到测试网
4.5.2.3. EOS (testnet) Explorer (Dawn 2.0)
4.5.2.4. EOS Jungle Testnet Monitor (Dawn 4.0)
4.5.3. 主网
4.5.3.1. 创世区块
4.5.3.2. eosnodes.privex.io
4.5.3.2.1. 创世区块
4.5.3.2.2. 主网超级节点
4.5.3.3. mainnet.genereos.io
4.5.3.4. mainnet.eoswz.com
4.6. nodeos 命令
4.6.1.
4.6.1.1. --contracts-console
4.6.2. config.ini 配置文件
4.6.2.1. 插件配置

4.1. CentOS

		 
yum install -y centos-release-scl
yum install -y devtoolset-7
yum install -y git

yum install -y gcc gcc-c++ make patch cmake automake autoconf \
libtool ocaml doxygen graphviz-devel libicu-devel bzip2-devel gmp-devel python-devel gettext-devel


cd /usr/local/src/
git clone https://github.com/EOSIO/eos --recursive
cd eos/
# git submodule update --init --recursive

./eosio_build.sh
		
		

		
[root@iZj6c7cj14ulhfndlmeicbZ eos]# ./eosio_build.sh

	Beginning build version: 1.2
	Wed May  2 03:15:34 UTC 2018
	User: root
	git head id: f537bc50b21a7807ff0ee3af83d8f560ce09afa5
	Current branch: * master

	ARCHITECTURE: Linux

	OS name: CentOS Linux
	OS Version: 7
	CPU speed: 2494Mhz
	CPU cores: 4
	Physical Memory: 7822 Mgb
	Disk install: /dev/vda1
	Disk space total: 492G
	Disk space available: 138G

	Checking Yum installation
	Yum installation found at /usr/bin/yum.

	Checking installation of Centos Software Collections Repository.

	The Centos Software Collections Repository, devtoolset-7 and Python3 are required to install EOSIO.
	Do you wish to install and enable this repository, devtoolset-7 and Python3 packages?
1) Yes
2) No
#? 1
		
		

输入 1 回车继续

		
Complete!

	YUM repository successfully updated.

	Checking YUM for installed dependencies.

	Package git found.
	Package autoconf found.
	Package automake found.
	Package libtool  NOT  found.
	Package ocaml.x86_64  NOT  found.
	Package doxygen  NOT  found.
	Package graphviz-devel.x86_64  NOT  found.
	Package libicu-devel.x86_64  NOT  found.
	Package bzip2-devel.x86_64  NOT  found.
	Package openssl-devel.x86_64  NOT  found.
	Package gmp-devel.x86_64  NOT  found.
	Package python-devel.x86_64  NOT  found.
	Package gettext-devel.x86_64  NOT  found.

	The following dependencies are required to install EOSIO.

	1. libtool
	2. ocaml.x86_64
	3. doxygen
	4. graphviz-devel.x86_64
	5. libicu-devel.x86_64
	6. bzip2-devel.x86_64
	7. openssl-devel.x86_64
	8. gmp-devel.x86_64
	9. python-devel.x86_64
	10. gettext-devel.x86_64


	Do you wish to install these dependencies?
1) Yes
2) No
#?
		
		

输入 1 回车继续

			

	 _______  _______  _______ _________ _______
	(  ____ \(  ___  )(  ____ \\__   __/(  ___  )
	| (    \/| (   ) || (    \/   ) (   | (   ) |
	| (__    | |   | || (_____    | |   | |   | |
	|  __)   | |   | |(_____  )   | |   | |   | |
	| (      | |   | |      ) |   | |   | |   | |
	| (____/\| (___) |/\____) |___) (___| (___) |
	(_______/(_______)\_______)\_______/(_______)

	EOSIO has been successfully built. 01:20:59

	To verify your installation run the following commands:

	/root/opt/mongodb/bin/mongod -f /root/opt/mongodb/mongod.conf &
	source /opt/rh/python33/enable
	export PATH=${HOME}/opt/mongodb/bin:$PATH
	cd /usr/local/src/eos/build; make test

	For more information:
	EOSIO website: https://eos.io
	EOSIO Telegram channel @ https://t.me/EOSProject
	EOSIO resources: https://eos.io/resources/
	EOSIO Stack Exchange: https://eosio.stackexchange.com
	EOSIO wiki: https://github.com/EOSIO/eos/wiki
			
			
		

这里跳过 make test 直接安装

		
cd build
make install
		
		

默认配置文件 cofnig.ini

		
[root@netkiller config]# grep -v "^#" config.ini | grep -v "^$"
bnet-endpoint = 0.0.0.0:4321
bnet-follow-irreversible = 0
bnet-no-trx = false
bnet-peer-log-format = ["${_name}" ${_ip}:${_port}]
blocks-dir = "blocks"
chain-state-db-size-mb = 1024
reversible-blocks-db-size-mb = 340
contracts-console = false
https-client-validate-peers = 1
http-server-address = 127.0.0.1:8888
access-control-allow-credentials = false
max-body-size = 1048576
verbose-http-errors = false
p2p-listen-endpoint = 0.0.0.0:9876
p2p-max-nodes-per-host = 1
agent-name = "EOS Test Agent"
allowed-connection = any
max-clients = 25
connection-cleanup-period = 30
network-version-match = 0
sync-fetch-span = 100
max-implicit-request = 1500
use-socket-read-watermark = 0
peer-log-format = ["${_name}" ${_ip}:${_port}]
enable-stale-production = false
pause-on-startup = false
max-transaction-time = 30
max-irreversible-block-age = -1
signature-provider = EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
keosd-provider-timeout = 5
txn-reference-block-lag = 0
wallet-dir = "."
unlock-timeout = 900