MARIADB installation in CentOS 7

Anonim

Installing MariaDB on CentOS 7

MySQL is considered the most popular database management system, but advanced users know that recently the development of this tool split into two parts, and as a result, it led to the emergence of a new wealthy solution called MariaDB. Now, many are preferred by this DBMS for various reasons, on which we will not stop today, since our main goal is to demonstrate how this component is installed in CentOS 7 on the example of step-by-step guide.

Install MariaDB in CentOS 7

If the installation of the MARIADB database management system was possible through standard OS repositories, then this article was as short as possible. However, the developers have gone a bit the other way that causes some new problems and difficulties. The method consists in the fact that the repository file is hand-assembled by the user, and then going on a package loading. We will talk about it in the second step, and now let's deal with the preparatory work.

Step 1: Preliminary actions

On the official site will have to choose the CENTOS assembly, and some users do not have such information, therefore the first task that should be performed is to determine the current version of the OS. On our site there is a separate article that allows you to cope with the task. Read it by clicking on the link below, and implement one of the above methods.

Read more: Definition of the version of CENTOS

Now let's go to the site itself. As mentioned earlier, it will be used to build your configuration file to implement the package download. To get the right code, you will need to make such actions:

Go to the official site of mariadb

  1. Go to the above link and select "CENTOS" in the list.
  2. Selection of the Distribution for Installing MariaDB in CentOS 7

  3. The second column will appear. Here, determine the release by clicking on the corresponding string.
  4. Selecting a version of the distribution kit for MARIADB in CentOS 7

  5. It remains only to specify the version that we learned earlier.
  6. Selecting the Assembly Distribution for MARIADB Installation in CentOS 7

  7. You get a table with the code and installation instructions, but novice users can all be clear.
  8. Getting a code for installing MariaDB in CentOS 7 from official repository

If you yourself have understood the principle of the installation on the table, proceed immediately to the configuration, skipping the second step, and inexperienced users to we advise you to pay attention to the following guidelines.

Step 2: File Assembling and Installing MariaDB

As you already know, you must first create a file itself by placing it in a special location in the local storage. Then you will only enter the command and confirm all your actions. More detailed this procedure looks like this:

  1. Run the console with a convenient method, for example, through the application menu.
  2. Transition to the terminal for Further Installing MariaDB in CentOS 7

  3. Here we recommend installing a convenient text editor so that there are no problems with saving the file. Enter Sudo Yum Install Nano and click on the ENTER key.
  4. Entering a command to install a text editor when installing MariaDB in CentOS 7

  5. This action is performed on behalf of the superuser, so you have to confirm the account by writing a password. Note that the characters entered in this way are not displayed in the row.
  6. Password entry to confirm the installation of a text editor when installing MariaDB in CentOS 7

  7. Agree with installation or if Nano has already been added to the system, go to the next action.
  8. Successful installation of text editor when installing MariaDB in CentOS 7

  9. Enter sudo nano /etc/yum.repos.d/mariadb.repo to create a new repository file in the required location.
  10. Creating a new repository file for installing MARIADB in CentOS 7

  11. Immediately a text editor will open in which you can make sure that the file really was created just.
  12. Information about the successful creation of a new file of the MariaDB repository in CentOS 7

  13. Insert the contents that were received on the official website of MariaDB.
  14. Insert code for installing MARIADB DBMS in CentOS 7

  15. Save the changes using the hot key Ctrl + O.
  16. Saving changes after inserting code for installing MariaDB in CentOS 7

  17. When a new line appears, you do not need to change the location or name, just click on ENTER.
  18. Canceling the name of the name after changing the MARIADB file in CentOS 7

  19. After that, leave the text editor via Ctrl + X.
  20. Exit the text editor for Further Installing MariaDB in CentOS 7

  21. Insert the following command sudo yum install mariadb-server mariadb-client and confirm it.
  22. The MARIADB setup command in CentOS 7 through the terminal

  23. Expect until all archives are transferred to the computer.
  24. Waiting for download files when installing MARIADB in CentOS 7

  25. A string will appear, notifying the package installation. Confirm the action by selecting the Y version.
  26. Confirmation of the launch of MARIADB installation in CentOS 7

  27. Next will be created a public key used to access the database management system. Check out the information and wait for the end of the installation.
  28. Creating a public key when installing MARIADB in CentOS 7

On this installation ended. It remains only to set the initial configuration to make sure that the tool function is normal. This operation will be devoted to our final stage.

Step 3: Initial Configuration

This stage is not aimed at providing guidance on the complete setting of the DBMS, since all this is subjective and depends on the additional components used. Now we only offer to activate the service and provide standard security rules in parallel by installing the root password.

  1. In the "Terminal", sudo SystemCTL Start Mariadb in order to run the MariaDB service.
  2. Running service After installing MariaDB in CentOS 7

  3. Agree with this operation, specifying the superuser password.
  4. Enter password to run the MariaDB service in CentOS 7

  5. If you received information about the absence of a file, then the current version of the DBMS was installed on top of the past. You will have to insert the command mv /etc/systemd/system/mariadb.service{bak}, and then repeat the launch.
  6. Command for moving a file with problems with the launch of the MariaDB service in CentOS 7

  7. Use sudo mysql_upgrade to update the tables if installed the tool over the old version.
  8. Update tables after installing MARIADB in CentOS 7

  9. It remains only to set the standard rules to secure the system from hacking. This uses sudo mysql_secure_installation.
  10. Team to ensure MARIADB protection in CentOS 7

  11. Follow the instructions that appear to create a new password and basic protection rules.
  12. MARIADB Protection Instructions in CentOS 7 After Installation

We offer to learn about all the other configuration points of MariaDB in the official documentation. Developers provide many useful commands and codes that will help create an optimal database management system, taking care of its safety.

Go to official MARIADB documentation

Now you know what to install MariaDB is harder than the usual programs, but still quite feasible even without additional knowledge and skills. It remains only to follow the instructions given and examine the documentation to get used in this DBMS.

See also:

Installing phpMyadmin in CentOS 7

Installation PHP 7 in CentOS 7

Read more