MariaDB 설치
$ sudo apt install mariadb-server mariadb-client
[ 실행 로그 ]
gangserver@RC530-U:~$ sudo apt install mariadb-server mariadb-client
[sudo] gangserver 암호:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
galera-4 gawk libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl
libdbd-mysql-perl libdbi-perl libfcgi-bin libfcgi-perl libfcgi0t64
libhtml-template-perl libmariadb3 libmysqlclient21 libsigsegv2
libterm-readkey-perl liburing2 mariadb-client-core mariadb-common
mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4
mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo
mariadb-plugin-provider-snappy mariadb-server-core mysql-common pv socat
Suggested packages:
gawk-doc libmldbm-perl libnet-daemon-perl libsql-statement-perl
libipc-sharedcache-perl mailx mariadb-test doc-base
The following NEW packages will be installed:
galera-4 gawk libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl
libdbd-mysql-perl libdbi-perl libfcgi-bin libfcgi-perl libfcgi0t64
libhtml-template-perl libmariadb3 libmysqlclient21 libsigsegv2
libterm-readkey-perl liburing2 mariadb-client mariadb-client-core
mariadb-common mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4
mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo
mariadb-plugin-provider-snappy mariadb-server mariadb-server-core
mysql-common pv socat
0 upgraded, 29 newly installed, 0 to remove and 8 not upgraded.
Need to get 19.2 MB of archives.
After this operation, 198 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 galera-4 amd64 26.4.16-2build4 [736 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libsigsegv2 amd64 2.14-1ubuntu2 [15.0 kB]
Get:3 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 gawk amd64 1:5.2.1-2build3 [463 kB]
Get:4 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 mysql-common all 5.8+1.1.0build1 [6,746 B]
Get:5 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-common all 1:10.11.8-0ubuntu0.24.04.1 [27.1 kB]
Get:6 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libdbi-perl amd64 1.643-4build3 [721 kB]
Get:7 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libconfig-inifiles-perl all 3.000003-2 [39.4 kB]
Get:8 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 libmariadb3 amd64 1:10.11.8-0ubuntu0.24.04.1 [188 kB]
Get:9 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-client-core amd64 1:10.11.8-0ubuntu0.24.04.1 [1,010 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-client amd64 1:10.11.8-0ubuntu0.24.04.1 [2,352 kB]
Get:11 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 liburing2 amd64 2.5-1build1 [21.1 kB]
Get:12 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-server-core amd64 1:10.11.8-0ubuntu0.24.04.1 [7,999 kB]
Get:13 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 socat amd64 1.8.0.0-4build3 [374 kB]
Get:14 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-server amd64 1:10.11.8-0ubuntu0.24.04.1 [3,381 kB]
Get:15 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libcgi-pm-perl all 4.63-1 [185 kB]
Get:16 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libfcgi0t64 amd64 2.4.2-2.1build1 [26.8 kB]
Get:17 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libfcgi-perl amd64 0.82+ds-3build2 [21.7 kB]
Get:18 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libcgi-fast-perl all 1:2.17-1 [10.3 kB]
Get:19 http://kr.archive.ubuntu.com/ubuntu noble-updates/main amd64 libmysqlclient21 amd64 8.0.41-0ubuntu0.24.04.1 [1,254 kB]
Get:20 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 libdbd-mysql-perl amd64 4.052-1ubuntu3 [85.5 kB]
Get:21 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libfcgi-bin amd64 2.4.2-2.1build1 [11.2 kB]
Get:22 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libhtml-template-perl all 2.97-2 [60.2 kB]
Get:23 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 libterm-readkey-perl amd64 2.38-2build4 [23.1 kB]
Get:24 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-plugin-provider-bzip2 amd64 1:10.11.8-0ubuntu0.24.04.1 [13.9 kB]
Get:25 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-plugin-provider-lz4 amd64 1:10.11.8-0ubuntu0.24.04.1 [13.8 kB]
Get:26 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-plugin-provider-lzma amd64 1:10.11.8-0ubuntu0.24.04.1 [13.8 kB]
Get:27 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-plugin-provider-lzo amd64 1:10.11.8-0ubuntu0.24.04.1 [13.8 kB]
Get:28 http://kr.archive.ubuntu.com/ubuntu noble-updates/universe amd64 mariadb-plugin-provider-snappy amd64 1:10.11.8-0ubuntu0.24.04.1 [13.8 kB]
Get:29 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 pv amd64 1.8.5-2build1 [73.9 kB]
Fetched 19.2 MB in 6s (2,967 kB/s)
Preconfiguring packages ...
Selecting previously unselected package galera-4.
(Reading database ... 177103 files and directories currently installed.)
Preparing to unpack .../galera-4_26.4.16-2build4_amd64.deb ...
info: The home dir /nonexistent you specified can't be accessed: No such file or
directory
info: Selecting UID from range 100 to 999 ...
info: Adding system user `_galera' (UID 122) ...
info: Adding new user `_galera' (UID 122) with group `nogroup' ...
info: Not creating `/nonexistent'.
Unpacking galera-4 (26.4.16-2build4) ...
Selecting previously unselected package libsigsegv2:amd64.
Preparing to unpack .../libsigsegv2_2.14-1ubuntu2_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.14-1ubuntu2) ...
Setting up libsigsegv2:amd64 (2.14-1ubuntu2) ...
Selecting previously unselected package gawk.
(Reading database ... 177119 files and directories currently installed.)
Preparing to unpack .../00-gawk_1%3a5.2.1-2build3_amd64.deb ...
Unpacking gawk (1:5.2.1-2build3) ...
Selecting previously unselected package mysql-common.
Preparing to unpack .../01-mysql-common_5.8+1.1.0build1_all.deb ...
Unpacking mysql-common (5.8+1.1.0build1) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../02-mariadb-common_1%3a10.11.8-0ubuntu0.24.04.1_all.deb .
..
Unpacking mariadb-common (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package libdbi-perl:amd64.
Preparing to unpack .../03-libdbi-perl_1.643-4build3_amd64.deb ...
Unpacking libdbi-perl:amd64 (1.643-4build3) ...
Selecting previously unselected package libconfig-inifiles-perl.
Preparing to unpack .../04-libconfig-inifiles-perl_3.000003-2_all.deb ...
Unpacking libconfig-inifiles-perl (3.000003-2) ...
Selecting previously unselected package libmariadb3:amd64.
Preparing to unpack .../05-libmariadb3_1%3a10.11.8-0ubuntu0.24.04.1_amd64.deb ..
.
Unpacking libmariadb3:amd64 (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package mariadb-client-core.
Preparing to unpack .../06-mariadb-client-core_1%3a10.11.8-0ubuntu0.24.04.1_amd6
4.deb ...
Unpacking mariadb-client-core (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package mariadb-client.
Preparing to unpack .../07-mariadb-client_1%3a10.11.8-0ubuntu0.24.04.1_amd64.deb
...
Unpacking mariadb-client (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package liburing2:amd64.
Preparing to unpack .../08-liburing2_2.5-1build1_amd64.deb ...
Unpacking liburing2:amd64 (2.5-1build1) ...
Selecting previously unselected package mariadb-server-core.
Preparing to unpack .../09-mariadb-server-core_1%3a10.11.8-0ubuntu0.24.04.1_amd6
4.deb ...
Unpacking mariadb-server-core (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package socat.
Preparing to unpack .../10-socat_1.8.0.0-4build3_amd64.deb ...
Unpacking socat (1.8.0.0-4build3) ...
Setting up mysql-common (5.8+1.1.0build1) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.c
nf (my.cnf) in auto mode
Setting up mariadb-common (1:10.11.8-0ubuntu0.24.04.1) ...
update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (
my.cnf) in auto mode
Selecting previously unselected package mariadb-server.
(Reading database ... 177749 files and directories currently installed.)
Preparing to unpack .../00-mariadb-server_1%3a10.11.8-0ubuntu0.24.04.1_amd64.deb
...
Unpacking mariadb-server (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../01-libcgi-pm-perl_4.63-1_all.deb ...
Unpacking libcgi-pm-perl (4.63-1) ...
Selecting previously unselected package libfcgi0t64:amd64.
Preparing to unpack .../02-libfcgi0t64_2.4.2-2.1build1_amd64.deb ...
Unpacking libfcgi0t64:amd64 (2.4.2-2.1build1) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../03-libfcgi-perl_0.82+ds-3build2_amd64.deb ...
Unpacking libfcgi-perl (0.82+ds-3build2) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../04-libcgi-fast-perl_1%3a2.17-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.17-1) ...
Selecting previously unselected package libmysqlclient21:amd64.
Preparing to unpack .../05-libmysqlclient21_8.0.41-0ubuntu0.24.04.1_amd64.deb ..
.
Unpacking libmysqlclient21:amd64 (8.0.41-0ubuntu0.24.04.1) ...
Selecting previously unselected package libdbd-mysql-perl:amd64.
Preparing to unpack .../06-libdbd-mysql-perl_4.052-1ubuntu3_amd64.deb ...
Unpacking libdbd-mysql-perl:amd64 (4.052-1ubuntu3) ...
Selecting previously unselected package libfcgi-bin.
Preparing to unpack .../07-libfcgi-bin_2.4.2-2.1build1_amd64.deb ...
Unpacking libfcgi-bin (2.4.2-2.1build1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../08-libhtml-template-perl_2.97-2_all.deb ...
Unpacking libhtml-template-perl (2.97-2) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../09-libterm-readkey-perl_2.38-2build4_amd64.deb ...
Unpacking libterm-readkey-perl (2.38-2build4) ...
Selecting previously unselected package mariadb-plugin-provider-bzip2.
Preparing to unpack .../10-mariadb-plugin-provider-bzip2_1%3a10.11.8-0ubuntu0.24
.04.1_amd64.deb ...
Unpacking mariadb-plugin-provider-bzip2 (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package mariadb-plugin-provider-lz4.
Preparing to unpack .../11-mariadb-plugin-provider-lz4_1%3a10.11.8-0ubuntu0.24.0
4.1_amd64.deb ...
Unpacking mariadb-plugin-provider-lz4 (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package mariadb-plugin-provider-lzma.
Preparing to unpack .../12-mariadb-plugin-provider-lzma_1%3a10.11.8-0ubuntu0.24.
04.1_amd64.deb ...
Unpacking mariadb-plugin-provider-lzma (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package mariadb-plugin-provider-lzo.
Preparing to unpack .../13-mariadb-plugin-provider-lzo_1%3a10.11.8-0ubuntu0.24.0
4.1_amd64.deb ...
Unpacking mariadb-plugin-provider-lzo (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package mariadb-plugin-provider-snappy.
Preparing to unpack .../14-mariadb-plugin-provider-snappy_1%3a10.11.8-0ubuntu0.2
4.04.1_amd64.deb ...
Unpacking mariadb-plugin-provider-snappy (1:10.11.8-0ubuntu0.24.04.1) ...
Selecting previously unselected package pv.
Preparing to unpack .../15-pv_1.8.5-2build1_amd64.deb ...
Unpacking pv (1.8.5-2build1) ...
Setting up libconfig-inifiles-perl (3.000003-2) ...
Setting up galera-4 (26.4.16-2build4) ...
Setting up libmysqlclient21:amd64 (8.0.41-0ubuntu0.24.04.1) ...
Setting up gawk (1:5.2.1-2build3) ...
Setting up libfcgi0t64:amd64 (2.4.2-2.1build1) ...
Setting up libcgi-pm-perl (4.63-1) ...
Setting up libfcgi-bin (2.4.2-2.1build1) ...
Setting up libhtml-template-perl (2.97-2) ...
Setting up socat (1.8.0.0-4build3) ...
Setting up libmariadb3:amd64 (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up pv (1.8.5-2build1) ...
Setting up libfcgi-perl (0.82+ds-3build2) ...
Setting up libterm-readkey-perl (2.38-2build4) ...
Setting up liburing2:amd64 (2.5-1build1) ...
Setting up libdbi-perl:amd64 (1.643-4build3) ...
Setting up libcgi-fast-perl (1:2.17-1) ...
Setting up mariadb-client-core (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up libdbd-mysql-perl:amd64 (4.052-1ubuntu3) ...
Setting up mariadb-server-core (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up mariadb-client (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up mariadb-server (1:10.11.8-0ubuntu0.24.04.1) ...
Warning: The unit file, source configuration file or drop-ins of mariadb.service
changed on disk. Run 'systemctl daemon-reload' to reload units.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /u
sr/lib/systemd/system/mariadb.service.
Setting up mariadb-plugin-provider-bzip2 (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up mariadb-plugin-provider-lzma (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up mariadb-plugin-provider-lzo (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up mariadb-plugin-provider-lz4 (1:10.11.8-0ubuntu0.24.04.1) ...
Setting up mariadb-plugin-provider-snappy (1:10.11.8-0ubuntu0.24.04.1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.4) ...
Processing triggers for mariadb-server (1:10.11.8-0ubuntu0.24.04.1) ...
설치 버전 확인
$ mariadb --version
[ 실행 로그 ]
gangserver@RC530-U:~$ mariadb --version
mariadb Ver 15.1 Distrib 10.11.8-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
부팅 시 MariaDB 서비스 시작 및 바로 MariaDB 서비스 구동
$ sudo systemctl enable --now mariadb
또는
$ sudo systemctl enable mariadb <- 부팅 시 MariaDB 서비스 시작
$ sudo systemctl start mariadb <- MariaDB 서비스 구동
[ 실행 로그 ]
gangserver@RC530-U:~$ sudo systemctl enable --now mariadb
Synchronizing state of mariadb.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable mariadb
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
gangserver@RC530-U:~$ sudo systemctl enable mariadb
Synchronizing state of mariadb.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable mariadb
gangserver@RC530-U:~$ sudo systemctl start mariadb
gangserver@RC530-U:~$
MariaDB 프로세스 확인
$ ps -ef | grep mysql
[ 실행 로그 ]
gangserver@RC530-U:~$ ps -ef | grep mysql
mysql 42589 1 0 17:03 ? 00:00:00 /usr/sbin/mariadbd
gangser+ 42664 38992 0 17:04 pts/0 00:00:00 grep --color=auto mysql
초기 설정 (root 비번 설정 등)
$ sudo mysql_secure_installation
[ 실행 로그 ]
gangserver@RC530-U:~$ sudo mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none): <- 엔터 입력
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] n <- unix_socket 인증으로 변경하려면 Y입력 (잘모르겠으면 n입력)
... skipping.
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] y <- root 비밀번호 변경하려면 Y입력
New password: <- 변경할 root 비밀번호 입력
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] n <- 익명 사용자 제거하려면 Y입력
... skipping.
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] n <- 원격으로 root 로그인을 허용하지 않으려면 Y입력
... skipping.
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] n <- 테스트 데이터베이스와 그것으로의 액세스를 제거하려면 Y입력
... skipping.
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y <- 지금 권한 테이블을 다시 로드하려면 Y입력
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
MariaDB root 로그인 (위에서 변경한 root 비밀번호로 로그인)
$ mariadb -u root -p
[ 실행 로그 ]
gangserver@RC530-U:~$ mariadb -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 35
Server version: 10.11.8-MariaDB-0ubuntu0.24.04.1 Ubuntu 24.04
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)]> exit
Bye
gangserver@RC530-U:~$
'OS > Ubuntu' 카테고리의 다른 글
Ubuntu 24.04 VLC installed with snap error (0) | 2025.03.27 |
---|---|
Ubuntu 24.04 venv 설치 및 환경설정 (0) | 2025.03.27 |
libQt5PrintSupport.so.5 error when running double commander (doublecmd) qt version on Ubuntu 24.04 (0) | 2025.03.27 |
Ubuntu / Check Intel Integrated GPU (0) | 2025.03.22 |
Ubuntu 24.04 gparted install (0) | 2025.03.04 |