使用docker安装itop

使用docker安装itop

 

链接:

https://github.com/vbkunin/itop-docker/blob/master/README.md

 

1,系统:centos7,

#关闭防火墙,selinux

安装docker服务,启动

#systemctl status docker

#systemctl start docker

#docker image ls    查看docker镜像
#docker container ls  查看docker容器

#docker ps  查看docker容器

#docker ps -a查看所有容器记录(包括未运行的容器),并查看那些容器是使用了这个要删除的镜像:

#docker rm 容器ID   删除容器
#docker rmi 镜像ID   删除镜像

2,启动itop的docker 

#docker run -d -p 80:80 --name=my-itop -v /itop/itop-extensions:/var/www/html/extensions vbkunin/itop:2.7.0-beta

 

#docker ps

#docker  start   my-itop  启动 my-itop的docker

#docker exec -it f6a41ffe526c(容器ID) /bin/bash   进入容器的交互环境

登录ITOP web页面,http://itop-IP/

 

3,copy文件进docker

# docker cp iTopDataModelToolkit-2.3.zip cc5021e676b1:/var/www/html/

#docker ps
#docker exec -it cc5021e676b1 /bin/bash  进入docker

#cd /var/www/html/
#unzip iTopDataModelToolkit-2.3.zip
登录toolkit链接:http://ITOP-IP/toolkit

 

4, 从容器中copy出文件

从docker中 copy出文件
Docker cp命令: 用于容器与主机之间的数据copy

语法: docker cp [OPTIONS] container:src_path dest_path docker cp [OPTIONS]
#docker cp 容器ID:/usr/xxx.txt  /usr/xxx.txt

 

5,定制化

定制字段

https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Aadd-attribute-sample

定制类

https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Aadd-class-sample

 

6,常见错误

(1)加载初始化自定义模块,会报错,找到config-itop.php后,赋予775权限,即可。

http://192.168.142.139/setup/ 

Error:Error: the configuration file 'conf/production/config-itop.php' already exists and cannot be overwritten.

 

posted on 2020-03-03 17:12  微子天明  阅读(2295)  评论(0编辑  收藏  举报

导航