Created
January 13, 2018 16:45
-
-
Save tlhakhan/c980c3c526d23190bed353110772f906 to your computer and use it in GitHub Desktop.
godoc web service on CentOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y epel; yum makecache | |
yum install -y golang-godoc golang-docs | |
cat < 'eof' > /etc/systemd/system/godoc.service | |
[Unit] | |
Description = golang godoc web server | |
[Service] | |
ExecStart=/usr/bin/godoc -http :8080 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target | |
'eof' | |
systemctl enable godoc | |
systemctl status godoc | |
systemctl start godoc | |
systemctl status godoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment