Geth开发环境搭建(Centos7)

目录

前提条件

1、安装Go

2、安装Git(暂时没用)

安装Geth 

下载安装Geth

1、下载Geth

2、解压

3、重命名目录名称

4、移动目录

配置Geth环境变量

1、修改配置文件/etc/profile

2、使/etc/profile配置文件生效

验证Geth安装是否成功


前提条件

1、安装Go

参见 Centos7 安装 Go_ling1998的博客-CSDN博客

2、安装Git(暂时没用)

参见 Centos7 安装 git_ling1998的博客-CSDN博客

安装Geth(版本1.10.16)

下载安装Geth

1、下载Geth

下载地址:https://geth.ethereum.org/downloads/

注:需要科学上网 

[root@localhost src]# wget https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.10.16-20356e57.tar.gz

2、解压

[root@localhost src]# tar -zxvf geth-alltools-linux-amd64-1.10.16-20356e57.tar.gz
geth-alltools-linux-amd64-1.10.16-20356e57/
geth-alltools-linux-amd64-1.10.16-20356e57/COPYING
geth-alltools-linux-amd64-1.10.16-20356e57/abigen
geth-alltools-linux-amd64-1.10.16-20356e57/bootnode
geth-alltools-linux-amd64-1.10.16-20356e57/evm
geth-alltools-linux-amd64-1.10.16-20356e57/geth
geth-alltools-linux-amd64-1.10.16-20356e57/puppeth
geth-alltools-linux-amd64-1.10.16-20356e57/rlpdump
geth-alltools-linux-amd64-1.10.16-20356e57/clef
tar: geth-alltools-linux-amd64-1.10.16-20356e57: implausibly old time stamp 1970-01-01 08:00:00

3、重命名目录名称

[root@localhost src]# mv geth-alltools-linux-amd64-1.10.16-20356e57 geth-alltools-1.10.16

4、移动目录

[root@localhost src]# mv geth-alltools-1.10.16 /usr/local/

配置Geth环境变量

1、修改配置文件/etc/profile

[root@localhost src]# vi /etc/profile

 在/etc/profile文件最后添加下面配置

#config geth path
export GETH_HOME=/usr/local/geth-alltools-1.10.16
export PATH=$PATH:$GETH_HOME

添加完成按Esc,输入:wq保存退出

2、使/etc/profile配置文件生效

[root@localhost src]# source /etc/profile

验证Geth安装是否成功

查看版本,出现如下信息证明安装成功。

[root@localhost src]# geth version
Geth
Version: 1.10.16-stable
Git Commit: 20356e57b119b4e70ce47665a71964434e15200d
Git Commit Date: 20220215
Architecture: amd64
Go Version: go1.17.5
Operating System: linux
GOPATH=/home/gopath
GOROOT=/usr/local/go

关于Geth私链搭建可参见:Geth-1.10.16 私链搭建_ling1998的博客-CSDN博客 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值