CentOS8 installation and deployment of GLPI asset management system

1: Prerequisites for installing GLPI10.0.3.

 2: Apache is used for Web Server, the latest version of MariaDB is used for the database. I will check the details during the installation, and 8.1 is used for PHP.

3: Turn off the firewall.

systemctl disable --now firewalld

4: Close SELINUX. Effective temporarily.

setenforce 0

    Permanently shutting down SELINUX takes effect and requires a system restart.

sed -i s/SELINUX=enforcing/SELINUX=disabled/ /etc/selinux/config

5: Install Apache.

yum -y install httpd httpd-devel

6: Install PHP. Currently, the PHP 8.1 version is the latest and has not been launched in CentOS8 Steam's AppStream. We can install PHP from the Remi repository, which is a free third-party repository. It is too troublesome to compile and install. Start by installing the EPEL repository, which stands for Extra Packages for Enterprise Linux. For new users of CentOS Stream and similar RHEL-based distributions, EPEL contains the most commonly used packages for enterprise Linux. Use the following command to add the EPEL library.

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y

 7: Enable Remi library

sudo dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm -y

8: List all PHP versions in the library, the default is PHP7.2.

sudo dnf module list php -y

 9: Reset PHP list.

sudo dnf module list reset php -y

 10: Enable PHP8.1.

sudo dnf module enable php:remi-8.1 -y

11: Install PHP8.1.

sudo dnf install php -y

12: Install commonly used extensions for PHP.

sudo dnf install php-cli php-fpm php-curl php-mysqlnd php-gd php-opcache php-zip php-intl php-common php-bcmath php-imap php-imagick php-xmlrpc php-json php-readline php-memcached php-redis php-mbstring php-apcu php-xml -y

13: Check the installed version.

php -v

PHP8.1.11 was installed successfully.

14: Enter the PHP configuration file.

vi /etc/php.ini

The official recommendation is to adjust the following parameters, which is not mandatory but recommended.

memory_limit = 64M ;        // max memory limit
file_uploads = on ;
max_execution_time = 600 ;  // not mandatory but recommended
session.auto_start = off ;
session.use_trans_sid = 0 ; // not mandatory but recommended

 14: Install MariaDB database. Create a new REPO file.

 vi /etc/yum.repos.d/MariaDB.repo

15: Enter the following content, save and exit.

# MariaDB 10.8 CentOS repository list - created 2022-10-25 05:16 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
baseurl = https://tw1.mirror.blendbyte.net/mariadb/yum/10.8/centos8-amd64
module_hotfixes=1
gpgkey=https://tw1.mirror.blendbyte.net/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

16: Install MariaDB10.8.

sudo dnf install MariaDB-server -y

Database installation is complete.

17: Start the program.

systemctl start httpd
systemctl start mariadb

18: Added to auto-start at boot.

systemctl enable httpd
systemctl enable mariadb

 19: Create data. 

mysql -uroot -p
password
create database glpi character set utf8mb4 collate utf8mb4_bin;
create user glpi@localhost identified by 'password';
grant all privileges on glpi.* to glpi@localhost;
quit;

20: Download GLPI.

  wget https://github.com/glpi-project/glpi/releases/download/10.0.3/glpi-10.0.3.tgz

download successful. If it doesn't work, you can try a few more times. If it doesn't work, you can download it and upload it to the server.

 21: Unzip the file to /var/www/html for easy authorization in the future.

tar zxvf glpi-10.0.3.tgz -C /var/www/html

22: Authorize the folder.

 chown -R apache:apache /var/www/html/glpi
 chown -R apache:apache /var/www/html/glpi/config
 chown -R apache:apache /var/www/html/glpi/files

23: Access the address http://ip/glpi during browsing to configure. 

24: Click OK to continue.

25: Select installation.

26: There are some warnings, but they do not affect the continued installation.

27: Enter the server address localhost, database name glpi and password password.

28: The database connection is successful. We select the previously established glpi database and continue. This step is a bit slow and you need to wait for a while.

29: This step is also a bit slow. Wait for the data to be initialized successfully. Click to continue.

30: Click to continue. You decide whether to send usage statistics or not.

31: Continue.

32: You can use GLPI. Below are the default administrator username and password, as well as some account introductions. You need to change the passwords of these users later, otherwise there will be a warning.

33: There will be an error.

34: Just click to log in again.

 35: Log in using the default username glpi and default password glpi.

 36: There are two warnings after logging in.

37: Change the passwords of the four users glpi, post-only, tech, and normal in System Management ---> Users, and the first warning will disappear. Take changing post-only as an example to find the user and click to enter.

38: Enter the password and save. Do the same for the others.

39: There is only one warning on the home page.

35: Enter the following command to rename the file install/install.php. 

mv /var/www/html/glpi/install/install.php /var/www/html/glpi/install/install.php.bak

40: The warnings on the homepage have disappeared and you can use it now.

41: Please refer to Fusioninventory plug-in installation.

Fusioninventory plug-in installation 

Guess you like

Origin blog.csdn.net/yleihj/article/details/127507173
Recommended