104Mariadb - amagerard/Wiki GitHub Wiki
RedHat/Xwiki
| 1- Network | 2- Java | 3- Tomcat | 4- Mariadb | 5- Xwiki | 
|---|---|---|---|---|
| 6- Nginx | 7- selinux | 8- GnomeShell | 9 Troubleshoots | 
4. Mariadb
4.1 Installation.
Mariadb update.
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup |  bash -
dnf update
dnf install MariaDB-server
systemctl enable --now mariadb
4.2 Secure MariaDB.
mariadb-secure-installation
The root password in this example is: "X2m56AB50!".
Enter current password for root (enter for none):  
Switch to unix_socket authentication [Y/n] n  
 ... skipping.  
You already have your root account protected, so you can safely answer 'n'.  
Change the root password? [Y/n] y  
New password: X2m56AB50!  
 ... Success!  
Remove anonymous users? [Y/n] y  
 ... Success!  
Disallow root login remotely? [Y/n] y  
 ... Success!  
Remove test database and access to it? [Y/n] y  
 - Dropping test database...  
 ... Success!  
 - Removing privileges on test database...  
 ... Success!  
Reload privilege tables now? [Y/n] y  
 ... Success!  
Cleaning up...  
All done!  
4.3 Create xwiki database.
Create  wikijs database with user wikijs@locahost and  password: "641fqAB4d".
mariadb -u root -e "create database xwiki  default character set utf8mb4 collate utf8mb4_bin;"
mariadb -u root -e "CREATE USER 'xwiki'@'localhost' IDENTIFIED BY '641fqAB4d';"
mariadb -u root -e "grant all privileges on *.* to xwiki@localhost;"
mariadb -u root -e "flush privileges;"
4.4 Backup Mariadb.
4.4.1 Save the xwiki database.
mariadb-dump -u root -p xwiki > backup_xwiki.sql
4.4.2 Restore the xwiki base.
mariadb -u root xwiki < backup_xwiki.sql