文章

IT固定资产解决方案:ocs+glpi

安装ocs inventory

docker安装ocs

git clone https://github.com/OCSInventory-NG/OCSInventory-Docker-Image
cd 2.9
docker-compose up -d

输入网址:http://ip地址/ocsreports
账号密码:admin/admin

155.1.png

windows安装agent

https://github.com/OCSInventory-NG/WindowsAgent

安装一路下一步,只有一个地方需要改下服务器IP地址

155.2.png

可以看到信息

155.3.png

具体信息

155.4.png

linux安装agent略,主要还是管理windows为主,linux一般是服务器

安装glpi

项目地址:https://github.com/DiouxX/docker-glpi

version: "3.2"

services:
# MariaDB Container
  mariadb:
    image: mariadb:10.7
    container_name: mariadb
    hostname: mariadb
    volumes:
      - /docker/glpi/mysql:/var/lib/mysql
    environment:
      - MARIADB_ROOT_PASSWORD=glpi
      - MARIADB_DATABASE=glpi
      - MARIADB_USER=glpi
      - MARIADB_PASSWORD=glpi
    
    restart: always

# GLPI Container
  glpi:
    image: diouxx/glpi
    container_name : glpi
    hostname: glpi
    ports:
      - "8088:80"
    links:
      - mariadb:mariadb
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/glpi/html/:/var/www/html/glpi
    environment:
      - TIMEZONE=Asia/Shanghai
    restart: always
    depends_on:
      - mariadb

155.5.png

155.6.png

安装插件
https://plugins.glpi-project.org/
将文件上传到html/plugins
tar
-jxvf glpi-ocsinventoryng-2.0.4.tar.bz2

开启插件 155.7.png

设置服务器

155.8.png

155.9.png

测试查看是否成功,出现报错

155.10.png

到ocs设置打开trace_deleted
155.11.png

添加电脑到glpi

155.12.png

155.13.png

可以看到一台电脑已经添加到glpi平台

155.14.png

License:  CC BY 4.0