Skip to content

Instantly share code, notes, and snippets.

@tlhakhan
Created January 13, 2018 16:45
Show Gist options
  • Save tlhakhan/c980c3c526d23190bed353110772f906 to your computer and use it in GitHub Desktop.
Save tlhakhan/c980c3c526d23190bed353110772f906 to your computer and use it in GitHub Desktop.
godoc web service on CentOS
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