1、環境介紹
操作系統:龍蜥os 8.9
nginx:1.26.1
php:8.2.19
mysql:MarinaDB 10.3.9
glpi:10.0.6
fusioninventory:fusioninventory-10.0.6+1.1
2、安裝epel源
dnf install epel-release -y
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
3、安裝nginx
vi /etc/yum.repos.d/nginx.repo
輸入如下
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
安裝
dnf install nginx -y
修改nginx 啟動用戶為root
啟動
systemctl start nginx
systemctl enable nginx
4、安裝php
dnf install php82 -y
systemctl start php82-php-fpm
systemctl enbale php82-php-fpm
5、安裝mariadb
dnf install mariadb mariadb-server -y
啟動
systemctl start mariadb
systemctl enable mariadb
6、下載glpi軟件包并上傳到服務器
https://glpi-project.org/downloads/
7、配置gpli nginx服務器
vi /etc/nginx/conf.d/glpi.conf
添加如下
server {listen 80;listen [::]:80;server_name glpi.wtown.com;root /var/www/glpi;index index.php index.html index.htm;location / {try_files $uri $uri/ /index.php$is_args$args;}# 處理 index.php 文件的請求location ~ ^/index\.php$ {include fastcgi_params;fastcgi_split_path_info ^(.+\.php)(/.*)$;fastcgi_pass unix:/var/opt/remi/php82/run/php-fpm/www.sock;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_INFO $fastcgi_path_info;fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;}# 處理所有 .php 文件的請求location ~ \.php$ {include fastcgi_params;fastcgi_pass unix:/var/opt/remi/php82/run/php-fpm/www.sock;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param PATH_INFO $fastcgi_path_info;fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;}# 禁止訪問 .ht* 文件location ~ /\.ht {deny all;}
}
8、開始安裝
這里提示錯誤,按照指引解決
默認用戶glpi 密碼 glpi
9、插件市場
這里需要注冊一下 獲得key 才能使用插件市場
)
10、安裝fusioninventory插件(版本太低 不支持最新glpi)
https://github.com/fusioninventory/fusioninventory-for-glpi/releases
放置到這個目錄
執行安裝
php82 bin/console glpi:plugin:install --username=glpi fusioninventory
php82 bin/console glpi:plugin:activate --username=glpi fusioninventory
* * * * * cd /var/www/glpi/front/ && /usr/bin/php82 cron.php &>/dev/null
更改實體-server端
windows 客戶端安裝
https://github.com/fusioninventory/fusioninventory-agent/releases
注意這里服務地址就是上面主體里配置的
http://glpi.wtown.com/plugins/fusioninventory/
剩下的默認就行
linux 客戶端安裝
安裝這兩個軟件,這個epel源中有
dnf install fusioninventory-agent
dnf install fusioninventory-agent-task-inventory
更改配置
vi /etc/fusioninventory/agent.cfg
更改如下
server = http://glpi.wtown.com/plugins/fusioninventory/
啟動
systemctl start fusioninventory-agent.service
systemctl enable fusioninventory-agent.service