Prerequisite: dnf install golang
- Create user
gethwithuseradd - As user
gethfast sync the blockchain,geth --fast --cache 1024 - Manually run
geth --rpcas user geth and watch to see that the blockchain continues to sync properly - Install the
geth.servicefile (also in this gist) in/usr/lib/systemd/system/ - Make a symlink from
/etc/systemd/system/multi-user.target.wants/geth.serviceto/usr/lib/systemd/system/geth.service systemctl enable gethfollowed bysystemctl start geth- Over and over and over again, until
gethruns with no permission-denied log messages, repeat this cycle:
grep geth /var/log/audit/audit.log | audit2allow -M local-geth
semodule -i local-geth.pp
systemctl start geth
systemctl status geth.service
journalctl --follow -u geth
semodule -r local-geth
...and around again
-
/home/geth/go-ethereumis a clone of the git archive, from which I rebuild from source to do upgrades. Remember to fetch and checkout the latest release version, don't run development snapshots. Thegethbinary itself shows up in/home/geth/go-ethereum/build/bin, after everything is built withmake all. -
I had trouble getting
gethto shutdown properly onsystemctl stop geth. The signal needed to be madeSIGINTrather thanSIGTERMto prevent an immediate shutdown without closing the datavase. I had to pass the--ipcdisableflag togethbecause the file/home/geth/.ethereum/geth.ipcwas not properly cleaned up. -
geth 1.8.0has tighter security now for named domains, thus--rpcvhosts=ethjsonrpc.mchange.com, which is new. -
The final (I hope) version of the SELinux policy file generated by
audit2allowis included in this gist aslocal-geth.te
The
SIGTERMworks nicely with geth 1.10.3 now.