当前位置:网站首页>Geth installation
Geth installation
2022-07-29 00:16:00 【LEVI_ one hundred and four】
Combined with various online articles , After more than ten hours of failure , During this period, the virtual machine can't be turned on , But finally successfully installed geth. Next I will show the problems and solutions I have encountered
Catalog
2. Installation of basic tools
5. Firewall and network time synchronization
7. All environment configurations
1. System environment
Windows10,Linux,Centos7.6
2. Installation of basic tools
Download and install git、vim、gcc-c++、ntp Components 、nodejs As well as add epel Third party installation source . These tools are described below :
The following are the things that need to be prepared for various methods on the network
yum install yum*: Install the tool kit
Cloning tool :yum install git
- git: Install the relevant components , Download and install all kinds of open source code and tools ;
- vim: Text editing tools , replace vi;
- gcc-c++:c/c++ Compiler tools , be used for golang Lower part c Library compilation and truffle Component compilation
- ntp: Network clock synchronization component ;Ethereum Of rpc The network needs time synchronization ;
- nodejs:ethereum The front-end development JavaScript Package management software
- epel: Third party Internet linux Install package source
Execute the following installation command to download and install the above 6 Something :
yum update -y && yum install git bzip2 gcc-c++ ntp epel-release nodejs -ysummary : It may take a little longer to download , But it's OK after downloading , There is no need to operate other things
3. install cmake
Smart contract compilation requires cmake
- wget https://cmake.org/files/v3.15/cmake-3.15.2.tar.gz
- tar -zxvf cmake-3.15.2.tar.gz
- mv cmake-3.15.2 /usr/local/
- cd /usr/local/cmake-3.15.2
- ./bootstrap
- gmake
- gmake install
Configure environment variables
- echo "export PATH=/usr/local/cmake-3.15.2/bin:$PATH" >> /etc/profile
- source /etc/profile
- cmake -version

summary : I install cmake It was still very smooth
4. install Golang
- wget https://storage.googleapis.com/golang/go1.10.2.linux-amd64.tar.gz
- tar -C /usr/local -zxzf go1.10.2.linux-amd64.tar.gz
- I can't install through the first two points go, And the lower version go It may not be compatible
- So I found the latest version on the Internet go:go1.18.3.linux-amd64.tar.gz
- Then install it in /usr/local
- echo "export GOROOT=/usr/local/go" >> /etc/profile
- echo "export PATH=/usr/local/go/bin:$PATH" >> /etc/profile
- source /etc/profile
Clone and compile go-ethereum
- cd /usr/local
- git clone https://github.com/ethereum/go-ethereum.git
- I have tried this many times , No way git clone cloned ( Only once , Network problems ?)

- therefore , I am here github Download directly from the warehouse , adopt Xftp7 to centos7.6
- GitHub - ethereum/go-ethereum: Official Go implementation of the Ethereum protocol

- Put this ZIP Download and unzip the file , Put it in /usr/local/, It's documents go-ethereum-master
- go-ethereum The file is so many attempts git clone Success comes at once ,go-ethereum-master and go-ethereum The documents inside are exactly the same

- cd go-ethereum/
- make all
- I can't succeed at this step , Many times , It takes the longest time , Encountered various problems , One is as follows :

- The reason for the failure :GitHub Warehouse ,go-ethereum-build in , No, env.sh The file ! If any , Change to , hold dos The order was changed to unix after , And it's going to work . because .sh It's a script , It will help us install , And this script is missing . Then the default is dos The order can't be in Linux perform , So it's going to be unix Talent
- therefore , I can download it directly on the Internet geth The latest version . Address :Downloads | Go Ethereum
- And then again /usr/local/Geth place , Unzip and run ok

- echo "export PATH=$PATH:/usr/local/go-ethereum/build/bin" >> /etc/profile
- source /etc/profile
- geth version verification
5. Firewall and network time synchronization
Turn on network time synchronization
- systemctl enable ntpd
- systemctl start ntpd
Turn on the firewall : Turn on the firewall , open Geth The use of 8087 and 30303 port
- systemctl start firewalld
- firewall-cmd --zone=public --add-port=8087/tcp --permanent
- firewall-cmd --zone=public --add-port=30303/tcp --permanent
6. Get into geth

Get into geth The file of is shown in the figure , At first, executing permissions is not 777, Need modification :chmod 777 geth. perform : Direct input geth. It's fine too :geth --datadir ./data. Will create a data Folder , Used to store our data . The execution is as follows :

7. All environment configurations

边栏推荐
- 双重for循环优化
- Linux之yum安装MySQL
- 1-8 basic use of props
- Detailed explanation of the usage of exists in MySQL
- Detailed principle explanation and verification results of digital clock based on FPGA
- MySQL installation and configuration tutorial (super detailed, nanny level)
- Network traffic monitoring tool iftop
- SQL实现将多行记录合并成一行
- ES6 operation tutorial
- Real time data warehouse: Didi's real-time data warehouse landing practice
猜你喜欢

Real time data warehouse: meituan's implementation of real-time data warehouse construction based on Flink

Servlet operation principle_ API details_ Advanced path of request response construction (servlet_2)

Have passed hcip and joined the company of your choice, and share the learning experience and experience of Huawei certification

CV instance segmentation model sketch (1)

[TA frost wolf _may- "hundred people plan"] art 2.2 model basis

Powercli VMware vCenter deploys conventional new VMS in batch through self built PXE server with one click

SQL implementation merges multiple rows of records into one row

Classification and determination method of Worthington stemxyme

Multi sensor fusion positioning (I) -- 3D laser odometer

After SAP Oracle replicates a new instance, the remote connection of the database reports an error ora-01031
随机推荐
【C】 Drink soda and find a single dog
Please briefly describe the respective characteristics of list, set and map type sets (briefly describe three different inheritance methods)
Multi sensor fusion positioning (I) -- 3D laser odometer
Leetcode60. 排列序列
The failure rate is as high as 80%. How to correctly complete the strategic planning of digital transformation?
Exchange 2013 SSL certificate installation document
1-5 类式组件
Detailed principle explanation and verification results of digital clock based on FPGA
MySql中的like和in走不走索引
【小程序项目开发 -- 京东商城】uni-app 商品分类页面(上)
【TA-霜狼_may-《百人计划》】美术2.2 模型基础
研发效能的道法术器
Okaleido ecological core equity Oka, all in fusion mining mode
[TA frost wolf _may- "hundred people plan"] art 2.2 model basis
【微服务】Nacos集群搭建以及加载文件配置
Js判断数据类型的4种⽅式
Sword finger offer 41. median in data flow
"Method not allowed", 405 problem analysis and solution
Compilation principle research study topic 2 -- recursive descent syntax analysis design principle and Implementation
centos7安装mysql8

