Centos7安裝GLPI資產管理軟件
-
系統信息
- 環境說明
下面的命令可以查看系統的版本信息,本次使用的是centos7
| cat /etc/redhat-release uname -a |
- IP地址信息
由於安裝GLPI軟件需要連接網絡,下載很多的軟件包,所以需要我們安裝的服務器可以連接網絡,我使用的vmware軟件虛擬化出來的操作系統,Centos配置了2個網卡,一個網卡連接本地電腦(僅主機模式),另一個網卡配置用來上網(NAT模式)。
- 查看IP地址
| ip addr |
- 修改IP地址
| vi /etc/sysconfig/network-scripts/ifcfg-eno16777736 |
- 重啟網卡
| service network restart |
- 關閉Selinux
| vi /etc/selinux/config |
修改為disabled

重啟之后才會生效。
-
關閉防火牆
不關閉防火牆,安裝好后,地址無法訪問。
| systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall開機啟動 firewall-cmd --state #查看默認防火牆狀態(關閉后顯示notrunning,開啟后顯示running) |
-
配置yum源
- CentOS6.x方法
| rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
- CentOS7.x方法
| rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm |
- 安裝PHP
| yum -y install php-imap yum -y install php-ldap yum -y install php-gd yum -y install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpuni-PHPUnit php-pecl-xdebug php-pecl-xhprof #無、php-phpuni-PHPUnit |
- 安裝Apache、MySQL和一些依賴
| yum -y install gcc gcc-c++ gcc-g77 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 mysql mysql-server httpd #無、gcc-g77、mysql-server,Mysql-server必須安裝centos7 mysql數據庫安裝和配置講述的如何安裝Mysql-server |
- 配置MySQL
| [root@localhost1 ~]# service mysqld start [root@localhost1 ~]# mysql mysql> use mysql; mysql> update user set password=PASSWORD("root")where user="root"; mysql> FLUSH PRIVILEGES; mysql> create database GLPI; mysql> quit Bye [root@localhost1 ~]# chkconfig --levels 235 mysqld on |
- 配置GLPI
| [root@localhost1 ~]# cd /usr/src/ [root@localhost1 src]# curl -O -L https://github.com/glpi-project/glpi/releases/download/9.1.3/glpi-9.1.3.tgz [root@localhost1 src]# tar xf glpi-9.1.3.tgz -C /var/www/html/ [root@localhost1 src]# chown -R apache:apache /var/www/html/ [root@localhost1 src]# chkconfig --level 2345 httpd on service httpd restart |
后面的算是優化
| [root@localhost1 src]# vim /etc/httpd/conf/httpd.conf 276 ServerName www.example.com:80 292 DocumentRoot "/var/www/html/glpi" ##vi編輯的過程中,使用":set number"可以查看行號 |
-
登陸GLPI

-
故障解決方法
關注后文
