wkrjwlt 2019-06-29
纯go实现的im即时通讯系统,各层可单独部署,之间通过rpc通讯,支持集群,github地址 https://github.com/Terry-Ye/im , 学习于goim, 总分三层,
以下Comet 层,Logic 层,Job层都可以灵活扩展机器
go get -u github.com/Terry-Ye/im mv $GOPATH/src/github.com/Terry-Ye/im $GOPATH/src/im cd $GOPATH/src/im go get ./...
golang.org 包拉不下来的情况,例
package golang.org/x/net/ipv4: unrecognized import path "golang.org/x/net/ipv4" (https fetch: Get https://golang.org/x/net/ipv4?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
从github 拉下来,再移动位置
git clone https://github.com/golang/net.git mkdir -p golang.org/x/ mv net $GOPATH/src/golang.org/x/
安装comet、logic、job模块
cd $GOPATH/src/im/comet go install cd ../logic/ go install cd ../job go install nohup $GOPATH/bin/logic -d $GOPATH/src/im/logic/ 2>&1 > /data/log/im/logic.log & nohup $GOPATH/bin/comet -d $GOPATH/src/im/comet/ 2>&1 > /data/log/im/comet.log & nohup $GOPATH/bin/job -d $GOPATH/src/im/job/ 2>&1 > /data/log/im/job.log &
聊天室:http://www.texixi.com:1999/