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
相关推荐
t***316515 小时前
Docker 之mysql从头开始——Docker下mysql安装、启动、配置、进入容器执行(查询)sql
sql·mysql·docker
Eric.Lee202116 小时前
ubuntu 安装 Miniconda
linux·运维·python·ubuntu·miniconda
杭州泽沃电子科技有限公司16 小时前
在线监测:为医药精细化工奠定安全、合规与质量基石
运维·人工智能·物联网·安全·智能监测
行初心16 小时前
uos基础 cupsd.conf 查看打印服务的配置文件
运维
1***y17817 小时前
Git在发布流程中的自动化标签
运维·git·自动化
8***848217 小时前
如何在Linux中找到MySQL的安装目录
linux·运维·mysql
爱喝矿泉水的猛男17 小时前
ssh远程访问另一台windows(可扩展到docker环境)
docker·ssh·zerotier
9***J62817 小时前
Linux下PostgreSQL-12.0安装部署详细步骤
linux·运维·postgresql
gggg远18 小时前
docker详解
运维·docker·容器
wanhengidc18 小时前
云手机中的数据通常存储在哪里?
运维·服务器·安全·web安全·智能手机