Server hardware indicator: 32g 16 cores
Install go compile environment
Version requirements: Support module, higher than v1.11 Reference link: https://golang.org/doc/install
Download the im_service code
git clone https://github.com/GoBelieveIO/im_service.git
Compilation
cd im_service
mkdir bin
make install
Executable program in bin directory
Install mysql database, redis, and import db.sql
For configuration items, please refer to ims.cfg.sample, imr.cfg.sample, im.cfg.sample.
Start the program
Create the im&ims message storage path configured in the configuration file
mkdir /tmp/im
mkdir /tmp/impending
Create a log file path
mkdir /data/logs/ims
mkdir /data/logs/imr
mkdir /data/logs/im
Start the im service
pushd `dirname $0` > /dev/null
BASEDIR=`pwd`
nohup $BASEDIR/ims ims.cfg >/data/logs/ims/ims.err 2>&1 &
nohup $BASEDIR/imr imr.cfg >/data/logs/imr/imr.err 2>&1 &
nohup $BASEDIR/im im.cfg >/data/logs/im/im.err 2>&1 &
连接im服务器token存储在redis的hash对象中,脱离API服务器测试时,可以手工生成。
$token就是客户端需要获得的, 用来连接im服务器的认证信息。
key:access_token_$token
field:
user_id:用户id
app_id:应用id
https://developer.gobelieve.io/
https://goubli.mobi/