资讯 小学 初中 高中 语言 会计职称 学历提升 法考 计算机考试 医护考试 建工考试 教育百科
栏目分类:
子分类:
返回
空麓网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
空麓网 > 计算机考试 > 系统运维 > 运维 > Linux

golang开发试水 - 开源工业互联网mainflux的部署和运行

Linux 更新时间: 发布时间: 计算机考试归档 最新发布

golang开发试水 - 开源工业互联网mainflux的部署和运行

前言

mainflux是一款优秀的golang语言开发的开源工业互联网平台软件。这里讲述在该系统软件在ubuntu18.04系统下面部署和运行的过程。

一、准备工作 1)源代码下载

git clone https://github.com/mainflux/mainflux.git

2)docker安装

sudo apt-get install docker-io

3)docker-compose安装

下载docker-compose

curl -SL https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose

设置环境变量,将下面一行加入到root目录下下面的.bashrc文件末尾。

export PATH=$PATH:~/.docker/cli-plugins

二、运行mainflux

进入mainflux目录执行make run命令,出现下面的一个错误。

root@ubuntu:/home/shane/mainflux# make run
docker-compose -f docker/docker-compose.yml up
[+] Running 0/18
 ⠹ nats Pulling                                                                     0.2s
 ⠹ auth-redis Pulling                                                           0.2s
 ⠹ coap-adapter Pulling                                                             0.2s
 ⠹ mqtt-adapter Pulling                                                             0.2s
 ⠹ http-adapter Pulling                                                             0.2s
 ⠹ keto-migrate Pulling                                                             0.2s
 ⠹ users Pulling                                                                    0.2s
 ⠹ auth Pulling                                                                     0.1s
 ⠹ es-redis Pulling                                                                 0.1s
 ⠹ jaeger Pulling                                                                   0.1s
 ⠹ vernemq Pulling                                                                  0.1s
 ⠹ things-db Pulling                                                                0.1s
 ⠹ keto-db Pulling                                                                  0.1s
 ⠹ auth-db Pulling                                                                  0.1s
 ⠹ users-db Pulling                                                                 0.1s
 ⠙ keto Pulling                                                                     0.1s
 ⠙ things Pulling                                                                   0.1s
 ⠋ nginx Pulling                                                                    0.1s
error getting credentials - err: exit status 1, out: `The connection is closed`

删除golang-docker-credential-helpers之后,问题修复。

sudo apt-get remove golang-docker-credential-helpers

三、mainflux运行状态

重新运行make run之后,系统进入正常运转状态。

mainflux-auth-db       | fixing permissions on existing directory /var/lib/postgresql/data ... ok
mainflux-auth-db       | creating subdirectories ... ok
mainflux-auth-db       | selecting dynamic shared memory implementation ... posix
mainflux-auth-db       | selecting default max_connections ... 100
mainflux-users-db      | The files belonging to this database system will be owned by user "postgres".
mainflux-users-db      | This user must also own the server process.
mainflux-users-db      |
mainflux-users-db      | The database cluster will be initialized with locale "en_US.utf8".
mainflux-users-db      | The default database encoding has accordingly been set to "UTF8".
mainflux-users-db      | The default text search configuration will be set to "english".
mainflux-users-db      |
mainflux-users-db      | Data page checksums are disabled.
mainflux-users-db      |
mainflux-users-db      | fixing permissions on existing directory /var/lib/postgresql/data ... ok
mainflux-users-db      | creating subdirectories ... ok
mainflux-users-db      | selecting dynamic shared memory implementation ... posix

后记

至此mainflux的系统已经正常部署和运行起来了,然而golang开发才刚刚开始。

转载请注明:文章转载自 http://www.konglu.com/
本文地址:http://www.konglu.com/it/851187.html
免责声明:

我们致力于保护作者版权,注重分享,被刊用文章【golang开发试水 - 开源工业互联网mainflux的部署和运行】因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理,本文部分文字与图片资源来自于网络,转载此文是出于传递更多信息之目的,若有来源标注错误或侵犯了您的合法权益,请立即通知我们,情况属实,我们会第一时间予以删除,并同时向您表示歉意,谢谢!

我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2023 成都空麓科技有限公司

ICP备案号:蜀ICP备2023000828号-2