工具安装
https://studygolang.com/dl下载最新版本。1
2
3
4
5
6
7
8
9
10
11
12yum install epel-release
yum update
yum install golang
sudo tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
ls /usr/local/
bin/ etc/ games/ go/ include/ lib/ man@ sbin/ share/ src/
sudo vim /etc/profile
# 末尾添加
export PATH=$PATH:/usr/local/go/bin
source /etc/profile
go version
项目实战
jupiter
https://jupiter.douyu.com/jupiter/
chat
https://github.com/tinode/chat1
2
3
4
5
6
7
8
9
10
11
12# The steps above install Tinode binaries at $GOPATH/bin/, sorces and supporting files are located at $GOPATH/pkg/mod/github.com/tinode/chat@vX.XX.X/ where X.XX.X is the version you installed, such as 0.19.1.
go install -tags mysql github.com/tinode/chat/server@latest
# Open tinode.conf (located at $GOPATH/pkg/mod/github.com/tinode/chat@vX.XX.X/server/).
"mysql": {
"dsn": "root@tcp(localhost)/tinode?parseTime=true",
"database": "tinode"
},
"store_config": {
...
"use_adapter": "mysql",
...
},