CentOS7部署开源IT资产管理软件GLPI+FusionInventory

GLPI是一个用于 IT 资产管理的开源软件,为法语 Gestionnaire libre de parc informatique 的缩写,这个软件是用 PHP 编写的,并在 GPL 许可下发布。GLPI 是一个基于 Web 的应用程序,可帮助公司管理其信息系统。 GLPI能够构建所有组织资产的清单,并管理行政和财务任务; 系统的功能可帮助 IT 管理员创建技术资源数据库,以及维护操作的管理和历史记录。

GLPI

使用此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

CentOS7服务器环境配置+remi源配置

2、安装PHP+GLPI所需的依赖环境

yum -y install --enablerepo=remi --enablerepo=remi-php74 php php-opcache php-devel php-mbstring ph

安装PHP+GLPI所需的依赖环境

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

安装PHP+GLPI所需的依赖环境

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

安装mariadb数据库

安装mariadb数据库

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;

安装mariadb数据库

安装mariadb数据库

4、安装httpd服务并导入glpi安装包

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

安装httpd服务并导入glpi安装包

安装httpd服务并导入glpi安装包

glpi下载地址:https://github.com/glpi-project/glpi/releases

安装httpd服务并导入glpi安装包

为了跟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/

环境检查配置数据库连接

初始化GLPI

初始化GLPI

初始化GLPI

初始化GLPI

初始化GLPI

初始化GLPI

初始化GLPI 初始化GLPI

初始化GLPI

6、安装fusioninventory插件

cd /var/www/html/glpi/plugins/
https://github.com/fusioninventory/fusioninventory-for-glpi/releases

安装fusioninventory插件

上传并解压

安装fusioninventory插件

安装并启用fusioninventory插件

安装fusioninventory插件

7、Windows资产脚本一键安装fusioninventory-agent

安装fusioninventory插件

 

安装fusioninventory插件

效果如下:

安装fusioninventory插件

安装fusioninventory插件

安装fusioninventory插件

安装fusioninventory插件

安装fusioninventory插件

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

Linux资产安装fusioninventory-agent

Linux资产安装fusioninventory-agent

也可以如下命令后台运行

fusioninventory-agent --server http://192.168.31.127/glpi/plugins/fusioninventory/ --daemon

效果如下:

Linux资产安装fusioninventory-agent

;‘’ Linux资产安装fusioninventory-agent

广告合作
QQ群号:707632017
标签:

温馨提示:

1、本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。邮箱:2942802716#qq.com(#改为@)。

2、本站原创内容未经允许不得转裁,转载请注明出处“站长百科”和原文地址。

热门教程

  • Z-Blog教程
    Z-Blog教程
    ZBlog教程分享ZBlog安装教程、ZBlog建站教程和ZBlog使用教程等相关教程,包括如何创建...
  • WordPress教程
    WordPress教程
    WordPress教程提供了关于WordPress的基础知识和技巧,包括安装、设置、发布内容、选择主...
  • CSS教程
    CSS教程
    CSS教程提供了关于如何使用CSS来设计和美化网页的基础知识和技巧,包括选择器、样式规则、盒模型、布...
  • 宝塔面板教程
    宝塔面板教程
    宝塔面板教程是一个致力于向用户传授宝塔面板的使用技巧和知识的学习资源,旨在帮助用户快速上手和充分利用...
  • PHP教程
    PHP教程
    PHP教程提供了关于PHP语法、变量、函数、流程控制等概念的详细指导,同时介绍了常见的Web开发技术...

3个月免费VPS

亚马逊云科技

阿里云