Git Product home page Git Product logo

kim's Introduction

KIM

King IM CLoud

简介

kim 是一个高性能分布式即时通信系统。

structure.png

环境准备

中间件安装

Kim依赖mysql、Consul和Redis。因此,在本地测试时需要准备相应环境。这里提供两种方式:

方式一: 通过docker-compose启动

docker-compose -f "docker-compose.yml" up -d --build

方式二: docker分别启动

docker run -itd --name kim_mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql

docker run \
    -d \
    -p 8500:8500 \
    -p 8600:8600/udp \
    --name=kim_consul \
    consul agent -server -ui -node=server-1 -bootstrap-expect=1 -client=0.0.0.0

docker run -itd --name kim_redis -p 6379:6379 redis

数据准备

  1. 进入Mysql,修改访问权限:
    1. docker exec -it kim_mysql /bin/sh
    2. mysql -uroot -p123456
    3. GRANT ALL ON . TO 'root'@'%';
    4. flush privileges;
  2. 创建数据库
    1. create database kim_base default character set utf8mb4 collate utf8mb4_unicode_ci;
    2. create database kim_message default character set utf8mb4 collate utf8mb4_unicode_ci;

启动服务

首先进入services中,分别启动三个服务:

go run main.go gateway
go run main.go server
go run main.go royal

或者,通过docker-compose启动:

docker-compose -f "docker-compose-kim.yml" up -d --build

访问Consul,可以查看服务启动状态:

http://localhost:8500/ui

kim's People

Contributors

klintcheng avatar linij avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.