.png)
CentOS 6에 MariaDB 10.1 설치(SCL)
소개
Software Collection (SCL)을 사용하여 CentOS6에 MariaDB 10.1 설치
상위 기사 : MySQL, MariaDB의 각종 설치 방법과 EOL 정리 - Qiita
참고 : Quick Start — Software Collections
지원
본 방법으로 도입한 경우, Red Hat Software Collections Product Life Cycle - Red Hat Customer Portal 보다, 2019-05가 EOL이라고 생각된다.
그 이후에 보고된 취약성이나 결함에 대한 대응은 실시되지 않을 가능성이 있다.
LOG
리포지토리 등록
# yum install -y centos-release-scl
설치
# cat /etc/redhat-release
CentOS release 6.10 (Final)
# yum install -y rh-mariadb101
# scl enable rh-mariadb101 bash
... 略
mysql 시작/정지
초기 기동시에는 초기 설정 관계의 메시지가 표시된다.
# service rh-mariadb101-mariadb start
Initializing MariaDB database
2019-10-21 14:54:44 139789040650208 [Note] /opt/rh/rh-mariadb101/root/usr/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 258 ...
2019-10-21 14:54:48 140434216777696 [Note] /opt/rh/rh-mariadb101/root/usr/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 288 ...
2019-10-21 14:54:51 140268612790240 [Note] /opt/rh/rh-mariadb101/root/usr/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 318 ...
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
scl enable rh-mariadb101 -- '/opt/rh/rh-mariadb101/root/usr/bin/mysqladmin' -u root password 'new-password'
scl enable rh-mariadb101 -- '/opt/rh/rh-mariadb101/root/usr/bin/mysqladmin' -u root -h 0f6bc0babe5f password 'new-password'
Alternatively you can run:
scl enable rh-mariadb101 -- '/opt/rh/rh-mariadb101/root/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
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
Starting rh-mariadb101-mariadb: [ OK ]
# service rh-mariadb101-mariadb status
rh-mariadb101-mariadb (pid 503) is running...
# service rh-mariadb101-mariadb stop
Stopping rh-mariadb101-mariadb: [ OK ]
# service rh-mariadb101-mariadb status
rh-mariadb101-mariadb is stopped
mysql 자동 시작 설정 / 설정 해제
# chkconfig rh-mariadb101-mariadb on
# chkconfig --list rh-mariadb101-mariadb
rh-mariadb101-mariadb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# chkconfig rh-mariadb101-mariadb off
# chkconfig --list rh-mariadb101-mariadb
rh-mariadb101-mariadb 0:off 1:off 2:off 3:off 4:off 5:off 6:off
각종 확인
# service rh-mariadb101-mariadb start
Starting rh-mariadb101-mariadb: [ OK ]
# mysql -u root -e'select version();'
+-----------------+
| version() |
+-----------------+
| 10.1.29-MariaDB |
+-----------------+
# yum install -y centos-release-scl
# cat /etc/redhat-release
CentOS release 6.10 (Final)
# yum install -y rh-mariadb101
# scl enable rh-mariadb101 bash
... 略
# service rh-mariadb101-mariadb start
Initializing MariaDB database
2019-10-21 14:54:44 139789040650208 [Note] /opt/rh/rh-mariadb101/root/usr/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 258 ...
2019-10-21 14:54:48 140434216777696 [Note] /opt/rh/rh-mariadb101/root/usr/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 288 ...
2019-10-21 14:54:51 140268612790240 [Note] /opt/rh/rh-mariadb101/root/usr/libexec/mysqld (mysqld 10.1.29-MariaDB) starting as process 318 ...
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
scl enable rh-mariadb101 -- '/opt/rh/rh-mariadb101/root/usr/bin/mysqladmin' -u root password 'new-password'
scl enable rh-mariadb101 -- '/opt/rh/rh-mariadb101/root/usr/bin/mysqladmin' -u root -h 0f6bc0babe5f password 'new-password'
Alternatively you can run:
scl enable rh-mariadb101 -- '/opt/rh/rh-mariadb101/root/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
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
Starting rh-mariadb101-mariadb: [ OK ]
# service rh-mariadb101-mariadb status
rh-mariadb101-mariadb (pid 503) is running...
# service rh-mariadb101-mariadb stop
Stopping rh-mariadb101-mariadb: [ OK ]
# service rh-mariadb101-mariadb status
rh-mariadb101-mariadb is stopped
# chkconfig rh-mariadb101-mariadb on
# chkconfig --list rh-mariadb101-mariadb
rh-mariadb101-mariadb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# chkconfig rh-mariadb101-mariadb off
# chkconfig --list rh-mariadb101-mariadb
rh-mariadb101-mariadb 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# service rh-mariadb101-mariadb start
Starting rh-mariadb101-mariadb: [ OK ]
# mysql -u root -e'select version();'
+-----------------+
| version() |
+-----------------+
| 10.1.29-MariaDB |
+-----------------+