3 Star 9 Fork 10

wenxuanxuan / C++微服务通讯框架基础实现

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Unlicense

XMS 微服务系统包含 API 网关,日志服务,配置服务,注册服务, 通信组件 SDK,数据库读写 SDK。 除了 SDK 类的模块其他各模块应具备进行独立集群部署的能力。 XMS 系统提供 C/S 的系统管理界面,进行配置管理、服务状态监控、日志查询功能。

Windows编译环境准备

安装VS2017社区版本和QT5.9版本

Linux编译环境准备

ubuntu 18.04.02 x64

公共的工具

apt-get install perl g++ make automake libtool unzip git

依赖库编译安装

zlib(protobuf,libevent依赖)(压缩)

tar -xvf zlib-1.2.11.tar.gz
cd zlib-1.2.11/
./configure
make -j32
make install
# 安装在 /usr/local/include/ /usr/local/lib 目录下

openssl (libevent依赖)(安全加密)

tar -xvf openssl-1.1.1.tar.gz
cd openssl-1.1.1/
./config
make -j32
make install
# openssl 命令行 /usr/local/bin
#配置安装在 /usr/local/ssl 
#头文件/usr/local/include/openssl
#so库文件/usr/local/lib

protobuf(通信协议)

unzip protobuf-all-3.8.0.zip
cd protobuf-3.8.0/
./configure
make -j32
make install
#安装在 /usr/local/include/google/protobuf 
# protoc /usr/local/bin
# so库文件 /usr/local/lib

libevent (网络通信)

unzip libevent-master.zip
./autogen.sh
./configure
make -j32
make install
#安装在 /usr/local/lib /usr/local/include

XMS 系统安装

安装数据库服务器(Linux)

安装数据库客户端库

apt-get install libmysqlclient-dev

安装数据库服务端

sudo apt-get install mysql-server

配置用户名密码

/etc/mysql/debian.cnf文件,在这个文件中有系统默认给我们分配的用户名和密码
mysql -u debian-sys-maint -p 
set password for 'root'@'localhost' = password('123456')

LXMysql 库安装

apt-get install libmysqlclient-dev
cd /root/xms/src/LXMysql
make -j32
make install
# 安装在 /usr/lib/libLXMysql.so

XPlatform通信库安装

cd ../xplatform
# 生成proto对应的c++代码
make proto  
make -j32
make install
# 安装到 /usr/lib/libxcom.so

XRC注册中心安装

依赖XPlatform,并且会连接XLOG日志中心 注册中心服务端安装 cd ../register_server make -j32 make install

注册中心客户端

cd ../register_client
make -j32
make install

XLOG日志中心安装

#依赖XPlatform,LXMysql register_client 会连接XRC注册微服务
cd ../xlog/
make -j32
make install

配置中心微服务

cd ../config_server
make -j32
make install

配置中心客户端

cd ../config_client
make -j32
make install

XAUTH 鉴权中心安装

# 依赖LXMysql xplatform register_client 
# 通过register_client 连接XRC注册微服务
# 通过 config_client 获取配置
cd ../xauth
# 编译xauth微服务
make -j32  
# 编译xauth客户端
make libxauth.so
make install

XAG网关安装

# 依赖xplatform register_client config_client
# 通过register_client获取全部可用微服务列表
# 通过 config_client 获取网关配置
make -j32
make install
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to <http://unlicense.org>

简介

暂无描述 展开 收起
C++
Unlicense
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/wenxuanxuan/CPP_microservice.git
git@gitee.com:wenxuanxuan/CPP_microservice.git
wenxuanxuan
CPP_microservice
C++微服务通讯框架基础实现
master

搜索帮助

14c37bed 8189591 565d56ea 8189591