安装GLPI资产管理

1.环境centos7 4C/8G/100G

2.关闭防火墙

systemctl stop firewalld.service #停止firewalld服务
systemctl disable firewalld.service #设置开机默认不启动

3.关闭selinux  再执行 setenforce 0

 

4.更新系统

yum -y install epel-release
yum update -y

5.安装apache并启动

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

6.安装PHP及其他依赖软件配置epel yum源(百度网盘有)

rpm -Uvh http://mirror.centos.org/centos/7/extras/x86_64/Packages/epel-release-7-11.noarch.rpm
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

7.安装php及依赖

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

8.安装其他依赖

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

9.安装新版MariaDB

vim /etc/yum.repos.d/mariadb.repo

[mariadb]
name = MariaDB
baseurl = http://mirrors.aliyun.com/mariadb/yum/10.3/centos7-amd64/
gpgkey = http://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck = 1

yum clean all
yum makecache
yum repolist

yum -y install MariaDB-server MariaDB-client # yum安装MariaDB
systemctl start mariadb.service #启动mariadb
systemctl enable mariadb.service #设置开机启动
mysql_secure_installation #创初始化数据库

 

 

mysql -uroot -p
password

10.数据库授权

mysql> use mysql;
mysql> CREATE USER 'glpi'@'%' IDENTIFIED BY 'glpi'; #用户名 密码
mysql> GRANT USAGE ON *.* TO 'glpi'@'%' IDENTIFIED BY 'glpi';
mysql> create database glpi;
mysql>grant select,insert,update,delete,create,drop on glpi.* to 'glpi'@'%';
mysql> quit

11.下载GLPI并赋权

进入https://glpi-project.org/downloads/ 网站,下载GLPI安装包
我下载的是 glpi-9.5.1.tgz
文件传到服务器 /var/www/html 目录下面

cd /var/www/html
tar zxvf glpi-9.5.1.tgz
chown -R apache.apache /var/www/html/
chmod 755 -R /var/www/html/glpi/config/
chmod 755 -R /var/www/html/glpi/files/

12.重启apache

重启apache服务
service httpd restart

 

 

 

 

 

 

 

 

 

 

 

 

 
posted @ 2021-02-04 18:32  疯狂的米粒儿  阅读(572)  评论(0编辑  收藏  举报