03MariaDB - amagerard/Wiki GitHub Wiki
RedHat/Wikijs
| 1- Network | 2- NodejsRedis | 3- Mariadb | 4- Wikijs | 5- Nginx | 
|---|---|---|---|---|
| 6- Selinux | 7- UpdateWikijs | 8- Backup | 9- GnomeShell | 10 Troubleshoots | 
3. Mariadb
3.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
3.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!  
3.3 Create wikijs database.
Create  wikijs database with user wikijs@locahost and  password: "641fqAB4d".
mariadb -u root -e "create database wikijs  default character set utf8mb4 collate utf8mb4_bin;"
mariadb -u root -e "CREATE USER 'wikijs'@'localhost' IDENTIFIED BY '641fqAB4d';"
mariadb -u root -e "grant all privileges on *.* to wikijs@localhost;"
mariadb -u root -e "flush privileges;"