LoginSignup
15
12

More than 5 years have passed since last update.

centos7にgo-ethereumをインストールする

Last updated at Posted at 2016-06-09

centos7にgethをインストールする

golangのインストール

sudo yum install -y epel-release
sudo yum install -y golang gmp-devel git

gethのコンパイル

git clone https://github.com/ethereum/go-ethereum
cd go-ethereum
make geth
sudo cp build/bin/geth /usr/local/bin

初回起動

geth --fast

データディレクトリ

ls ~/.ethereum/

永続化

/etc/systemd/system/geth.service
[Unit]
Description=go-ethereum
After=syslog.target network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/geth --rpc --rpcaddr "localhost" --rpcport "8545" --rpcapi "eth,net,web3"
WorkingDirectory=/home/centos
KillMode=process
Restart=always
User=centos
Group=centos

[Install]
WantedBy=multi-user.target

起動・終了

sudo systemctl start geth
sudo systemctl stop geth
15
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12