일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- Spring Boot
- IntelliJ
- Core Java
- Python
- 문서
- Open Source
- Docker
- spring
- Thymeleaf
- Source
- Tomcat
- 오픈소스
- oracle
- Eclipse
- STS
- 설정
- maven
- error
- Exception
- git
- ubuntu
- JavaScript
- MSSQL
- jpa
- SpringBoot
- MySQL
- PostgreSQL
- myBatis
- AJAX
- JDBC
- Today
- Total
헤르메스 LIFE
[MariaDB] How to Install MariaDB Server 10 by using yum 본문
출처 : http://ora-sysdba.tistory.com/category/MariaDB%20Admin%20Guide/Install%20How%20To
How to Install MariaDB Server 10 by using yum
서버 구성환경
Virtual Machine VMware Workstation 10.0.0
OS Cent OS 7.0
Devices Memory : 1 GB
Processors : 1
Hard Disk(SCSI) : 10 GB
Network Adapter : NAT
DB Link Download MariaDB
MariaDB Server 10 버전을 CentOS 7에 yum 패키지를 사용하여 설치하는 방법을 알아보겠습니다.
Create MariaDB yum repo file
각 OS, DB 환경에 맞게 MariaDB Repositories 정보를 입력해야 합니다.
## 아래 내용을 복사하여 붙여 넣습니다.
--
# MariaDB 10.0 CentOS repository list - created 2014-10-16 08:00 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
--
Importing MariaDB Signing Key
## MariaDB Key 값을 Import 시킵니다.
[root@localhost ~]# rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Install MariaDB Server and Client
## yum package를 사용하여 MariaDB Server 와 Client를 설치합니다.
[root@localhost ~]# yum install MariaDB-server MariaDB-client MariaDB-devel MariaDB-shared
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.0.14-1.el7.centos will be installed
--> Processing Dependency: MariaDB-common for package: MariaDB-client-10.0.14-1.el7.centos.x86_64
---> Package MariaDB-devel.x86_64 0:10.0.14-1.el7.centos will be installed
---> Package MariaDB-server.x86_64 0:10.0.14-1.el7.centos will be installed
--> Processing Dependency: perl(DBI) for package: MariaDB-server-10.0.14-1.el7.centos.x86_64
---> Package MariaDB-shared.x86_64 0:10.0.14-1.el7.centos will be installed
--> Running transaction check
...
... ## 중간 중간 Is this ok [y/N] 메시지 표시 -> y 선택
...
Transaction Summary
================================================================================================================================================================================================================================================================
Install 4 Packages (+7 Dependent packages)
Total download size: 69 M
Installed size: 307 M
Is this ok [y/d/N]: y
Downloading packages:
(1/11): MariaDB-10.0.14-centos7_0-x86_64-common.rpm | 23 kB 00:00:01
(2/11): MariaDB-10.0.14-centos7_0-x86_64-devel.rpm | 6.2 MB 00:00:05
(3/11): MariaDB-10.0.14-centos7_0-x86_64-client.rpm | 9.9 MB 00:00:19
(4/11): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00:00
(5/11): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00:00
(6/11): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00:00
(7/11): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00:00
(8/11): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00:00
(9/11): MariaDB-10.0.14-centos7_0-x86_64-shared.rpm | 1.2 MB 00:00:01
(10/11): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00:06
(11/11): MariaDB-10.0.14-centos7_0-x86_64-server.rpm | 50 MB 00:00:29
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.9 MB/s | 69 MB 00:00:36
Running transaction check
Running transaction test
Transaction check error:
file /etc/my.cnf from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/Index.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/ascii.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp1250.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp1256.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp1257.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp850.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp852.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
file /usr/share/mysql/charsets/cp866.xml from install of MariaDB-common-10.0.14-1.el7.centos.x86_64 conflicts with file from package mariadb-libs-1:5.5.35-3.el7.x86_64
...
...
...
Error Summary
-------------
## 진행 중 트랜잭션 검사 오류가 나타납니다. 이 경우 아래 방법에 따라 해결하세요.
## mariadb-libs-1:5.5.35-3.el7.x86_64 패키지가 MariaDB 서버를 설치하는 동안에 충돌이 일어나기 때문이다.
## postfix 10 나중에 설치되어야 합니다. (mariadb-libs-1:5.5.35-3.el7.x86_64 우선적 설치)
[root@localhost ~]# yum remove postfix
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================================================================
Removing:
postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M
Transaction Summary
================================================================================================================================================================================================================================================================
Remove 1 Package
Installed size: 12 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : 2:postfix-2.10.1-6.el7.x86_64 1/1
Verifying : 2:postfix-2.10.1-6.el7.x86_64 1/1
Removed:
postfix.x86_64 2:2.10.1-6.el7
Complete!
[root@localhost ~]# rpm -ev mariadb-libs-5.5.35-3.el7.x86_64
Preparing packages...
mariadb-libs-1:5.5.35-3.el7.x86_64
## 이제 MariaDB 설치를 다시 진행합니다.
[root@localhost ~]# yum install MariaDB-server MariaDB-client MariaDB-devel MariaDB-shared
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.0.14-1.el7.centos will be installed
--> Processing Dependency: MariaDB-common for package: MariaDB-client-10.0.14-1.el7.centos.x86_64
---> Package MariaDB-devel.x86_64 0:10.0.14-1.el7.centos will be installed
---> Package MariaDB-server.x86_64 0:10.0.14-1.el7.centos will be installed
--> Processing Dependency: perl(DBI) for package: MariaDB-server-10.0.14-1.el7.centos.x86_64
---> Package MariaDB-shared.x86_64 0:10.0.14-1.el7.centos will be installed
...
... ## 중간 중간 Is this ok [y/N] 메시지 표시 -> y 선택
...
Installing : MariaDB-devel-10.0.14-1.el7.centos.x86_64 10/11
Installing : MariaDB-shared-10.0.14-1.el7.centos.x86_64 11/11
Verifying : MariaDB-devel-10.0.14-1.el7.centos.x86_64 1/11
Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 2/11
Verifying : perl-Net-Daemon-0.48-5.el7.noarch 3/11
Verifying : MariaDB-common-10.0.14-1.el7.centos.x86_64 4/11
Verifying : MariaDB-server-10.0.14-1.el7.centos.x86_64 5/11
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 6/11
Verifying : MariaDB-shared-10.0.14-1.el7.centos.x86_64 7/11
Verifying : perl-DBI-1.627-4.el7.x86_64 8/11
Verifying : MariaDB-client-10.0.14-1.el7.centos.x86_64 9/11
Verifying : perl-PlRPC-0.2020-14.el7.noarch 10/11
Verifying : perl-IO-Compress-2.061-2.el7.noarch 11/11
Installed:
MariaDB-client.x86_64 0:10.0.14-1.el7.centos MariaDB-devel.x86_64 0:10.0.14-1.el7.centos MariaDB-server.x86_64 0:10.0.14-1.el7.centos MariaDB-shared.x86_64 0:10.0.14-1.el7.centos
Dependency Installed:
MariaDB-common.x86_64 0:10.0.14-1.el7.centos 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-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7
perl-PlRPC.noarch 0:0.2020-14.el7
Complete!
## MariaDB 설치가 잘 되었는지 rpm 관련 패키지를 rpm 명령어로 찾을 수 있습니다.
[root@localhost ~]# rpm -qa|grep -i maria
MariaDB-common-10.0.14-1.el7.centos.x86_64
MariaDB-server-10.0.14-1.el7.centos.x86_64
MariaDB-client-10.0.14-1.el7.centos.x86_64
MariaDB-devel-10.0.14-1.el7.centos.x86_64
MariaDB-shared-10.0.14-1.el7.centos.x86_64
## 이제 다시 postfix를 설치합니다.
[root@localhost ~]# yum install postfix
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Resolving Dependencies
--> Running transaction check
---> Package postfix.x86_64 2:2.10.1-6.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================================================================
Installing:
postfix x86_64 2:2.10.1-6.el7 base 2.4 M
Transaction Summary
================================================================================================================================================================================================================================================================
Install 1 Package
Total download size: 2.4 M
Installed size: 12 M
Is this ok [y/d/N]: y
Downloading packages:
postfix-2.10.1-6.el7.x86_64.rpm | 2.4 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:postfix-2.10.1-6.el7.x86_64 1/1
Verifying : 2:postfix-2.10.1-6.el7.x86_64 1/1
Installed:
postfix.x86_64 2:2.10.1-6.el7
Complete!
MariaDB root's password reset
보안 이슈로 MariaDB의 루트 암호를 재 설정할 것을 권고합니다.
암호 변경 방법은 mysql_secure_installation, mysqladmin, login into MariaDB console 세가지 방법이 있습니다. 현재는 mysql_secure_installation으로 설정하겠습니다.
## 우선 MariaDB 서비스를 실행합니다. (Cent OS 7 명령어는 매뉴얼을 참조하세요.)
[root@localhost ~]# systemctl start mysql.service
[root@localhost ~]# ps -ef | grep mysql
root 64845 1 0 01:11 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/master.example.com.pid
mysql 64919 64845 8 01:11 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/master.example.com.err --pid-file=/var/lib/mysql/master.example.com.pid
root 64948 63777 0 01:11 pts/1 00:00:00 grep --color=auto mysql
## mysql_secure_installation를 실행합니다.
[root@localhost ~]# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found
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
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): ## Enter
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] ## y
New password: ## Password 입력
Re-enter new password: ## 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] ## y
... Success!
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] ## y
... Success!
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] ## y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] ## 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!
'Database' 카테고리의 다른 글
[Oracle] 전일, 전주, 전월, 전분기, 전반기, 전년도 구하기 (0) | 2016.04.19 |
---|---|
[MariaDB] 데이터베이스 생성 / 권한 부여 / 접속 (0) | 2016.03.30 |
[MySQL] CentOS - Installing MySQL (0) | 2016.03.30 |
[MariaDB] MariaDB 설치 및 MySQL과의 호환성 (0) | 2016.03.30 |
[Oracle] 테이블 생성일자 확인 (0) | 2016.03.21 |