MariaDB adalah server database open-source yang merupakan pengganti populer untuk MySQL, menawarkan performa yang handal dan fitur canggih. Artikel ini akan memandu Anda melalui langkah-langkah untuk menginstall MariaDB Server di CentOS 7. Anda akan belajar cara menambahkan repository MariaDB, menginstal paket yang diperlukan, dan melakukan konfigurasi awal untuk memastikan server database Anda siap digunakan. Ikuti panduan ini untuk mengatur MariaDB secara efisien dan memulai pengelolaan data dengan cepat di lingkungan CentOS 7 Anda.

[root@mysvc ~]# yum install mariadb-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: d2lzkl7pfhq30w.cloudfront.net
 * remi-php73: cdn.centos.no
 * remi-safe: cdn.centos.no
Resolving Dependencies
--> Running transaction check
---> Package mariadb-server.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: mariadb(x86-64) = 1:5.5.68-1.el7 for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.68-1.el7.x86_64
..
..                                                                                                       34/37
  Verifying  : perl-Getopt-Long-2.40-3.el7.noarch                                                                                                                                        35/37
  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                                                                                                                                    36/37
  Verifying  : 4:perl-libs-5.16.3-299.el7_9.x86_64                                                                                                                                       37/37

Installed:
  mariadb-server.x86_64 1:5.5.68-1.el7

Dependency Installed:
  mariadb.x86_64 1:5.5.68-1.el7                    perl.x86_64 4:5.16.3-299.el7_9            perl-Carp.noarch 0:1.26-244.el7               perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7
  perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7      perl-DBD-MySQL.x86_64 0:4.023-6.el7       perl-DBI.x86_64 0:1.627-4.el7                 perl-Data-Dumper.x86_64 0:2.145-3.el7
  perl-Encode.x86_64 0:2.51-7.el7                  perl-Exporter.noarch 0:5.68-3.el7         perl-File-Path.noarch 0:2.09-2.el7            perl-File-Temp.noarch 0:0.23.01-3.el7
  perl-Filter.x86_64 0:1.49-3.el7                  perl-Getopt-Long.noarch 0:2.40-3.el7      perl-HTTP-Tiny.noarch 0:0.033-3.el7           perl-IO-Compress.noarch 0:2.061-2.el7
  perl-Net-Daemon.noarch 0:0.48-5.el7              perl-PathTools.x86_64 0:3.40-5.el7        perl-PlRPC.noarch 0:0.2020-14.el7             perl-Pod-Escapes.noarch 1:1.04-299.el7_9
  perl-Pod-Perldoc.noarch 0:3.20-4.el7             perl-Pod-Simple.noarch 1:3.28-4.el7       perl-Pod-Usage.noarch 0:1.63-3.el7            perl-Scalar-List-Utils.x86_64 0:1.27-248.el7
  perl-Socket.x86_64 0:2.010-5.el7                 perl-Storable.x86_64 0:2.45-3.el7         perl-Text-ParseWords.noarch 0:3.29-4.el7      perl-Time-HiRes.x86_64 4:1.9725-3.el7
  perl-Time-Local.noarch 0:1.2300-2.el7            perl-constant.noarch 0:1.27-2.el7         perl-libs.x86_64 4:5.16.3-299.el7_9           perl-macros.x86_64 4:5.16.3-299.el7_9
  perl-parent.noarch 1:0.225-244.el7               perl-podlators.noarch 0:2.5.1-3.el7       perl-threads.x86_64 0:1.87-4.el7              perl-threads-shared.x86_64 0:1.43-6.el7

Complete!
[root@mysvc ~]#
[root@mysvc ~]# mysql -V
mysql  Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1
[root@mysvc ~]#
[root@mysvc ~]# systemctl start mariadb
[root@mysvc ~]# systemctl status mariadb
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2024-08-13 21:21:42 WIB; 4s ago
  Process: 17573 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
  Process: 17490 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 17572 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─17572 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─17737 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mar...

Aug 13 21:21:40 mysvc mariadb-prepare-db-dir[17490]: Alternatively you can run:
Aug 13 21:21:40 mysvc mariadb-prepare-db-dir[17490]: '/usr/bin/mysql_secure_installation'
Aug 13 21:21:40 mysvc mariadb-prepare-db-dir[17490]: which will also give you the option of removing the test
Aug 13 21:21:40 mysvc mariadb-prepare-db-dir[17490]: databases and anonymous user created by default.  This is
Aug 13 21:21:40 mysvc mariadb-prepare-db-dir[17490]: strongly recommended for production servers.
Aug 13 21:21:40 mysvc mariadb-prepare-db-dir[17490]: See the MariaDB Knowledgebase at http://mariadb.com/kb or the
Aug 13 21:21:40 mysvc mariadb-prepare-db-dir[17490]: MySQL manual for more instructions.
Aug 13 21:21:40 mysvc mysqld_safe[17572]: 240813 21:21:40 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Aug 13 21:21:40 mysvc mysqld_safe[17572]: 240813 21:21:40 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Aug 13 21:21:42 mysvc systemd[1]: Started MariaDB database server.
[root@mysvc ~]#

Leave a Reply

Your email address will not be published. Required fields are marked *