"CentOS7 MariaDB 설치"의 두 판 사이의 차이

(새 문서: {{다른뜻|CentOS7 MariaDB 설치}} {{다른뜻|우분투 MariaDB 설치}} ;리눅스 MariaDB 설치 ;CentOS MariaDB 설치 ==repo 설정== <source lang='console'> [root@zabbix1 ~]...)
 
 
(사용자 6명의 중간 판 22개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{다른뜻|CentOS7 MariaDB 설치}}
{{다른뜻|CentOS6 MariaDB 설치}}
{{다른뜻|우분투 MariaDB 설치}}
{{다른뜻|우분투 MariaDB 설치}}
==개요==
{{테스트|CentOS 7.6}}
;리눅스 MariaDB 설치
;리눅스 MariaDB 설치
;CentOS MariaDB 설치  
;CentOS MariaDB 설치  
11번째 줄: 13번째 줄:
[mariadb]
[mariadb]
name = MariaDB
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
gpgcheck=1
18번째 줄: 20번째 줄:
==설치==
==설치==
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# yum install MariaDB-server
[root@zetawiki ~]# yum install MariaDB
... (생략)
... (생략)
===========================================================================================
=============================================================================================
  Package                     Arch         Version                     Repository     Size
  Package                     Arch       Version                         Repository   Size
===========================================================================================
=============================================================================================
Installing:
Installing:
  MariaDB-compat              x86_64       10.1.18-1.el6                mariadb      2.7 M
  MariaDB-server              x86_64     10.4.5-1.el7.centos            mariadb      25 M
    replacing  mysql-libs.x86_64 5.1.73-7.el6
MariaDB-server              x86_64      10.1.18-1.el6                mariadb      104 M
Installing for dependencies:
Installing for dependencies:
  MariaDB-client             x86_64       10.1.18-1.el6                mariadb       40 M
  MariaDB-client               x86_64     10.4.5-1.el7.centos            mariadb       12 M
  MariaDB-common             x86_64      10.1.18-1.el6                mariadb        42 k
  MariaDB-common               x86_64     10.4.5-1.el7.centos            mariadb       81 k
  galera                     x86_64       25.3.18-1.rhel6.el6          mariadb       8.5 M
MariaDB-compat              x86_64      10.4.5-1.el7.centos            mariadb     2.8 M
  jemalloc                   x86_64      3.6.0-1.el6                  epel         100 k
boost-program-options       x86_64      1.53.0-27.el7                  base        156 k
  lsof                       x86_64       4.82-5.el6                   base         324 k
  galera-4                    x86_64     26.4.2-1.rhel7.el7.centos      mariadb     9.4 M
  perl                       x86_64       4:5.10.1-141.el6_7.1         base           10 M
  groff-base                  x86_64      1.22.2-8.el7                   base        942 k
  perl-DBI                   x86_64       1.609-4.el6                 base          705 k
iproute                      x86_64     4.11.0-14.el7_6.2              updates      764 k
  perl-Module-Pluggable      x86_64       1:3.90-141.el6_7.1          base           40 k
iptables                    x86_64      1.4.21-28.el7                  base        433 k
  perl-Pod-Escapes           x86_64      1:1.04-141.el6_7.1           base           33 k
libaio                      x86_64      0.3.109-13.el7                  base          24 k
  perl-Pod-Simple            x86_64       1:3.13-141.el6_7.1           base          213 k
libmnl                      x86_64      1.0.3-7.el7                    base          23 k
  perl-libs                   x86_64       4:5.10.1-141.el6_7.1        base          579 k
libnetfilter_conntrack       x86_64      1.0.6-1.el7_3                  base          55 k
  perl-version                x86_64       3:0.77-141.el6_7.1          base           52 k
libnfnetlink                x86_64      1.0.1-4.el7                    base         26 k
  rsync                       x86_64       3.0.6-12.el6                 base          335 k
  lsof                         x86_64     4.87-6.el7                      base        331 k
make                        x86_64      1:3.82-23.el7                   base         420 k
openssl                      x86_64      1:1.0.2k-16.el7_6.1            updates      493 k
  perl                         x86_64     4:5.16.3-294.el7_6              updates      8.0 M
perl-Carp                    noarch      1.26-244.el7                    base          19 k
perl-Compress-Raw-Bzip2      x86_64      2.061-3.el7                    base          32 k
perl-Compress-Raw-Zlib      x86_64      1:2.061-4.el7                  base         57 k
  perl-DBI                     x86_64     1.627-4.el7                    base        802 k
perl-Data-Dumper            x86_64      2.145-3.el7                    base          47 k
perl-Encode                 x86_64      2.51-7.el7                      base        1.5 M
perl-Exporter                noarch      5.68-3.el7                      base          28 k
  perl-File-Path              noarch      2.09-2.el7                      base          26 k
perl-File-Temp              noarch      0.23.01-3.el7                  base          56 k
perl-Filter                  x86_64     1.49-3.el7                      base          76 k
perl-Getopt-Long            noarch      2.40-3.el7                      base          56 k
perl-HTTP-Tiny              noarch      0.033-3.el7                    base          38 k
perl-IO-Compress            noarch      2.061-2.el7                    base        260 k
perl-Net-Daemon              noarch      0.48-5.el7                      base         51 k
perl-PathTools              x86_64      3.40-5.el7                      base          82 k
perl-PlRPC                  noarch      0.2020-14.el7                  base          36 k
  perl-Pod-Escapes             noarch      1:1.04-294.el7_6                updates      51 k
perl-Pod-Perldoc            noarch      3.20-4.el7                      base          87 k
perl-Pod-Simple              noarch      1:3.28-4.el7                    base         216 k
  perl-Pod-Usage              noarch      1.63-3.el7                      base          27 k
perl-Scalar-List-Utils      x86_64     1.27-248.el7                    base          36 k
perl-Socket                  x86_64      2.010-4.el7                    base          49 k
perl-Storable                x86_64      2.45-3.el7                      base          77 k
perl-Text-ParseWords        noarch      3.29-4.el7                      base          14 k
perl-Time-HiRes              x86_64      4:1.9725-3.el7                  base          45 k
perl-Time-Local              noarch      1.2300-2.el7                    base          24 k
perl-constant                noarch      1.27-2.el7                      base          19 k
  perl-libs                   x86_64      4:5.16.3-294.el7_6              updates      688 k
perl-macros                  x86_64     4:5.16.3-294.el7_6              updates      44 k
perl-parent                  noarch      1:0.225-244.el7                base          12 k
perl-podlators              noarch      2.5.1-3.el7                    base         112 k
perl-threads                x86_64      1.87-4.el7                      base          49 k
  perl-threads-shared          x86_64     1.43-6.el7                      base         39 k
  rsync                       x86_64     3.1.2-6.el7_6.1                 updates      404 k
Updating for dependencies:
openssl-libs                x86_64      1:1.0.2k-16.el7_6.1            updates      1.2 M


Transaction Summary
Transaction Summary
===========================================================================================
=============================================================================================
Install     15 Package(s)
Install 1 Package (+50 Dependent packages)
Upgrade            (  1 Dependent package)


Total download size: 168 M
Total download size: 67 M
Is this ok [y/N]: y
Is this ok [y/d/N]: y
</source>
</source>
<source lang='console'>
<source lang='console'>
... (생략)
... (생략)
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
'/usr/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from MariaDB
Corporation Ab. You can contact us about this at sales@mariadb.com.
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
  Erasing    : mysql-libs-5.1.73-7.el6.x86_64                                        16/16
  Verifying  : 1:perl-Pod-Escapes-1.04-141.el6_7.1.x86_64                            1/16
  Verifying  : lsof-4.82-5.el6.x86_64                                                2/16
  Verifying  : rsync-3.0.6-12.el6.x86_64                                              3/16
  Verifying  : galera-25.3.18-1.rhel6.el6.x86_64                                      4/16
  Verifying  : 1:perl-Pod-Simple-3.13-141.el6_7.1.x86_64                              5/16
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                            6/16
  Verifying  : MariaDB-client-10.1.18-1.el6.x86_64                                    7/16
  Verifying  : 1:perl-Module-Pluggable-3.90-141.el6_7.1.x86_64                        8/16
  Verifying  : jemalloc-3.6.0-1.el6.x86_64                                            9/16
  Verifying  : MariaDB-server-10.1.18-1.el6.x86_64                                  10/16
  Verifying  : MariaDB-common-10.1.18-1.el6.x86_64                                  11/16
  Verifying  : 3:perl-version-0.77-141.el6_7.1.x86_64                                12/16
  Verifying  : MariaDB-compat-10.1.18-1.el6.x86_64                                  13/16
  Verifying  : 4:perl-libs-5.10.1-141.el6_7.1.x86_64                                14/16
  Verifying  : 4:perl-5.10.1-141.el6_7.1.x86_64                                      15/16
  Verifying  : mysql-libs-5.1.73-7.el6.x86_64                                        16/16
Installed:
Installed:
   MariaDB-compat.x86_64 0:10.1.18-1.el6        MariaDB-server.x86_64 0:10.1.18-1.el6     
   MariaDB-server.x86_64 0:10.4.5-1.el7.centos                                               


Dependency Installed:
Dependency Installed:
   MariaDB-client.x86_64 0:10.1.18-1.el6                                                   
   MariaDB-client.x86_64 0:10.4.5-1.el7.centos  MariaDB-common.x86_64 0:10.4.5-1.el7.centos
   MariaDB-common.x86_64 0:10.1.18-1.el6                                                   
   MariaDB-compat.x86_64 0:10.4.5-1.el7.centos  boost-program-options.x86_64 0:1.53.0-27.el7
   galera.x86_64 0:25.3.18-1.rhel6.el6                                                     
   galera-4.x86_64 0:26.4.2-1.rhel7.el7.centos  groff-base.x86_64 0:1.22.2-8.el7           
   jemalloc.x86_64 0:3.6.0-1.el6                                                           
  iproute.x86_64 0:4.11.0-14.el7_6.2            iptables.x86_64 0:1.4.21-28.el7           
   lsof.x86_64 0:4.82-5.el6                                                               
  libaio.x86_64 0:0.3.109-13.el7                libmnl.x86_64 0:1.0.3-7.el7               
   perl.x86_64 4:5.10.1-141.el6_7.1                                                        
   libnetfilter_conntrack.x86_64 0:1.0.6-1.el7_3 libnfnetlink.x86_64 0:1.0.1-4.el7         
   perl-DBI.x86_64 0:1.609-4.el6                                                           
   lsof.x86_64 0:4.87-6.el7                      make.x86_64 1:3.82-23.el7                 
   perl-Module-Pluggable.x86_64 1:3.90-141.el6_7.1                                         
   openssl.x86_64 1:1.0.2k-16.el7_6.1            perl.x86_64 4:5.16.3-294.el7_6             
   perl-Pod-Escapes.x86_64 1:1.04-141.el6_7.1                                             
  perl-Carp.noarch 0:1.26-244.el7              perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7
   perl-Pod-Simple.x86_64 1:3.13-141.el6_7.1                                              
  perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7   perl-DBI.x86_64 0:1.627-4.el7             
   perl-libs.x86_64 4:5.10.1-141.el6_7.1                                                   
   perl-Data-Dumper.x86_64 0:2.145-3.el7        perl-Encode.x86_64 0:2.51-7.el7           
   perl-version.x86_64 3:0.77-141.el6_7.1                                                  
  perl-Exporter.noarch 0:5.68-3.el7            perl-File-Path.noarch 0:2.09-2.el7         
   rsync.x86_64 0:3.0.6-12.el6                                                             
  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-294.el7_6      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-4.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-294.el7_6       
   perl-macros.x86_64 4:5.16.3-294.el7_6        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      rsync.x86_64 0:3.1.2-6.el7_6.1             


Replaced:
Dependency Updated:
   mysql-libs.x86_64 0:5.1.73-7.el6                                                       
   openssl-libs.x86_64 1:1.0.2k-16.el7_6.1                                                   


Complete!
Complete!
</source>
</source>
:→ DB를 실행하고 패스워드를 설정하라는 안내가 나온다.
:→ 그런데 mysql 이라는 이름이 자꾸 보인다. (문제는 없다.)


==확인 2==
==확인 ==
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# rpm -qa | grep MariaDB
[root@zetawiki ~]# rpm -qa | grep MariaDB
MariaDB-common-10.1.18-1.el6.x86_64
MariaDB-compat-10.4.5-1.el7.centos.x86_64
MariaDB-client-10.1.18-1.el6.x86_64
MariaDB-client-10.4.5-1.el7.centos.x86_64
MariaDB-compat-10.1.18-1.el6.x86_64
MariaDB-common-10.4.5-1.el7.centos.x86_64
MariaDB-server-10.1.18-1.el6.x86_64
MariaDB-server-10.4.5-1.el7.centos.x86_64
</source>
</source>


133번째 줄: 139번째 줄:
아까 나왔던 안내대로 DB를 시작하고 패스워드를 바꾼다.
아까 나왔던 안내대로 DB를 시작하고 패스워드를 바꾼다.
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# /etc/init.d/mysql start
[root@zetawiki ~]# systemctl start mariadb
Starting MySQL.161014 20:20:41 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
. SUCCESS!
</source>
<source lang='console'>
[root@zetawiki ~]# /usr/bin/mysqladmin -u root password 'P@ssw0rd'
[root@zetawiki ~]# /usr/bin/mysqladmin -u root password 'P@ssw0rd'
[root@zetawiki ~]#
</source>
</source>
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# netstat -anp | grep 3306
[root@zetawiki ~]# netstat -anp | grep 3306
tcp        0      0 :::3306                     :::*                       LISTEN      3268/mysqld
tcp6      0      0 :::3306                 :::*                   LISTEN      3479/mysqld        
</source>
</source>
:서비스 등록도 mysql이란 이름으로 되어 있고, 포트도 3306, 데몬이름도 mysqld이다.
:포트는 3306, 데몬이름은 mysqld이다.


==접속 확인==
==접속 확인==
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# mysql -u root -p
[root@zetawiki ~]# mysql -u root -p
Enter password:  
Enter password: P@ssw0rd
</source>
</source>
<source lang='console'>
<source lang='console'>
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Your MariaDB connection id is 5
Server version: 10.1.18-MariaDB MariaDB Server
Server version: 10.1.30-MariaDB MariaDB Server


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


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
165번째 줄: 168번째 줄:
</source>
</source>


==부팅시 자동시작 설정==
==부팅시 자동시작 설정 확인==
기본으로 설정되어 있지만 한번 더 확인
기본으로 설정되어 있지만 한번 더 확인
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# chkconfig mysql on
[root@zabbix1 ~]# systemctl is-enabled mariadb
[root@zetawiki ~]# chkconfig --list mysql
 
mysql          0:off 1:off 2:on 3:on 4:on 5:on 6:off
enabled
</source>
</source>


==같이 보기==
==같이 보기==
* [[CentOS7 MariaDB 설치]]
* [[CentOS6 MariaDB 설치]]
* [[우분투 MariaDB 설치]]
* [[우분투 MariaDB 설치]]
* [[리눅스 MySQL 설치]]
* [[리눅스 MySQL 설치]]
183번째 줄: 186번째 줄:


[[분류: MariaDB]]
[[분류: MariaDB]]
[[분류: yum install]]
[[분류: CentOS]]
[[분류: CentOS 7]]

2020년 2월 4일 (화) 21:44 기준 최신판

  다른 뜻에 대해서는 CentOS6 MariaDB 설치 문서를 참조하십시오.
  다른 뜻에 대해서는 우분투 MariaDB 설치 문서를 참조하십시오.

1 개요[ | ]

리눅스 MariaDB 설치
CentOS MariaDB 설치

2 repo 설정[ | ]

[root@zabbix1 ~]# vi /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

3 설치[ | ]

[root@zetawiki ~]# yum install MariaDB
... (생략)
=============================================================================================
 Package                      Arch        Version                         Repository    Size
=============================================================================================
Installing:
 MariaDB-server               x86_64      10.4.5-1.el7.centos             mariadb       25 M
Installing for dependencies:
 MariaDB-client               x86_64      10.4.5-1.el7.centos             mariadb       12 M
 MariaDB-common               x86_64      10.4.5-1.el7.centos             mariadb       81 k
 MariaDB-compat               x86_64      10.4.5-1.el7.centos             mariadb      2.8 M
 boost-program-options        x86_64      1.53.0-27.el7                   base         156 k
 galera-4                     x86_64      26.4.2-1.rhel7.el7.centos       mariadb      9.4 M
 groff-base                   x86_64      1.22.2-8.el7                    base         942 k
 iproute                      x86_64      4.11.0-14.el7_6.2               updates      764 k
 iptables                     x86_64      1.4.21-28.el7                   base         433 k
 libaio                       x86_64      0.3.109-13.el7                  base          24 k
 libmnl                       x86_64      1.0.3-7.el7                     base          23 k
 libnetfilter_conntrack       x86_64      1.0.6-1.el7_3                   base          55 k
 libnfnetlink                 x86_64      1.0.1-4.el7                     base          26 k
 lsof                         x86_64      4.87-6.el7                      base         331 k
 make                         x86_64      1:3.82-23.el7                   base         420 k
 openssl                      x86_64      1:1.0.2k-16.el7_6.1             updates      493 k
 perl                         x86_64      4:5.16.3-294.el7_6              updates      8.0 M
 perl-Carp                    noarch      1.26-244.el7                    base          19 k
 perl-Compress-Raw-Bzip2      x86_64      2.061-3.el7                     base          32 k
 perl-Compress-Raw-Zlib       x86_64      1:2.061-4.el7                   base          57 k
 perl-DBI                     x86_64      1.627-4.el7                     base         802 k
 perl-Data-Dumper             x86_64      2.145-3.el7                     base          47 k
 perl-Encode                  x86_64      2.51-7.el7                      base         1.5 M
 perl-Exporter                noarch      5.68-3.el7                      base          28 k
 perl-File-Path               noarch      2.09-2.el7                      base          26 k
 perl-File-Temp               noarch      0.23.01-3.el7                   base          56 k
 perl-Filter                  x86_64      1.49-3.el7                      base          76 k
 perl-Getopt-Long             noarch      2.40-3.el7                      base          56 k
 perl-HTTP-Tiny               noarch      0.033-3.el7                     base          38 k
 perl-IO-Compress             noarch      2.061-2.el7                     base         260 k
 perl-Net-Daemon              noarch      0.48-5.el7                      base          51 k
 perl-PathTools               x86_64      3.40-5.el7                      base          82 k
 perl-PlRPC                   noarch      0.2020-14.el7                   base          36 k
 perl-Pod-Escapes             noarch      1:1.04-294.el7_6                updates       51 k
 perl-Pod-Perldoc             noarch      3.20-4.el7                      base          87 k
 perl-Pod-Simple              noarch      1:3.28-4.el7                    base         216 k
 perl-Pod-Usage               noarch      1.63-3.el7                      base          27 k
 perl-Scalar-List-Utils       x86_64      1.27-248.el7                    base          36 k
 perl-Socket                  x86_64      2.010-4.el7                     base          49 k
 perl-Storable                x86_64      2.45-3.el7                      base          77 k
 perl-Text-ParseWords         noarch      3.29-4.el7                      base          14 k
 perl-Time-HiRes              x86_64      4:1.9725-3.el7                  base          45 k
 perl-Time-Local              noarch      1.2300-2.el7                    base          24 k
 perl-constant                noarch      1.27-2.el7                      base          19 k
 perl-libs                    x86_64      4:5.16.3-294.el7_6              updates      688 k
 perl-macros                  x86_64      4:5.16.3-294.el7_6              updates       44 k
 perl-parent                  noarch      1:0.225-244.el7                 base          12 k
 perl-podlators               noarch      2.5.1-3.el7                     base         112 k
 perl-threads                 x86_64      1.87-4.el7                      base          49 k
 perl-threads-shared          x86_64      1.43-6.el7                      base          39 k
 rsync                        x86_64      3.1.2-6.el7_6.1                 updates      404 k
Updating for dependencies:
 openssl-libs                 x86_64      1:1.0.2k-16.el7_6.1             updates      1.2 M

Transaction Summary
=============================================================================================
Install  1 Package  (+50 Dependent packages)
Upgrade             (  1 Dependent package)

Total download size: 67 M
Is this ok [y/d/N]: y
... (생략)
Installed:
  MariaDB-server.x86_64 0:10.4.5-1.el7.centos                                                

Dependency Installed:
  MariaDB-client.x86_64 0:10.4.5-1.el7.centos   MariaDB-common.x86_64 0:10.4.5-1.el7.centos 
  MariaDB-compat.x86_64 0:10.4.5-1.el7.centos   boost-program-options.x86_64 0:1.53.0-27.el7
  galera-4.x86_64 0:26.4.2-1.rhel7.el7.centos   groff-base.x86_64 0:1.22.2-8.el7            
  iproute.x86_64 0:4.11.0-14.el7_6.2            iptables.x86_64 0:1.4.21-28.el7             
  libaio.x86_64 0:0.3.109-13.el7                libmnl.x86_64 0:1.0.3-7.el7                 
  libnetfilter_conntrack.x86_64 0:1.0.6-1.el7_3 libnfnetlink.x86_64 0:1.0.1-4.el7           
  lsof.x86_64 0:4.87-6.el7                      make.x86_64 1:3.82-23.el7                   
  openssl.x86_64 1:1.0.2k-16.el7_6.1            perl.x86_64 4:5.16.3-294.el7_6              
  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-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-294.el7_6      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-4.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-294.el7_6         
  perl-macros.x86_64 4:5.16.3-294.el7_6         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       rsync.x86_64 0:3.1.2-6.el7_6.1              

Dependency Updated:
  openssl-libs.x86_64 1:1.0.2k-16.el7_6.1                                                    

Complete!

4 확인[ | ]

[root@zetawiki ~]# rpm -qa | grep MariaDB
MariaDB-compat-10.4.5-1.el7.centos.x86_64
MariaDB-client-10.4.5-1.el7.centos.x86_64
MariaDB-common-10.4.5-1.el7.centos.x86_64
MariaDB-server-10.4.5-1.el7.centos.x86_64

5 DB 시작 / 패스워드 변경[ | ]

아까 나왔던 안내대로 DB를 시작하고 패스워드를 바꾼다.

[root@zetawiki ~]# systemctl start mariadb
[root@zetawiki ~]# /usr/bin/mysqladmin -u root password 'P@ssw0rd'
[root@zetawiki ~]#
[root@zetawiki ~]# netstat -anp | grep 3306
tcp6       0      0 :::3306                 :::*                    LISTEN      3479/mysqld
포트는 3306, 데몬이름은 mysqld이다.

6 접속 확인[ | ]

[root@zetawiki ~]# mysql -u root -p
Enter password: P@ssw0rd
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.1.30-MariaDB MariaDB Server

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

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

MariaDB [(none)]> quit
Bye
[root@zetawiki ~]#

7 부팅시 자동시작 설정 확인[ | ]

기본으로 설정되어 있지만 한번 더 확인

[root@zabbix1 ~]# systemctl is-enabled mariadb

enabled

8 같이 보기[ | ]

9 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}