merge MariaDB to tools.func Installer (#4753)

* merge MariaDB to tools.func Installer

* add more mariadb migrations
This commit is contained in:
CanbiZ 2025-05-27 15:32:22 +02:00 committed by GitHub
parent 5ccf8a7cd6
commit ac2f0e66ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 172 additions and 161 deletions

View file

@ -15,14 +15,15 @@ update_os
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} \
php-cas \
libapache2-mod-php \
mariadb-server
git \
apache2 \
php8.2-{apcu,cli,common,curl,gd,imap,ldap,mysql,xmlrpc,xml,mbstring,bcmath,intl,zip,redis,bz2,soap} \
php-cas \
libapache2-mod-php
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up database"
DB_NAME=glpi_db
DB_USER=glpi
@ -33,10 +34,10 @@ mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';"
mysql -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "GLPI Database Credentials"
echo "Database: $DB_NAME"
echo "Username: $DB_USER"
echo "Password: $DB_PASS"
echo "GLPI Database Credentials"
echo "Database: $DB_NAME"
echo "Username: $DB_USER"
echo "Password: $DB_PASS"
} >>~/glpi_db.creds
msg_ok "Set up database"