参考:https://github.com/glpi-project/glpi
GLPI 是一款开源的 IT 资产管理和服务台软件,可以帮助组织管理和跟踪 IT 资产、故障、变更、问题等。
使用 Docker 来部署 GLPI 可以简化安装和配置过程,并提供一个独立的运行环境。
// 1) 低版本 Docker 安装
yum install docker -y
----
// < '推荐' >
// 2) 高版本 Docker 安装
curl -fsSL https://get.docker.com/ | sh
----
// 关闭防火墙
systemctl disable --now firewalld
setenforce 0
// 启用 Docker
systemctl enable --now docker
----
// 3) 安装 Docker-Compose
curl -L https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose -v
systemctl status docker
docker pull diouxx/glpi
mkdir -p /docker/plgi && cd /docker/plgi
[root@blog glpi] vim docker-compose.yaml
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/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /docker/glpi/html/:/var/www/html/glpi
environment:
- TIMEZONE=Asia/Shanghai
restart: always
depends_on:
- mariadb
mkdir -p /docker/glpi/
docker compose -f docker-compose.yaml up -d
docker ps -a
选择 安装
选择 继续
SQL 服务器地址:mariadb
SQL 账号:glpi
**SQL 密码:**glpi ( 该信息在 docker-compose 中定义 )