GLPI是一个用于 IT 资产管理的开源软件,为法语 Gestionnaire libre de parc informatique 的缩写,这个软件是用 PHP 编写的,并在 GPL 许可下发布。GLPI 是一个基于 Web 的应用程序,可帮助公司管理其信息系统。 GLPI能够构建所有组织资产的清单,并管理行政和财务任务; 系统的功能可帮助 IT 管理员创建技术资源数据库,以及维护操作的管理和历史记录。
使用此GLPI建立电脑、显示器、服务器、打印机、网络设备、电话等设备资产清单,并将之保存于数据库中,可配合使用 OCSNG(Open Computer and Software Inventory Next Generation)、Fusioninventory 扫描和采集信息,并将数据导入到 GLPI 数据库进行管理,且可记录设备管理和维护历史(Job-Tracking-System)。本文为大家介绍下CentOS7下部署开源IT资产管理软件GLPI+FusionInventory教程。
官方文档及下载链接
- https://glpi-project.org/downloads/
- https://glpi-project.org/documentation/
- https://glpi-install.readthedocs.io/
1、CentOS7服务器环境配置+remi源配置
sed -i 's/enforcing/disabled/g' /etc/selinux/config setenforce 0 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、安装PHP+GLPI所需的依赖环境
yum -y install --enablerepo=remi --enablerepo=remi-php74 php php-opcache php-devel php-mbstring ph
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数据库
vim /etc/yum.repos.d/mariadb.repo [mariadb] name = MariaDB baseurl = https://mirrors.aliyun.com/mariadb/mariadb-10.5.16/yum/centos74-amd64/ gpgcheck = 0 yum makecache yum -y install MariaDB-server MariaDB-client
systemctl start mariadb systemctl enable mariadb mysql_secure_installation #设置数据库root密码 mysql -uroot -p use mysql create user'glpi'@'%' IDENTIFIED BY 'glpi@2022!'; grant all privileges ON *.* TO 'glpi'@'%' IDENTIFIED BY 'glpi@2022!'; create database glpi; flush privileges;
4、安装httpd服务并导入glpi安装包
yum install -y httpd httpd-devel systemctl start httpd systemctl enable httpd
glpi下载地址:https://github.com/glpi-project/glpi/releases
为了跟FusionInventory插件版本一致,这里选用了10.0.1版本的GLPI。
cd /var/www/html/ tar -zxf glpi-10.0.1.tgz chown -R apache:apache /var/www/html/ ll chmod 755 -R /var/www/html/glpi/config/ chmod 755 -R /var/www/html/glpi/files/ firewall-cmd --permanent --zone=public --add-port=80/tcp firewall-cmd --reload
5、初始化GLPI
http://192.168.31.127/glpi/
环境检查配置数据库连接
6、安装fusioninventory插件
cd /var/www/html/glpi/plugins/
https://github.com/fusioninventory/fusioninventory-for-glpi/releases
上传并解压
安装并启用fusioninventory插件
7、Windows资产脚本一键安装fusioninventory-agent
效果如下:
8、Linux资产安装fusioninventory-agent
yum install -y fusioninventory-agent fusioninventory-agent-task-inventory vim /etc/fusioninventory/agent.cfg 修改#server = http://server.domain.com/glpi/plugins/fusioninventory/为 server = http://192.168.31.127/glpi/plugins/fusioninventory/ 或者 sed -i "s@#server = http://server.domain.com/glpi/plugins/fusioninventory/@server = http://192.168.31.127/glpi/plugins/fusioninventory/@g" /etc/fusioninventory/agent.cfg systemctl start fusioninventory-agent systemctl enable fusioninventory-agent firewall-cmd --permanent --zone=public --add-port=62354/tcp firewall-cmd --reload
也可以如下命令后台运行
fusioninventory-agent --server http://192.168.31.127/glpi/plugins/fusioninventory/ --daemon
效果如下:
-
广告合作
-
QQ群号:707632017