当前位置:计算机技术 - docker安装大疆上云api dji cloud api ubuntu20.04或22.04(有坑,没实现)


docker安装大疆上云api dji cloud api ubuntu20.04或22.04(有坑,没实现)
原创:netnorth 阅读次数:2525 日期:2023-05-03

先说坑,可能是没有连接上MySQL

按查看ubuntu22.04 20.04可有旧版docker并安装新版

https://docs.docker.com/engine/install/ubuntu/

Uninstall old versions

1、

 sudo apt-get remove docker docker-engine docker.io containerd runc


Install using the apt repository

Set up the repository

1、

 sudo apt-get update

 sudo apt-get install ca-certificates curl gnupg

2、

 sudo install -m 0755 -d /etc/apt/keyrings

 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

 sudo chmod a+r /etc/apt/keyrings/docker.gpg

3、

 echo

  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu

  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" |

  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null


Install Docker Engine

1、sudo apt-get update

2、sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin


https://docs.docker.com/compose/install/linux/

Install the Compose  Install using the repository  或者  apt-get install docker-compose

1、 sudo apt-get update

    sudo apt-get install docker-compose-plugin

2、Verify that Docker Compose

 docker compose version

Docker Compose version vN.N.N


Install Compose standalone 单机版

https://docs.docker.com/compose/install/standalone/

(以上并不完全成功,需各自摸索)

=====================================================================================================================


安装dji cloud_api

#sudo apt install unzip

wget https://terra-sz-hc1pro-cloudapi.oss-cn-shenzhen.aliyuncs.com/c0af9fe0d7eb4f35a8fe5b695e4d0b96/docker/cloud_api_sample_docker.zip

#sudo unzip cloud_api_sample_docker.zip

#sudo mv cloud_api_sample cloud_api

#sudo chmod -R 777 cloud_api (无权限就用)

#cd cloud_api

#sudo docker load < cloud_api_sample_docker_v1.5.0.tar 可以在修改 配置文件之后执行

Loaded image: dji/mysql:latest

Loaded image: emqx:4.4

Loaded image: redis:6.2

Loaded image: node:17.8-buster

Loaded image: nginx:stable

Loaded image: openjdk:11.0.14.1-jdk-buster

# sudo vim  source/backend_service/src/main/resources/application.yml 修改 mysql 3336  redis6389 root root mqtt1893 JavaServer 123456   124.223.140.79

mysql redis 127.0.0.1 mqtt 外网ip

#sudo vim source/nginx/front_page/src/api/http/config.ts 修改appid appkey app License (大疆开放平台申请)

APP ID xxxxxx

App Key xxxxxxxxxxxxxxxxxxx

App License xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

高德地图 https://lbs.amap.com 申请高德key

#sudo vi source/nginx/front_page/src/pages/page-web/index.vue 删除demo

#sudo apt install npm

#sudo npm install -g npm@9.6.7 ()

#sudo ./update_front.sh # 构建前端镜像

出现大量红色错误 nmp版本低了

#sudo ./update_backend.sh   # 构建后端镜像


#  sudo docker-compose up -d

----------------

docker-compose -f docker-compose.yml down


docker-compose -f docker-compose.yml down

==============

 free -g

docker images

docker ps -a docker logs dockernameorid

docker exec -it ebf9140982ef /bin/bash

docker ps -a

finde / -name cloud_api_sample

find / -name cloud*

vi  source/nginx/front_page/src/api/http/config.ts


 docker-compose -f docker-compose.yml down

docker ps -a

docker-compose up -d

docker ps -a

查询docker中的镜像  docker ps docker ps -a

查询MySQL的id docker exec -it cloud_api_mysql_1 bash docker exec -it 758c9754d010 bash 

mysql -hlocalhost -uroot -p (root)

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION; 远程访问

FLUSH PRIVILEGES;

docker start 容器名orID

================================================


netstat -tanlp docker ps -a

8084                 :::*                    LISTEN      1164/easydss

docker images

docker ps -a

docker cp cloud_api_mysql_1:/etc/nginx/nginx.conf ./

zzz登录页面默认地址:http://ip:8080/project ,此处“ip”需要替换为用户实际使用的ip地址。

zzz账户名:adminPC

zzz密码:adminPC


公司概况
华旅网络是一家致力于软件开发、网络设计的互联网公司...
公司业务:软件开发,网站设计,企业CI设计,旅游、美食、交友互动平台......
友情链接

华旅网络官网(Official Website): h.91city.com h.c.91city.com 282509570.c.91city.com
©2017 华旅网络 版权所有 苏ICP备12078118号