使用yum命令简单地在CentOS 6.x上安装MariaDB 10.1.x
想要实现的目标
我想要通过简单的yum命令在CentOS 6.x上安装MariaDB10.1.x。
实施方法和解决方案
使用MariaDB官方网站提供的yum存储库进行安装。
执行指令
# 作業ディレクトリ作成し、作業ディレクトリに移動する
$ mkdir -p ~/tmp/MariaDB
$ cd ~/tmp/MariaDB/
# MariaDBオフィシャルサイトが提供しているyumリポジトリの設定を記述する
$ cat <<EOF > MariaDB.repo
>
> # MariaDB 10.1 CentOS repository list - created 2016-02-07 14:42 UTC
> # http://mariadb.org/mariadb/repositories/
> [mariadb]
> name = MariaDB
> baseurl = http://yum.mariadb.org/10.1/centos6-amd64
> gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
> gpgcheck=1
>
> EOF
$
# 設定ファイルをコピーする
sudo cp MariaDB.repo /etc/yum.repos.d/
# yumリポジトリをlistする
$ yum --disablerepo=\* --enablerepo='mariadb' list available
# MariDB 10.1をインストールする
$ sudo yum --enablerepo='mariadb' install -y MariaDB-server
消息來源
https://mariadb.com/kb/en/mariadb/yum/ 网址提供了有关MariaDB在CentOS 6上使用Yum安装的详细说明。
https://downloads.mariadb.org/mariadb/repositories/#mirror=yamagata-university&distro=CentOS&distro_release=centos6-amd64–centos6&version=10.1 网址提供了MariaDB 10.1在CentOS 6上的下载镜像和存储库信息。
補充
没有 shǐ)
以下是关于执行命令的标准输出的部分备忘录。
$ yum --disablerepo=\* --enablerepo='mariadb' list available
読み込んだプラグイン:fastestmirror
Determining fastest mirrors
mariadb | 2.9 kB 00:00
mariadb/primary_db | 19 kB 00:00
利用可能なパッケージ
MariaDB-cassandra-engine.x86_64 10.1.11-1.el6 mariadb
MariaDB-client.x86_64 10.1.11-1.el6 mariadb
MariaDB-common.x86_64 10.1.11-1.el6 mariadb
MariaDB-compat.x86_64 10.1.11-1.el6 mariadb
MariaDB-connect-engine.x86_64 10.1.11-1.el6 mariadb
MariaDB-devel.x86_64 10.1.11-1.el6 mariadb
MariaDB-gssapi-client.x86_64 10.1.11-1.el6 mariadb
MariaDB-gssapi-server.x86_64 10.1.11-1.el6 mariadb
MariaDB-server.x86_64 10.1.11-1.el6 mariadb
MariaDB-shared.x86_64 10.1.11-1.el6 mariadb
MariaDB-test.x86_64 10.1.11-1.el6 mariadb
galera.x86_64 25.3.12-1.rhel6.el6 mariadb
jemalloc.i686 3.6.0-1.el6 mariadb
jemalloc.x86_64 3.6.0-1.el6 mariadb
jemalloc-devel.i686 3.6.0-1.el6 mariadb
jemalloc-devel.x86_64 3.6.0-1.el6 mariadb
$
sudo yum --enablerepo='mariadb' install -y MariaDB-server
~ ~ snip ~ ~
インストールしています:
MariaDB-compat x86_64 10.1.11-1.el6 mariadb 2.7 M
置き換えています mysql-libs.x86_64 5.1.73-5.el6_6
MariaDB-server x86_64 10.1.11-1.el6 mariadb 103 M
依存性関連でのインストールをします。:
MariaDB-client x86_64 10.1.11-1.el6 mariadb 40 M
MariaDB-common x86_64 10.1.11-1.el6 mariadb 42 k
galera x86_64 25.3.12-1.rhel6.el6 mariadb 8.5 M
jemalloc x86_64 3.6.0-1.el6 mariadb 99 k
lsof x86_64 4.82-5.el6 base 324 k
perl-DBI x86_64 1.609-4.el6 base 705 k
トランザクションの要約
==========================================================================================================================================================================
インストール 8 パッケージ
総ダウンロード容量: 155 M
パッケージをダウンロードしています:
(1/8): MariaDB-10.1.11-centos6-x86_64-client.rpm | 40 MB 00:09
(2/8): MariaDB-10.1.11-centos6-x86_64-common.rpm | 42 kB 00:00
(3/8): MariaDB-10.1.11-centos6-x86_64-compat.rpm | 2.7 MB 00:00
(4/8): MariaDB-10.1.11-centos6-x86_64-server.rpm | 103 MB 00:31
(5/8): galera-25.3.12-1.rhel6.el6.x86_64.rpm | 8.5 MB 00:02
(6/8): jemalloc-3.6.0-1.el6.x86_64.rpm | 99 kB 00:00
(7/8): lsof-4.82-5.el6.x86_64.rpm | 324 kB 00:00
(8/8): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
合計 3.4 MB/s | 155 MB 00:45
警告: rpmts_HdrFromFdno: ヘッダ V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
Importing GPG key 0x1BB943DB:
Userid: "MariaDB Package Signing Key <package-signing-key@mariadb.org>"
From : https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
rpm_check_debug を実行しています
トランザクションのテストを実行しています
トランザクションのテストを成功しました
トランザクションを実行しています
インストールしています : MariaDB-compat-10.1.11-1.el6.x86_64 1/9
インストールしています : MariaDB-common-10.1.11-1.el6.x86_64 2/9
インストールしています : MariaDB-client-10.1.11-1.el6.x86_64 3/9
インストールしています : galera-25.3.12-1.rhel6.el6.x86_64 4/9
インストールしています : jemalloc-3.6.0-1.el6.x86_64 5/9
インストールしています : perl-DBI-1.609-4.el6.x86_64 6/9
インストールしています : lsof-4.82-5.el6.x86_64 7/9
インストールしています : MariaDB-server-10.1.11-1.el6.x86_64 8/9
chown: cannot access `/var/lib/mysql': そのようなファイルやディレクトリはありません
2016-01-26 14:29:30 139632562120736 [Note] /usr/sbin/mysqld (mysqld 10.1.11-MariaDB) starting as process 2722 ...
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: The InnoDB memory heap is disabled
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Memory barrier is not used
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Using Linux native AIO
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Using SSE crc32 instructions
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Completed initialization of buffer pool
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Database physically writes the file full: wait...
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2016-01-26 14:29:30 139632562120736 [Warning] InnoDB: New log files created, LSN=45883
2016-01-26 14:29:30 139632562120736 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-01-26 14:29:31 139632562120736 [Note] InnoDB: Doublewrite buffer created
2016-01-26 14:29:31 139632562120736 [Note] InnoDB: 128 rollback segment(s) are active.
2016-01-26 14:29:31 139632562120736 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-01-26 14:29:31 139632562120736 [Note] InnoDB: Foreign key constraint system tables created
2016-01-26 14:29:31 139632562120736 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-01-26 14:29:31 139632562120736 [Note] InnoDB: Tablespace and datafile system tables created.
2016-01-26 14:29:31 139632562120736 [Note] InnoDB: Waiting for purge to start
2016-01-26 14:29:31 139632562120736 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 0
2016-01-26 14:29:31 139631813166848 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-01-26 14:29:33 139814618720288 [Note] /usr/sbin/mysqld (mysqld 10.1.11-MariaDB) starting as process 2752 ...
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: The InnoDB memory heap is disabled
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Memory barrier is not used
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Using Linux native AIO
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Using SSE crc32 instructions
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Completed initialization of buffer pool
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Highest supported file format is Barracuda.
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: 128 rollback segment(s) are active.
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Waiting for purge to start
2016-01-26 14:29:33 139814618720288 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 1616799
2016-01-26 14:29:33 139813871122176 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-01-26 14:29:35 140127590549536 [Note] /usr/sbin/mysqld (mysqld 10.1.11-MariaDB) starting as process 2782 ...
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: The InnoDB memory heap is disabled
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Memory barrier is not used
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Using Linux native AIO
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Using SSE crc32 instructions
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Completed initialization of buffer pool
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Highest supported file format is Barracuda.
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: 128 rollback segment(s) are active.
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Waiting for purge to start
2016-01-26 14:29:36 140127590549536 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 1616809
2016-01-26 14:29:36 140126845892352 [Note] InnoDB: Dumping buffer pool(s) not yet started
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/
削除中 : mysql-libs-5.1.73-5.el6_6.x86_64 9/9
Verifying : MariaDB-common-10.1.11-1.el6.x86_64 1/9
Verifying : MariaDB-client-10.1.11-1.el6.x86_64 2/9
Verifying : lsof-4.82-5.el6.x86_64 3/9
Verifying : perl-DBI-1.609-4.el6.x86_64 4/9
Verifying : MariaDB-server-10.1.11-1.el6.x86_64 5/9
Verifying : MariaDB-compat-10.1.11-1.el6.x86_64 6/9
Verifying : jemalloc-3.6.0-1.el6.x86_64 7/9
Verifying : galera-25.3.12-1.rhel6.el6.x86_64 8/9
Verifying : mysql-libs-5.1.73-5.el6_6.x86_64 9/9
インストール:
MariaDB-compat.x86_64 0:10.1.11-1.el6 MariaDB-server.x86_64 0:10.1.11-1.el6
依存性関連をインストールしました:
MariaDB-client.x86_64 0:10.1.11-1.el6 MariaDB-common.x86_64 0:10.1.11-1.el6 galera.x86_64 0:25.3.12-1.rhel6.el6 jemalloc.x86_64 0:3.6.0-1.el6 lsof.x86_64 0:4.82-5.el6
perl-DBI.x86_64 0:1.609-4.el6
置換:
mysql-libs.x86_64 0:5.1.73-5.el6_6
~ ~ snip ~ ~