๐Ÿ–ฅ๏ธ
Born2BeRoot
  • ๐Ÿ“˜Born2BeRoot
  • ๐Ÿ› ๏ธInstalling the virtual machine
    • ๐Ÿ’ฟVirtual machine ISO
    • ๐Ÿ–ฅ๏ธVirtualBox
    • ๐Ÿ’ฟAttaching ISO to VirtualBox
  • ๐ŸŒ€Installing Debian
    • ๐ŸŒConfigure locals
    • ๐Ÿ“ถConfigure the network
    • ๐Ÿ”Set up users and passwords
    • ๐Ÿ•šConfigure the clock
    • ๐Ÿ’พnon-BONUS: Partition disks
    • ๐Ÿ’พBONUS: Partition Disks
      • ๐Ÿ’พBONUS: primary partition
      • ๐Ÿ’พBONUS: logical partition
      • ๐Ÿ’พBONUS: encrypt logical partition
      • ๐Ÿ’พBONUS: logical volume manager
      • ๐Ÿ’พBONUS: logical volume group
      • ๐Ÿ’พBONUS: logical volume root
      • ๐Ÿ’พBONUS: logical volume swap
      • ๐Ÿ’พBONUS: logical volume home
      • ๐Ÿ’พBONUS: logical volume var
      • ๐Ÿ’พBONUS: logical volume srv
      • ๐Ÿ’พBONUS: logical volume tmp
      • ๐Ÿ’พBONUS: logical volume var-log
      • ๐Ÿ’พBONUS: file system of all logical volumes
    • ๐Ÿ“ฆConfigure the package manager
    • ๐Ÿ–ฅ๏ธInstall the GRUB boot loader
    • ๐ŸŽ‰Finish installation
  • โš™๏ธVirtual machine setup
    • โš™๏ธFirst connection
    • ๐Ÿ‘คInstalling sudo & configuration of user and groups
      • ๐Ÿ‘คCreating a user
      • ๐Ÿ‘ฅCreating a group
      • ๐Ÿซ‚Adding a user to a group
    • ๐Ÿ“ถInstalling & configuring SSH
      • ๐Ÿ“ถConfiguring SSH
      • ๐Ÿ‘ฌConnecting via SSH
    • ๐Ÿ”ฅInstalling & configuring UFW ๐Ÿ”ฅ๐Ÿงฑ Firewall
      • ๐Ÿ”ฅAllow a port to firewall
    • ๐Ÿ”sudo policies
    • ๐Ÿ”‘password policy ๐Ÿ”‘
    • ๐ŸงพScript ๐Ÿšจ
    • โฐCrontab
    • โœ’๏ธSignature.txt
  • ๐Ÿ˜ŠBONUS Services
    • ๐Ÿ’กLighttpd
    • ๐Ÿ“ฐWordPress
    • ๐ŸฌMariadb
      • ๐ŸฌCreate database on Mariadb
    • ๐Ÿ˜PHP
    • ๐Ÿ“ฐWordPress configuration
    • โšกLiteSpeed
  • โœ…Correction preparation
    • โœ…Correction sheet
    • โค๏ธโ€๐ŸฉนEvaluation answer
    • โŒจ๏ธEvaluation commands
      • โœ…Check no graphical interface
      • โœ…Check UFW
      • โœ…Check SSH service
      • โœ…Check OS
      • โœ…Check user and group
        • โœ…Add user and check password policy
        • โœ…Check group creation
        • โœ…Check adding to group
      • โœ…Check hostname
        • โœ…Check change hostname
      • โœ…Check all partitions
      • โœ…Check sudo
        • โœ…Check add user to sudo group
        • โœ…Check sudo rules
        • โœ…Check sudo logs
      • โœ…Check UFW advanced
        • โœ…Check UFW active rules
        • โœ…Check rule creation
      • โœ…Check SSH advanced
        • โœ…Check SSH usage
      • โœ…Check crontab of script
      • ๐ŸŽ‰Finish !
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. BONUS Services

Mariadb

MariaDB: It is a database. It is used for various purposes, such as data warehousing, e-commerce, enterprise-level functions, and logging applications.

  1. We will install the packages with the command:

sudo apt install mariadb-server
  1. Because the default configuration leaves your MariaDB installation unsecure, we will use a script provided by the mariadb-server package to restrict access to the server and remove unused accounts. We will run the script with the following command:

sudo mysql_secure_installation

It will ask if we want to switch to Unix socket authentication. Since we already have a protected root account we will type N.

Switch to unix_socket autentication? โ†’ N Change the root password? โ†’ N Remove anonymous users? โ†’ Y Disallow root login remotely? โ†’ Y Remove test database and access to it? โ†’ Y Reload privilege tables now? โ†’ Y

Explanation

Switch to unix_socket authentication? We choose N because we don't want it to switch to Unix socket authentication because we already have a protected root account.

Change the root password? We choose N. We do not want to change the root password. By default we have no password but in mariadb he is not really root as we must give him administrator permissions.

Remove anonymous users? We choose Y. By default when you install mariadb it has an anonymous user, which allows anyone to log into mariadb without having to create their own user account. This is designed for testing purposes and to make the installation smoother. When we leave the development environment and want to move to a production environment we must remove the anonymous users.

Disallow root login remotely? Choose Y. Disabling root login remotely will prevent anyone from guessing the root password. We will only be able to connect to root from localhost.

Remove test database and access to it? Choose Y. This will remove the test database and any users who have access to it.

Reaload privilege tables now? Choose Y. This will reload the MySQL permission tables so that the changes to the security settings will take effect immediately.

PreviousWordPressNextCreate database on Mariadb

Last updated 1 year ago

Was this helpful?

๐Ÿ˜Š
๐Ÿฌ