此处采用最小化安装的Centos7.5
[root@localhost ~]# yum -y install epel-release
yum update -y
2.使用yum安装Apache 2.4.6
yum install -y httpd httpd-devel
3.使用yum安装Mariadb
yum install -y mariadb mariadb-server
数据10.3.4版
[mariadb]
name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
php 依赖包
yum install -y make wget gcc openssl readline-devel openssl-devel libxslt-devel gmp-devel bzip2-devel freetype-devel libjpeg-devel php-mcrypt libmcrypt libmcrypt-devel autoconf freetype gd jpegsrc libmcrypt libpng libpng-devel libjpeg libxml2 libxml2-devel zlib curl curl-devel
PHP 安装
yum -y install php
https://www.php.net/downloads.php
yum -y install php-fpm
1、如果之前已经安装我们先卸载一下
yum -y remove php*
2、由于linux的yum源不存在php7.x,所以我们要更改yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
3、yum 安装php72w和各种拓展,选自己需要的即可
1
yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
yum -y install lrzsz 文件上传工具
创建glpi数据库和对应用户
mysql -u root -p
use mysql;
CREATE USER 'glpi'@'%' IDENTIFIED BY 'Qwe!@#123';
GRANT USAGE ON . TO 'glpi'@'%' IDENTIFIED BY 'Qwe!@#123';
create database glpi;
grant select,insert,update,delete,create,drop on glpi.* to 'glpi'@'%';
flush privileges;
\q
下载解压glpi安装包
cd /home
wget https://github.com/glpi-project/glpi/releases/download/9.3.0/glpi-9.3.tgz
tar zxvf glpi-9.3.tgz
mv glpi-9.3 /var/www/html/glpi
cd /var/www/html/glpi/
chown -R apache.apache /var/www/html/
chmod 755 -R /var/www/html/glpi/config/
chmod 755 -R /var/www/html/glpi/files/
vim /etc/sysconfig/selinux
将SELINUX的状态改为
SELINUX=disabled
http://192.168.123.221/glpi
原文链接:https://blog.csdn.net/Lz__Heng/article/details/83109525