linux节点搭建,LINUX搭建ETH节点

### 安装以太坊

https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu

采取ppa安装

sudo apt-get install software-properties-common

sudo add-apt-repository -y ppa:ethereum/ethereum

sudo apt-get update

sudo apt-get install ethereum

### 启动以太坊

```

geth --rpc --rpcaddr "0.0.0.0" --rpcapi "db,eth,net,web3,personal,admin,miner" --rpcport "18545" --rpccorsdomain "0.0.0.0" conlose

```

### 以太雾启动

windows

```

getf.exe --fast --datadir "./" --rpc --rpcaddr "0.0.0.0" --rpccorsdomain "*" --rpcapi "admin,eth,net,personal,db,web3" --maxpeers 100 --cache 512 console

```

linux版

```

./getf --fast --datadir "./" --rpc --rpcaddr "0.0.0.0" --rpccorsdomain "47.74.180.165","47.88.229.195","47.74.156.17","47.88.220.71","161.117.3.199" --rpcport 18545 --rpcapi "personal,db,eth,net,web3" --maxpeers 100 --cache 1024 console

```

### 命令解释

rpcapi

-- 指定客户端启动的命令

-- fast

-- datadir

-- rpcaddr

-- rpccorsdomain

指定ip白名单 多个ip 用,分割

### dev模式启动

```

./geth --datadir /feng/data-test --rpc --rpcapi "db,eth,net,web3,miner,personal" -dev

```

正式网络本地geth启动

```

geth --rpc --rpcaddr "0.0.0.0" --datadir /feng/ethpublic/ --rpcapi "db,eth,net,web3,personal,admin,miner" --rpcport "18545" --rpccorsdomain "0.0.0.0" conlose

geth attach /feng/ethpublic/geth.ipc

```

测试网络本地geth启动

```

geth --rpc --rpcaddr "0.0.0.0" --testnet --datadir /feng/testnet/ --rpcapi "db,eth,net,web3,personal,admin,miner" --rpcport "28545" --rpccorsdomain "0.0.0.0" conlose

geth attach /feng/testnet/geth.ipc

```

### 启动脚本

```

nohup ./geth --datadir ./mainnet --rpc --rpcaddr 0.0.0.0 --rpcport 50505 --rpcapi "web3,eth,net,personal,db,admin" --rpccorsdomain * >./geth.log &2>1 &

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值