当前位置:网站首页>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

边栏推荐
- Leetcode60. permutation sequence
- 双重for循环优化
- SQL implementation merges multiple rows of records into one row
- DevOps在物联网解决方案中的应用
- Exchange 2013 SSL certificate installation document
- 【MySQL 8】Generated Invisible Primary Keys(GIPK)
- 1-5 类式组件
- Everything you have learned will come in handy at some point in your life (turn)
- Do you know any formal part-time platforms?
- ISO 13400(DoIP)标准解读
猜你喜欢

Detailed explanation of 9 common reasons for MySQL index failure

【TA-霜狼_may-《百人计划》】美术2.2 模型基础

Centos7 install mysql8

Detailed principle explanation and verification results of digital clock based on FPGA

DevOps在物联网解决方案中的应用

“Method Not Allowed“,405问题分析及解决

【C】atoi和offsetof的介绍和模拟实现

[TA frost wolf \u may - "hundred people plan"] Figure 3.6 texture compression - inclusion slimming

Application of Devops in Internet of things solutions

基于 FPGA 实现数字时钟详细原理讲解及验证结果
随机推荐
JS advanced ES6 ~ es13 new features
centos7安装mysql8
1-7 solve the problem of this pointing of methods in classes
Applet editor rich text editing and rich text parsing
实时数仓:美团基于Flink的实时数仓建设实施
VMware VCSA 7.0 Install
Leetcode63. Different paths II
Summary of wrong questions of software designers
1-6 state and binding events
双重for循环优化
Data warehouse: Doris' application practice in meituan
curl (7) Failed connect to localhost8080; Connection refused
Detailed explanation of 9 common reasons for MySQL index failure
EN 12101-8:2011 smoke dampers for smoke and heat control systems - CE certification
Network traffic monitoring tool iftop
EN 1935 building hardware. Single axis hinge - CE certification
【TA-霜狼_may-《百人计划》】图形3.6 纹理压缩——包体瘦身术
Leetcode59. Spiral matrix II
Install MySQL using Yum for Linux
PHP poster QR code synthesis

