锋盈数科-知识库 Logo
首页
软件开发
计算机基础
Hello Halo
新手必读
关于本知识库
登录 →
锋盈数科-知识库 Logo
首页 软件开发 计算机基础 Hello Halo 新手必读 关于本知识库
登录
  1. 首页
  2. 网络运维
  3. 搭建glpi(IT资产管理系统)

搭建glpi(IT资产管理系统)

0
  • 网络运维
  • 发布于 2025-04-19
  • 13 次阅读
黄健
黄健

目录

1.环境准备

2.安装环境依赖

3.安装mariadb

4.安装httpd

5.源码:glpi-project

6.修改服务器的时间:

7.安装fusioninventory插件(fusioninventory)

8.Client(Windows agent):fusioninventory-agent_windows-x64_2.6.exe

9.Client(Linux agent)


IP主机名系统
172.25.250.103服务器Linux
172.25.250.1Client01Windows
172.25.250.101Client02Linux

1.环境准备

系统环境:centos7
mariadb:10.5.18
php:7.4.33
apache:2.4.6

#关闭selinux
setenforce 0
#关闭防火墙
systemctl stop firewalld
#拉取cento7的阿里云网络源
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo 
sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo 
yum install epel-release -y 
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

2.安装环境依赖

yum -y install --enablerepo=remi --enablerepo=remi-php74 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-pecl-xdebug php-pecl-xhprof php-imap php-gd php-ldap php-intl php-simplexml php-zip php-apcu php-xmlrpc php-pear-CAS php-zip
yum -y install gcc gcc-c++ flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel

3.安装mariadb

#配置mariadb的yum源
cat >> /etc/yum.repos.d/mariadb.repo << EOF
[mariadb]
name = MariaDB
baseurl = https://mirrors.aliyun.com/mariadb/yum/10.5/centos7-amd64
gpgkey = https://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck = 1
EOF
yum makecache
yum -y install MariaDB-server MariaDB-client
systemctl start mariadb

配置mariadb

#初始化数据库
mysql_secure_installation 
#登录数据库
mysql -uroot -p
use mysql
#创建数据库用户,并给予远程数据库的权限
create user'glpi'@'%' IDENTIFIED BY 'redhat';
grant all privileges ON *.* TO 'glpi'@'%' IDENTIFIED BY 'redhat';
create database glpi;
flush privileges;

4.安装httpd

yum install -y httpd httpd-devel
systemctl start  httpd
systemctl enable httpd

5.源码:glpi-project

#下载源码:https://github.com/glpi-project/glpi/releases
wget https://github.com/glpi-project/glpi/releases/download/10.0.1/glpi-10.0.1.tgz
tar -zxf glpi-10.0.1.tgz 
cp glpi/* /var/www/html/. -R
chown -R apache:apache /var/www/html
chmod 755 -R /var/www/html/config/
chmod 755 -R /var/www/html/files/

网页访问:http://服务器IP/glpi/

http://服务器IP/glpi/

6.修改服务器的时间:

vim /etc/php.ini
    date.timezone = Asia/Shanghai
#重启httpd服务
systemctl restart httpd

7.安装fusioninventory插件(fusioninventory)

cd /var/www/html/plugins/
wget https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/glpi10.0.1%2B1.0/fusioninventory-10.0.1+1.0.zip
yum install -y unzip
unzip fusioninventory10.0.1+1.0.zip

网页打开安装并启用
http://服务器IP/front/marketplace.php

http://服务器IP/front/marketplace.php


8.Client(Windows agent):

fusioninventory-agent_windows-x64_2.6.exe

编写bat自动安装的脚本(与fusioninventory-agent_windows-x64_2.6.exe同一目录下):

:x64
echo "_____________________________________________"
echo "install fusioninventory-agent_windows-x64_2.6.exe"
%~dp0\fusioninventory-agent_windows-x64_2.6.exe /acceptlicense /add-firewall-exception /execmode=Service /no-start-menu /runnow /server='http://172.25.250.103/plugins/fusioninventory/' /installtasks=Deploy,ESX,Inventory,NetDiscovery,NetInventory,WakeOnLan /S
echo "install session"
ping -n 3 127.0.0.1>nul
echo "send computer information ti GLPI Server"
call "D:\迅雷下载\fusioninventory-agent.bat"
echo "_____________________________________________"
ping -n 3 127.0.0.1>nul

右键管理员运行bat文件

网页查看:http://127.0.0.1:62354

http://127.0.0.1:62354


生成的内容返回到服务器上

9.Client(Linux agent):

yum install -y fusioninventory-agent fusioninventory-agent-task-inventory
sed -i "s@#server = http://server.domain.com/glpi/plugins/fusioninventory/@server = http://服务器IP/plugins/fusioninventory/@g" /etc/fusioninventory/agent.cfg
#开启服务并设置开机自启
systemctl start fusioninventory-agent
systemctl enable fusioninventory-agent
#防火墙放行62354端口
firewall-cmd --permanent --zone=public --add-port=62354/tcp
firewall-cmd --reload
#后台运行
fusioninventory-agent --server http://服务器IP/plugins/fusioninventory/ --daemon

原文链接: https://blog.csdn.net/vincefans/article/details/128419779

相关文章

搭建glpi(IT资产管理系统) 2025-04-19 14:59

目录 1.环境准备 2.安装环境依赖 3.安装mariadb 4.安装httpd 5.源码:glpi-project

修改注册表停用 Windows 资讯和兴趣服务教程 2025-03-14 18:02

修改注册表停用 Windows 资讯和兴趣服务教程 一、自动修改注册表(适合不想手动操作的用户)

机房建设标准化施工规范

机房建设标准化施工规范 2024-10-21 09:07

不少朋友问到这个施工规范。 主要关于机房环境、用电、安全、布置、设备安装这些等等问题,在我们弱电VIP技术群中也不断有朋友讨论到。 本期我们来通过这个来了解下。

光纤跳线fc-sc

光纤跳线fc-sc 2024-10-16 21:59

光纤跳线FC-SC是一种常见的光纤连接器跳线,它用于连接不同类型的光纤接口。这种跳线的一端装有FC连接器,另一端装有SC连接器。 FC连接器(Ferrule Connector)是一种早期的光纤连接器类型,它采用金属套管和螺纹锁紧机制,具有较好的机械性能和稳定性。FC连接器通常用于单模光纤的连接,其

Web安全与网络安全:SQL漏洞注入 2024-09-26 17:57

Web安全与网络安全:SQL漏洞注入 引言 在Web安全领域,SQL注入漏洞(SQL Injection Vulnerability)是一种极具破坏性的安全威胁。它允许攻击者通过向Web应用程序的输入字段中插入或"注入"恶意的SQL代码片段,从而操纵后台数据库系统,执行未授权的数据库查询,甚至可能获

【网络】协议与网络版计算器 2024-09-26 17:57

在网络通信的广阔领域中,协议(Protocol)是构建信息交换基础的基石,它们定义了数据如何在网络中的不同设备之间传输、识别、解释和响应。而网络版计算器,作为网络应用的一个简单实例,不仅展示了网络服务的实现方式,也体现了协议在其中的关键作用。以下将深入探讨网络协议的基本概念、类型、作用,并结合网络版

目录

IT 外包服务商

  • 意见投递
  • zyf6619

软件开发应用

主菜单

  • 首页
  • 软件开发
  • 计算机基础
  • Hello Halo
  • 新手必读
  • 关于本知识库
Copyright © 2024 your company All Rights Reserved. Powered by Halo.