変奏現実

パソコンやMMORPGのことなどを思いつくまま・・・記載されている会社名・製品名・システム名などは、各社の商標、または登録商標です。

この画面は、簡易表示です

maria-db

【CentOS7.6】MariaDB

# yum update
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     | 6.4 kB     00:00
 * base: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                     | 3.6 kB     00:00
epel                                                     | 5.3 kB     00:00
extras                                                   | 3.4 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/2): epel/x86_64/updateinfo                              | 978 kB   00:00
(2/2): epel/x86_64/primary_db                              | 6.8 MB   00:00
No packages marked for update
# yum install -y mariadb mariadb-server
インストール:
  mariadb.x86_64 1:5.5.60-1.el7_5     mariadb-server.x86_64 1:5.5.60-1.el7_5
# systemctl start mariadb
# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
# mysql --version
mysql  Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
# 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
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):
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] [ENTER]
New password:
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] [ENTER]
 ... 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] [ENTER]
 ... 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] [ENTER]
 - 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] [ENTER]
 ... 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!
# vi /etc/my.cnf.d/server.conf
 [mariadb]に
⇒ character-set-server = utf8mb4 ←を追記
# vi /etc/my.cnf.d/client.conf
 [mariadb]に
⇒ default-character-set = utf8mb4 ←を追記
# systemctl restart mariadb
# mysql -u root -p
MariaDB [(none)]> show variables like "chara%";
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8mb4                    |
| character_set_connection | utf8mb4                    |
| character_set_database   | utf8mb4                    |
| character_set_filesystem | binary                     |
| character_set_results    | utf8mb4                    |
| character_set_server     | utf8mb4                    |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
MariaDB [(none)]> quit;
# yum install phpMyAdmin
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ phpMyAdmin.noarch 0:4.4.15.10-3.el7 を インストール
--> 依存性の処理をしています: php-gd >= 5.3.7 のパッケージ: phpMyAdmin-4.4.15.10-3.el7.noarch
--> 依存性の処理をしています: php-mysqli >= 5.3.7 のパッケージ: phpMyAdmin-4.4.15.10-3.el7.noarch
--> 依存性の処理をしています: php-php-gettext のパッケージ: phpMyAdmin-4.4.15.10-3.el7.noarch
--> 依存性の処理をしています: php-tcpdf のパッケージ: phpMyAdmin-4.4.15.10-3.el7.noarch
--> 依存性の処理をしています: php-tcpdf-dejavu-sans-fonts のパッケージ: phpMyAdmin-4.4.15.10-3.el7.noarch
--> 依存性の処理をしています: php-xmlwriter のパッケージ: phpMyAdmin-4.4.15.10-3.el7.noarch
--> トランザクションの確認を実行しています。
---> パッケージ php-gd.x86_64 0:5.4.16-46.el7 を インストール
--> 依存性の処理をしています: libt1.so.5()(64bit) のパッケージ: php-gd-5.4.16-46.el7.x86_64
---> パッケージ php-mysql.x86_64 0:5.4.16-46.el7 を インストール
--> 依存性の処理をしています: php-pdo(x86-64) = 5.4.16-46.el7 のパッケージ: php-mysql-5.4.16-46.el7.x86_64
---> パッケージ php-php-gettext.noarch 0:1.0.12-1.el7 を インストール
---> パッケージ php-tcpdf.noarch 0:6.2.26-1.el7 を インストール
--> 依存性の処理をしています: php-bcmath のパッケージ: php-tcpdf-6.2.26-1.el7.noarch
--> 依存性の処理をしています: php-composer(fedora/autoloader) のパッケージ: php-tcpdf-6.2.26-1.el7.noarch
--> 依存性の処理をしています: php-posix のパッケージ: php-tcpdf-6.2.26-1.el7.noarch
--> 依存性の処理をしています: php-tidy のパッケージ: php-tcpdf-6.2.26-1.el7.noarch
---> パッケージ php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.26-1.el7 を インストー ル
---> パッケージ php-xml.x86_64 0:5.4.16-46.el7 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ php-bcmath.x86_64 0:5.4.16-46.el7 を インストール
---> パッケージ php-fedora-autoloader.noarch 0:1.0.0-1.el7 を インストール
---> パッケージ php-pdo.x86_64 0:5.4.16-46.el7 を インストール
---> パッケージ php-process.x86_64 0:5.4.16-46.el7 を インストール
---> パッケージ php-tidy.x86_64 0:5.4.16-9.el7 を インストール
--> 依存性の処理をしています: libtidy-0.99.so.0()(64bit) のパッケージ: php-tidy-5.4.16-9.el7.x86_64
---> パッケージ t1lib.x86_64 0:5.1.2-14.el7 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ compat-libtidy.x86_64 0:0.99.0-37.20091203.el7 を インストール
--> 依存性解決を終了しました。
依存性を解決しました
================================================================================
 Package                       アーキテクチャー
                                        バージョン                 リポジトリー
                                                                           容量
================================================================================
インストール中:
 phpMyAdmin                    noarch   4.4.15.10-3.el7            epel   4.7 M
依存性関連でのインストールをします:
 compat-libtidy                x86_64   0.99.0-37.20091203.el7     epel   133 k
 php-bcmath                    x86_64   5.4.16-46.el7              base    58 k
 php-fedora-autoloader         noarch   1.0.0-1.el7                epel   9.6 k
 php-gd                        x86_64   5.4.16-46.el7              base   128 k
 php-mysql                     x86_64   5.4.16-46.el7              base   101 k
 php-pdo                       x86_64   5.4.16-46.el7              base    99 k
 php-php-gettext               noarch   1.0.12-1.el7               epel    23 k
 php-process                   x86_64   5.4.16-46.el7              base    56 k
 php-tcpdf                     noarch   6.2.26-1.el7               epel   2.1 M
 php-tcpdf-dejavu-sans-fonts   noarch   6.2.26-1.el7               epel   257 k
 php-tidy                      x86_64   5.4.16-9.el7               epel    23 k
 php-xml                       x86_64   5.4.16-46.el7              base   126 k
 t1lib                         x86_64   5.1.2-14.el7               base   166 k
トランザクションの要約
================================================================================
インストール  1 パッケージ (+13 個の依存関係のパッケージ)
総ダウンロード容量: 7.9 M
インストール容量: 38 M
Is this ok [y/d/N]: y
Downloading packages:
(1/14): php-bcmath-5.4.16-46.el7.x86_64.rpm                |  58 kB   00:00
(2/14): compat-libtidy-0.99.0-37.20091203.el7.x86_64.rpm   | 133 kB   00:00
(3/14): php-fedora-autoloader-1.0.0-1.el7.noarch.rpm       | 9.6 kB   00:00
(4/14): php-php-gettext-1.0.12-1.el7.noarch.rpm            |  23 kB   00:00
(5/14): php-gd-5.4.16-46.el7.x86_64.rpm                    | 128 kB   00:00
(6/14): php-process-5.4.16-46.el7.x86_64.rpm               |  56 kB   00:00
(7/14): php-mysql-5.4.16-46.el7.x86_64.rpm                 | 101 kB   00:00
(8/14): php-pdo-5.4.16-46.el7.x86_64.rpm                   |  99 kB   00:00
(9/14): php-tcpdf-6.2.26-1.el7.noarch.rpm                  | 2.1 MB   00:00
(10/14): php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.noarch.r | 257 kB   00:00
(11/14): php-tidy-5.4.16-9.el7.x86_64.rpm                  |  23 kB   00:00
(12/14): php-xml-5.4.16-46.el7.x86_64.rpm                  | 126 kB   00:00
(13/14): t1lib-5.1.2-14.el7.x86_64.rpm                     | 166 kB   00:00
(14/14): phpMyAdmin-4.4.15.10-3.el7.noarch.rpm             | 4.7 MB   00:00
--------------------------------------------------------------------------------
合計                                               4.9 MB/s | 7.9 MB  00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : php-xml-5.4.16-46.el7.x86_64                   1/14
warning: Failed to open SELinux handle.
  インストール中          : php-php-gettext-1.0.12-1.el7.noarch            2/14
  インストール中          : php-bcmath-5.4.16-46.el7.x86_64                3/14
  インストール中          : php-process-5.4.16-46.el7.x86_64               4/14
  インストール中          : t1lib-5.1.2-14.el7.x86_64                      5/14
  インストール中          : php-gd-5.4.16-46.el7.x86_64                    6/14
  インストール中          : php-pdo-5.4.16-46.el7.x86_64                   7/14
  インストール中          : php-mysql-5.4.16-46.el7.x86_64                 8/14
  インストール中          : compat-libtidy-0.99.0-37.20091203.el7.x86_6    9/14
  インストール中          : php-tidy-5.4.16-9.el7.x86_64                  10/14
  インストール中          : php-fedora-autoloader-1.0.0-1.el7.noarch      11/14
  インストール中          : php-tcpdf-6.2.26-1.el7.noarch                 12/14
  インストール中          : php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.no   13/14
  インストール中          : phpMyAdmin-4.4.15.10-3.el7.noarch             14/14
  検証中                  : php-tidy-5.4.16-9.el7.x86_64                   1/14
  検証中                  : phpMyAdmin-4.4.15.10-3.el7.noarch              2/14
  検証中                  : php-fedora-autoloader-1.0.0-1.el7.noarch       3/14
  検証中                  : compat-libtidy-0.99.0-37.20091203.el7.x86_6    4/14
  検証中                  : php-tcpdf-6.2.26-1.el7.noarch                  5/14
  検証中                  : php-mysql-5.4.16-46.el7.x86_64                 6/14
  検証中                  : php-pdo-5.4.16-46.el7.x86_64                   7/14
  検証中                  : php-tcpdf-dejavu-sans-fonts-6.2.26-1.el7.no    8/14
  検証中                  : t1lib-5.1.2-14.el7.x86_64                      9/14
  検証中                  : php-process-5.4.16-46.el7.x86_64              10/14
  検証中                  : php-bcmath-5.4.16-46.el7.x86_64               11/14
  検証中                  : php-gd-5.4.16-46.el7.x86_64                   12/14
  検証中                  : php-php-gettext-1.0.12-1.el7.noarch           13/14
  検証中                  : php-xml-5.4.16-46.el7.x86_64                  14/14
インストール:
  phpMyAdmin.noarch 0:4.4.15.10-3.el7
依存性関連をインストールしました:
  compat-libtidy.x86_64 0:0.99.0-37.20091203.el7
  php-bcmath.x86_64 0:5.4.16-46.el7
  php-fedora-autoloader.noarch 0:1.0.0-1.el7
  php-gd.x86_64 0:5.4.16-46.el7
  php-mysql.x86_64 0:5.4.16-46.el7
  php-pdo.x86_64 0:5.4.16-46.el7
  php-php-gettext.noarch 0:1.0.12-1.el7
  php-process.x86_64 0:5.4.16-46.el7
  php-tcpdf.noarch 0:6.2.26-1.el7
  php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.26-1.el7
  php-tidy.x86_64 0:5.4.16-9.el7
  php-xml.x86_64 0:5.4.16-46.el7
  t1lib.x86_64 0:5.1.2-14.el7
完了しました!
# vi /etc/httpd/conf.d/phpMyAdmin.conf
⇒ Require ip 192.168.1.0/24 適宜
⇒ Allow from 192.168.1.0/24 適宜
# vi /etc/phpMyAdmin/config.inc.php 特に無し
# systemctl reload httpd
http://192.168.1.xxx/phpMyAdmin



top