centos7最小安装后配置(centos7下GLPI10.0.0最详细安装教程)
centos7最小安装后配置(centos7下GLPI10.0.0最详细安装教程)yum -y install MariaDB-server MariaDB-client5.启动服务并设置开机自启systemctl start httpd systemctl start mariadb systemctl enable mariadb systemctl enable mariadb5.1关闭防火墙1、使用VI编辑selinux vi /etc/sysconfig/selinux 2、按“i”键进行编辑,修改第七行的SELINUX为disabled。如下: # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enfo
准备环境Centos7最小安装(勾选除智能卡之外的全部功能),使用默认分区。
备注:尽量安装PHP7.4或以上版本,否则会出现图形报表无法刷新不显示的情况。
虚拟机需要能访问google(可以宿主机翻个墙,然后虚拟机连宿主机的网)
开始!0.首先安装本次需要用到的工具yum -y install wget
yum -y install vim
1.更新系统补丁
yum -y install epel-release
yum update -y
2.安装apache
yum install -y httpd httpd-devel
2.1安装PHP服务和依赖
更新php的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
2.2安装(本次安装的是PHP7.4版本)
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
3.安装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
4.安装mariadb(最新版)
4.1制作国内源
1、使用VI编辑mariadb.repo
vi /etc/yum.repos.d/mariadb.repo
2、按“i”键进行编辑,填入以下信息
[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
3、编辑完成后按“esc”键退出编辑模式,再按“:wq”组合键保存退出
4.2更新缓存(重启系统也可以)
yum clean all
yum makecache
yum repolist
4.3安装mariadb
yum -y install MariaDB-server MariaDB-client
5.启动服务并设置开机自启
systemctl start httpd
systemctl start mariadb
systemctl enable mariadb
systemctl enable mariadb
5.1关闭防火墙
1、使用VI编辑selinux
vi /etc/sysconfig/selinux
2、按“i”键进行编辑,修改第七行的SELINUX为disabled。如下:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
3、编辑完成后按“esc”键退出编辑模式,再按“:wq”组合键保存退出
5.2退出编辑模式后,再执行一下:setenforce 0
6.1初始化数据库
mysql_secure_installation
第一条输入“Y”后回车配置数据库密码,其余全部回车即可
6.2进入数据库
mysql -u root -p
输入刚才配置好的密码即可进入数据库
6.3 创建数据库,本文的数据库名asset,密码asset@2022(在数据库内执行操作);配置完成后输入 quit; 退出即可
use mysql;
CREATE USER 'asset'@'%' IDENTIFIED BY 'asset@2022';
GRANT USAGE ON *.* TO 'asset'@'%' IDENTIFIED BY 'asset@2022';
create database asset;
grant select insert update delete create drop on asset.* to 'asset'@'%';
flush privileges;
quit;
7.下载GLPI服务包
7.1进入html根目录
cd /var/www/html
7.2下载GLPI安装包
两种方式:一种自己去Github下载
Releases · glpi-project/glpi · GitHub
一种使用一下百度网盘链接下载,下载后使用工具上传至 /var/www/html 目录即可
链接:https://pan.baidu.com/s/1FxGAMrcRk_c-g-loCPB4kg
提取码:7777
7.3解压安装包
解压GLPI安装包
tar zxvf glpi-10.0.0.tgz
注释:tar zxvf 文件名
7.4授权
chown -R apache.apache /var/www/html/
chmod 755 -R /var/www/html/glpi/config/
chmod 755 -R /var/www/html/glpi/files/
7.5重启一下各个服务:
systemctl restart httpd
systemctl restart mariadb
8.开始进入WEB安装
浏览器输入:http://系统的IP地址/glpi
8.1语言选择中文
8.2后面的根据自己的实际情况填写即可,WEB配置完成后等待一会,会自动跳转到登录界面
默认登录用户名/密码为:glpi/glpi