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

本文详细介绍了在CentOS7系统中配置环境(关闭selinux和防火墙),安装依赖库,设置阿里云镜像源,安装MariaDB、PHP、Apache,部署GLPI软件及其插件(FusionInventory和datainjection)的过程,以及如何解决wgetSSL连接问题。
摘要由CSDN通过智能技术生成

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

若提示进程pid被占用可使用 rm -f /var/run/yum.pid命令

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.源码:

#下载源码: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/

weget “无法建立SSL连接”的解决方法

原命令加上"--no-check-certificate"选项,就能排除掉这个错误

如:wget --no-check-certificate https://github.com/glpi-project/glpi/releases/download/10.0.1/glpi-10.0.1.tgz

或者把s去掉

wget http://github.com/glpi-project/glpi/releases/download/10.0.1/glpi-10.0.1.tgz

若都不能解决,可在物理机上下载后用xshell中的rz命令上传至目标文件夹(可用cd到目标文件夹后使用rz即可上传到该文件夹下)后进行解压(rz乱码可使用rz -bey命令)

网页访问: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.3%2B1.0/fusioninventory-10.0.3+1.0.tar.bz2
tar -xvf fusioninventory-10.0.3+1.0.tar.bz2

 

网页打开安装并启用

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

8.安装datainjection插件

cd /var/www/html/plugins/
wget  https://github.com/pluginsGLPI/datainjection/releases/download/2.13.5/glpi-datainjection-2.13.5.tar.bz2
tar -xvf glpi-datainjection-2.13.5.tar.bz2

打开插件即可

使用方法详见开源资产管理软件-GLPI(9.13)操作手册_51CTO博客_glpi资产管理软件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值