Шаг 1. Обновить систему

Шаг 2. Добавить репозитерий

$ sudo nano /etc/yum.repos.d/MariaDB.repo

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/10.4/centos8-amd64

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

Шаг 3. Устанавливаем Maria репозитарий

После добавления репозитария в Yum устанавливаем MariaDB

$ sudo dnf install boost-program-options

$ sudo dnf install MariaDB-server MariaDB-client –disablerepo=AppStream

$ sudo systemctl enable –now mariadb

Проверяем установленные пакеты:

$ rpm -qi MariaDB-server

Name        : MariaDB-server

Version     : 10.4.15

Release     : 1.el8

Architecture: x86_64

Install Date: Sun 11 Oct 2020 08:24:34 AM MSK

Group       : Applications/Databases

Size        : 130325774

License     : GPLv2

Signature   : DSA/SHA1, Wed 07 Oct 2020 05:47:02 AM MSK, Key ID cbcb082a1bb943db

Source RPM  : MariaDB-server-10.4.15-1.el8.src.rpm

Build Date  : Mon 05 Oct 2020 08:47:47 PM MSK

Build Host  : rhel8-amd64

Relocations : (not relocatable)

Vendor      : MariaDB Foundation

URL         : http://mariadb.org

Summary     : MariaDB: a very fast and robust SQL database server

Description :

MariaDB: a very fast and robust SQL database server

It is GPL v2 licensed, which means you can use the it free of charge under the

conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).

MariaDB documentation can be found at https://mariadb.com/kb

MariaDB bug reports should be submitted through https://jira.mariadb.org

Запускаем

$ sudo systemctl enable –now mariadb

Проверяем

$ sudo systemctl status mariadb

● mariadb.service – MariaDB 10.4.15 database server

   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)

  Drop-In: /etc/systemd/system/mariadb.service.d

           └─migrated-from-my.cnf-settings.conf

   Active: active (running) since Sun 2020-10-11 08:25:29 MSK; 2min 23s ago

     Docs: man:mysqld(8)

https://mariadb.com/kb/en/library/systemd/

 Main PID: 13406 (mysqld)

   Status: “Taking your SQL requests now…”

    Tasks: 30 (limit: 11477)

   Memory: 72.9M

   CGroup: /system.slice/mariadb.service

           └─13406 /usr/sbin/mysqld

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] InnoDB: 10.4.15 started; log sequence number 61163; transaction id 21

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] Plugin ‘FEEDBACK’ is disabled.

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] InnoDB: Buffer pool(s) load completed at 201011  8:25:29

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] Server socket created on IP: ‘::’.

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] Reading of all Master_info entries succeeded

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] Added new Master_info ” to hash table

Oct 11 08:25:29 web.itcom.local mysqld[13406]: 2020-10-11  8:25:29 0 [Note] /usr/sbin/mysqld: ready for connections.

Oct 11 08:25:29 web.itcom.local mysqld[13406]: Version: ‘10.4.15-MariaDB’  socket: ‘/var/lib/mysql/mysql.sock’ $ mysql -u root -p port: 3306  MariaDB Server

Oct 11 08:25:29 web.itcom.local systemd[1]: Started MariaDB 10.4.15 database server.

Шаг 4. Безопасность сервера баз данных

$ sudo mysql_secure_installation

Проверяем доступ

$ mysql -u root -p

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 18

Server version: 10.4.15-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> SELECT version();

+—————–+

| version()       |

+—————–+

| 10.4.15-MariaDB |

+—————–+

1 row in set (0.000 sec)

MariaDB [(none)]> QUIT

Bye


Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Запущено направление DIGITAL WEB!

Поддержка и продвижение сайтов.

Любая платформа. Гибкие условия.

Узнать подробнее