###1、安装必备环境插件 #1-5 公有链 +6-10 私有链
```
yum update -y && yum install git wget bzip2 vim gcc-c++ ntp epel-release nodejs cmake -y
yum install -y curl git golang nodejs gcc-c++
```
###2、安装go语言
```
wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
echo 'export GOROOT=/usr/local/go' >> /etc/bashrc
echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bashrc
echo 'export GOPATH=/root/go' >> /etc/bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> /etc/bashrc
source /etc/bashrc
```
###3、验证go语言安装成功
```
[root@jubeiTest root]# go version
go version go1.10 linux/amd64
```
###4、安装geth客户端 '我的路径'=/mnt/
```
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum
make all
echo 'export PATH=$PATH:/’你的路径’/go-ethereum/build/bin' >> /etc/bashrc
source /etc/bashrc
```
###5、验证geth
```
[root@jubeiTest go-ethereum]# geth version
Geth
Version: 1.8.18-unstable
Git Commit: 1ff152f3a43e4adf030ac61eb5d8da345554fc5a
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10
Operating System: linux
GOPATH=/root/go
GOROOT=/usr/local/go
```
###6、智能合约
```
cd ~
wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
tar xvf cmake-3.9.2.tar.gz && cd cmake-3.9.2
./configure && make && make install
pwd
/home/ddp/cmake-3.9.2
cd /mnt/
mkdir geth_data
touch start.sh
chmod 755 start.sh
vim start.sh
(nohup geth --syncmode "fast" --cache=512 --datadir "/mnt/geth_data/data0" --rpc --rpcapi db,net,eth,web3,personal --rpcaddr 0.0.0.0 --rpccorsdomain "*" 2>>geth_log &)
sh start.sh
cd geth_data
geth attach ./geth.ipc
eth.syncing
```
同步节点
```
>eth.syncing
{
currentBlock: 164096,
highestBlock: 6841125,
knownStates: 318087,
pulledStates: 307252,
startingBlock: 0
}
```
###7、创建创世文件(genesis.json)
```
{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"alloc" : {},
"coinbase" : "0x0000000000000000000000000000000000000000",
"difficulty" : "0x20000",
"extraData" : "",
"gasLimit" : "0x2fefd8",
"nonce" : "0x0000000000001993",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}
```
###8、初始化创世文件
```
$ geth --datadir ‘你的路径’ init ‘你的路径’/genesis.json
```
###9、创建start.sh脚本
```
(nohup geth --syncmode "fast" --cache=512 --datadir "/mnt/geth_data/data0" --rpc --rpcapi db,net,eth,web3,personal --rpcaddr 0.0.0.0 --rpccorsdomain "*" 2>>geth_log &)
```
###10、进入控制台
```
$cd ‘你的路径’
$ geth attach ./geth.ipc
同步命令eth.syncing
```
history命令
````
yum update -y && yum install git wget bzip2 vim gcc-c++ ntp epel-release nodejs cmake -y
wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
echo 'export GOROOT=/usr/local/go' >> /etc/bashrc
echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/bashrc
echo 'export GOPATH=/root/go' >> /etc/bashrc
echo 'export PATH=$PATH:$GOPATH/bin' >> /etc/bashrc
source /etc/bashrc
go version
cd /mnt/
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum/
make all
echo 'export PATH=$PATH:/mnt/go-ethereum/build/bin' >> /etc/bashrc
source /etc/bashrc
cd /mnt/
mkdir
mkdir geth_data
cd geth_data/
- Linux
- linux常用命令
- awk
- cp
- scp
- mv
- screen工具
- rsync
- Linux设置静态IP
- vim常用
- ssh免密登录
- linux挂载磁盘和开机自动挂载
- 文件的时间戳
- 重定向
- 防火墙
- Vultr 服务器利用快照更换IP
- ss
- node-yarn
- ES安装向导
- lnmp/lamp
- windows安装mysql
- windows安装nginx
- Let'sEncrypt 免费通配符/泛域名SSL证书
- 开机自动挂载硬盘
- 普通用户提权
- ELK日志分析系统
- Docker
- docker
- centos7安装docker
- Centos7安装redis
- CentOS 7 使用Docker搭建Nginx
- CentOS 7 使用Docker搭建Jenkins
- CentOS 7 使用Docker搭建Zookeeper
- CentOS 7 使用Docker搭建Tomcat
- CentOS 7 使用Docker搭建Mysql
- CentOS 7 使用Docker搭建PHP环境
- 使用docker搭建Swagger
- docker阿里云私有仓库
- docker zookeeper集群
- docker部署ES
- docker之java容器运行外置springboot-jar
- docker部署owncloud云盘
- ETCD
- centos7部署etcd节点
- Dockerfile
- Docker-compose
- gitlab.yml
- db.yml
- 安装docker-compose
- gitlab-docker-compose.yml
- nginx-docker-compose.yml
- Mysql
- mysql开启远程访问及相关权限控制
- mysql授权
- mysql快速导出导入大数据
- mysql单机备份
- binlog日志
- shell
- 经典案例
- 俄罗斯方块游戏
- 系统初始化
- 服务器监控
- go基础环境
- shell.监控日志.elk
- shell.检查各服务脚本
- shell.删除文件脚本
- shell.守护进程
- shell.数据库
- shell.Ansible
- shell.dev
- shell.ftp环境
- shell.docker环境
- shell.k8s环境
- k8s.二进制安装
- K8s.一主多从
- k8s.三主两从高可用
- k8s.检查服务与配置
- k8s.jenkins
- k8s.gitlab
- go-install.sh
- jenkins-install.sh
- node-install.sh
- redis-install.sh
- zabbix-install.sh
- zabbix-dockerfile.sh
- nginx-install.sh
- shell变量
- 用户自定义变量
- 环境变量
- shell特殊变量
- shell条件判断
- 流程控制
- shell运算符
- Shell _printf
- shell_test
- shell函数
- 输出重定向
- 网络相关
- 安全相关
- 堡垒机部署
- 区块链威胁情报共享平台
- 签名与验签
- 浅谈区块链
- 智能合约
- 黄金币GTF智能合约
- 节点
- 以太坊公链私链geth同步
- 比特节点同步
- BTC节点错误解决方法
- eth硬分叉
- omni钱包节点搭建
- 架构
- K8s
- 搭建k8s集群完整篇
- 二进制部署k8s
- Devops
- git
- Jenkins
- svn
- 禅道
- CI/CD
- docker+jenkins+golang持续集成持续交付(CI/CD)
- 项目部署
- config.env
- docker-compose.yml
- Dockerfile模板
- .dockerignore
- run.sh
- nginx.conf模板
- 跨域
- jenkins配置
- 测试
- Python