温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

linux如何安装go语言及ethereum

发布时间:2021-10-22 11:35:22 来源:亿速云 阅读:221 作者:柒染 栏目:互联网科技

今天就跟大家聊聊有关linux如何安装go语言及ethereum,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

安装go语言

# cd /usr/local/go

# wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz

# tar -xvf go1.10.1.linux-amd64.tar.gz

# sudo vi /etc/profile

export GO_HOME="/usr/local/go/go"

export JAVA_HOME="/usr/local/jdk1.8.0_144"

export CATALINA_HOME="/usr/local/apache-tomcat-9.0.0.M22"

export PATH=$PATH:$GO_HOME/bin:$JAVA_HOME/bin:$CATALINA_HOME/bin

export CLASSPATH=$JAVA_HOME/jre/lib/tools.jar:$JAVA_HOME/bin/tools.jar:$JAVA_HOME/common/lib/servlet-api.jar

# source /etc/profile

# go version

go version go1.10.1 linux/amd64

然后安装ethereum# cd /usr/local/ethereum

# wget https://github.com/ethereum/go-ethereum/archive/v1.8.3.tar.gz

# tar -xvf v1.8.3.tar.gz

# cd go-ethereum-1.8.3/

# make geth

运行geth

$ nohup /usr/local/ethereum/go-ethereum-1.8.3/build/bin/geth --cache 256 --identity "itari" --gcmode archive --datadir /usr/local/ethereum/private/data0 --networkid 898 --port 30303 --rpc --rpcaddr 0.0.0.0 --rpcport 8545 --rpcapi "db,web3,eth,personal,miner,net,txpool" --rpccorsdomain "*" &

--cache 256:这个参数设置内存大小,单位M,默认128,如果设置成1024,一会就挂了

交互命令

$ /usr/local/ethereum/go-ethereum-1.8.3/build/bin/geth attach ipc:/usr/local/ethereum/private/data0/geth.ipc

备注:香港服务器装好后必须指定路径/usr/local/ethereum/go-ethereum-1.8.3/build/bin/geth

看完上述内容,你们对linux如何安装go语言及ethereum有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI