blob: d329b055b154ed69235c19f7735ddfcd622752b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
# INSTALLATION NOTES
On CentOS 7.6 - fresh install - April 2019
## Repositories
# yum install centos-release-scl
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# yum install yum-utils
## MariaDB 10.2
GLPI requires MariaDB >= 10, and default version 5.5 in base repository is not compatible,
so using the SCL of the latest MariaDB 10.2 (10.1 is also OK).
### Install
# yum install rh-mariadb102-mariadb-server
### Start and enable the service
# systemctl enable --now rh-mariadb102-mariadb
### Secure it
# scl enable rh-mariadb102 bash
# mysql --version
mysql Ver 15.1 Distrib 10.2.8-MariaDB...
# mysql_secure_installation
### Create GLPI database and account
# mysql -uroot -prootsecret
MariaDB> CREATE USER 'glpi'@'%' IDENTIFIED BY 'glpisecret';
MariaDB> GRANT USAGE ON *.* TO 'glpi'@'%' IDENTIFIED BY 'glpisecret';
MariaDB> CREATE DATABASE IF NOT EXISTS `glpi` ;
MariaDB> GRANT ALL PRIVILEGES ON `glpi`.* TO 'glpi'@'%';
MariaDB> FLUSH PRIVILEGES;
MariaDB> exit
Bye
### Check connection
# mysql -uglpi -pglpisecret glpi
MariaDB [glpi]> exit
Bye
## Apache HTTP Server and PHP 7.3
GLPI requires PHP >= 5.6, so default version 5.4 in base repository is not compatible,
so using the latest version 7.3 for performance (7.2 is also OK, 7.1 is close to EOL).
### Install
# yum-config-manager --enable remi-php73
# yum install httpd php php-opcache php-apcu
# php --version
PHP 7.3.4 (cli) (built: Apr 2 2019 13:48:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.4, Copyright (c) 1999-2018, by Zend Technologies
### Allow access to webserver
# firewall-cmd --zone=public --add-service=http --permanent
# firewall-cmd --reload
### Start and enable the service
# systemctl enable --now httpd
## GLPI 9.4
### Install
# yum-config-manager --enable remi
# yum-config-manager --enable remi-glpi94
# yum install glpi
### Populate the DB
# glpi-console glpi:database:install \
--db-host=localhost \
--db-name=glpi \
--db-user=glpi \
--db-password=glpisecret
## Done
Browse http://servername/glpi/ (login=glpi, password=glpi)
---------------
## Mariadb upgrade from 5.5 to 10.2
If you have some DB, created with default mariadb 5.5
### Install
# yum install rh-mariadb102-mariadb-server
If needed, create a new FS for /var/opt/rh/rh-mariadb102/lib/mysql
### Lazy way
# systemctl stop mariadb
# systemctl disable mariadb
# rsync -av /var/lib/mysql/ /var/opt/rh/rh-mariadb102/lib/mysql/
# systemctl start rh-mariadb102-mariadb
# systemctl enable rh-mariadb102-mariadb
# mysql_upgrade -pxxx
### Long way dump
Change /etc/opt/rh/rh-mariadb102/my.cnf.d/mariadb-server.cnf to use a different port
[server]
socket=/var/lib/mysql/mysql2.sock
port=3307
# systemctl start rh-mariadb102-mariadb
# scl enable rh-mariadb102 bash
# mysqldump -h127.0.0.1 -pxxx --all-databases | mysql -h127.0.0.1 -P3307
# systemctl stop mariadb
# systemctl disable mariadb
# systemctl stop rh-mariadb102-mariadb
Restore /etc/opt/rh/rh-mariadb102/my.cnf.d/mariadb-server.cnf
[server]
socket=/var/lib/mysql/mysql.sock
port=3306
# systemctl start rh-mariadb102-mariadb
# systemctl enable rh-mariadb102-mariadb
|