「亲测」搭建基于以太坊go-ethereum的私有链
admin
2023-07-26 20:20:13
0
一、基础环境:

1、购买两台服务器一周使用期

2、选择系统Ubuntu 16-18 我选64位、带宽1M 2CPU 经费有限 仅需验证

3、npm、nodejs 安装

购买测试服务器

sudo apt-get install software-properties-commonsudo add-apt-repository -y ppa:ethereum/ethereumsudo add-apt-repository -y ppa:ethereum/ethereum-devsudo apt-get updatesudo apt-get install ethereum

SSH 进入Ubuntu 18 服务器1


部署后:启动配置
geth --datadir mydata --networkid 8888 --rpc --rpccorsdomain "*" --nodiscover --port 30303 --allow-insecure-unlock --rpcport 8545 console




启动 私有链节点

miner.start() 

启动挖矿 等待10分钟 挖矿成功


查询账号
eth.accounts




我创建过两个账号


进入控制台 创建新账户
personal.newAccount("123456") #括号里面 设置密码




创建新账户


查询挖矿后的创世币
eth.getBalance("0xc49589e8051cf5f1a0dae6b067d6ed714168db74")




相关内容