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