GLPI: fix version 11 (#8238)

* Update glpi-install.sh

Updated PHP 8.2 to PHP 8.4;
Adjusted the database configuration for GLPI 11.0.1 and I hope this configuration will be the same for future GLPI versions.

* Update glpi-install.sh

Added setup_mariadb

* Update glpi-install.sh

* Update glpi-install.sh

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
This commit is contained in:
Nícolas Pastorello 2025-10-13 14:26:55 -03:00 committed by GitHub
parent 1fd132e6d3
commit e4ec0e4032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
$STD apt-get install -y \
git \
apache2 \
php8.2-{apcu,cli,common,curl,gd,imap,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \
php8.4-{apcu,cli,common,curl,gd,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \
php-cas \
libapache2-mod-php
msg_ok "Installed Dependencies"
@ -43,12 +43,11 @@ msg_ok "Set up database"
msg_info "Installing GLPi"
cd /opt
#RELEASE=$(curl -fsSL https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
curl -fsSL "https://github.com/glpi-project/glpi/releases/download/10.0.20/glpi-10.0.20.tgz" -o "glpi-10.0.20.tgz"
$STD tar -xzvf glpi-10.0.20.tgz
RELEASE=$(curl -fsSL https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
curl -fsSL "https://github.com/glpi-project/glpi/releases/download/${RELEASE}/glpi-${RELEASE}.tgz" -o $(basename "https://github.com/glpi-project/glpi/releases/download/${RELEASE}/glpi-${RELEASE}.tgz")
$STD tar -xzvf glpi-${RELEASE}.tgz
cd /opt/glpi
$STD php bin/console db:install --db-name=$DB_NAME --db-user=$DB_USER --db-password=$DB_PASS --no-interaction
echo "10.0.20" >/opt/${APPLICATION}_version.txt
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed GLPi"
msg_info "Setting Downstream file"
@ -83,6 +82,18 @@ define('GLPI_LOG_DIR', '/var/log/glpi');
EOF
msg_ok "Configured Downstream file"
msg_info "Configuring GLPI Database"
$STD /usr/bin/php /opt/glpi/bin/console db:install \
--db-host=localhost \
--db-name=$DB_NAME \
--db-user=$DB_USER \
--db-password=$DB_PASS \
--default-language=en_US \
--no-interaction \
--allow-superuser \
--force
msg_ok "Configured GLPI Database"
msg_info "Setting Folder and File Permissions"
chown root:root /opt/glpi/ -R
chown www-data:www-data /etc/glpi -R
@ -144,7 +155,7 @@ customize
msg_info "Cleaning up"
rm -rf /opt/glpi/install
rm -rf /opt/glpi-10.0.20.tgz
rm -rf /opt/glpi-${RELEASE}.tgz
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"