Docker 部署 GLPI(IT 资产管理软件系统)

GLPI 简介

GLPI open source tool to manage Helpdesk and IT assets

GLPI stands for Gestionnaire Libre de Parc Informatique(法语 资讯设备自由软件 的缩写) is a Free Asset and IT Management Software package, that provides ITIL Service Desk features, licenses tracking and software auditing.

shell 复制代码
https://glpi-project.org/
https://github.com/glpi-project/glpi
https://hub.docker.com/r/diouxx/glpi
# 官方安装 glpi 文档
https://glpi-install.readthedocs.io/en/latest/install/wizard.html#end-of-installation

https://www.cnblogs.com/wuhanjiayou/p/18060193/GLPI
https://blog.51cto.com/weicun/1943941

1. 安装 Docker CE

shell 复制代码
curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker.repo
yum install docker-ce -y && sudo systemctl enable --now docker
docker -v && docker search hello-world

2. 编写 compose.yaml 文件

shell 复制代码
[root@localhost ~]# mkdir glpi && cd glpi
[root@localhost glpi]# cat <<EOF > compose.yaml
services:
#MariaDB Container
  mariadb:
    image: mariadb:11.6.2	# 指定版本
    container_name: mariadb
    hostname: mariadb
    environment:
      - MARIADB_ROOT_PASSWORD=Root@2025
      - MARIADB_DATABASE=glpidb
      - MARIADB_USER=glpi_user
      - MARIADB_PASSWORD=glpi
    volumes:
      - ./mysql:/var/lib/mysql
    restart: always
#GLPI Container
  glpi:
    image: diouxx/glpi
    container_name : glpi
    hostname: glpi
    volumes:
      - ./html/glpi/:/var/www/html/glpi
    environment:
      - TIMEZONE=Asia/Shanghai
    ports:
      - "80:80"
    restart: always
    depends_on:
      - mariadb
EOF

3. 通过 compose.yml 运行容器

shell 复制代码
[root@localhost glpi]# docker compose up -d

[+] Running 14/10

 ✔ mariadb Pulled                                    25.9s 

 ✔ glpi Pulled                                     31.2s                                          

[+] Running 3/3

 ✔ Network glpi_default Created                             0.4s 

 ✔ Container mariadb   Started                             1.4s 

 ✔ Container glpi    Started                             1.6s 
 
 [root@localhost glpi]# docker ps && docker images
CONTAINER ID   IMAGE          COMMAND                   CREATED          STATUS          PORTS                                        NAMES
48fc0748ac84   diouxx/glpi    "/opt/glpi-start.sh"      41 minutes ago   Up 41 minutes   0.0.0.0:80->80/tcp, :::80->80/tcp, 443/tcp   glpi
9e11eb0fdbba   mariadb:10.7   "docker-entrypoint.s..."   43 minutes ago   Up 43 minutes   3306/tcp                                     mariadb
REPOSITORY    TAG       IMAGE ID       CREATED         SIZE
diouxx/glpi   latest    08472c90fa20   2 months ago    328MB
mariadb       10.7      895b6c8829c3   21 months ago   396MB

4. 数据库配置

shell 复制代码
# 该信息在 compose.yaml 文件中已定义
SQL 服务器地址:mariadb
SQL 账号:glpi_user
SQL 密码: glpi
相关推荐
叫致寒吧2 分钟前
k8s部署
云原生·容器·kubernetes
叫致寒吧24 分钟前
k8s操作(三)
网络·容器·kubernetes
济6171 小时前
linux(第七期)--gcc编译软件-- Ubuntu20.04
linux·运维·服务器
Sheffield2 小时前
今天浅浅的回顾一下Ansible吧
运维
DeepFlow 零侵扰全栈可观测3 小时前
3分钟定位OA系统GC瓶颈:DeepFlow全栈可观测平台实战解析
大数据·运维·人工智能·云原生·性能优化
一点晖光3 小时前
jenkins 流水线脚本
运维·jenkins
望舒同学3 小时前
Docker上云踩坑实录
docker·全栈
济6173 小时前
linux(第九期)--交叉编译器-- Ubuntu20.04
linux·运维·服务器
zxdzxdzzxd3 小时前
Tailscale Linux 登录指南
linux·运维·服务器
Knight_AL3 小时前
MinIO 入门实战:Docker 安装 + Spring Boot 文件上传(公有 / 私有)
spring boot·docker·容器