VPS 第4回 :php と MariaDBをインストールしよう
これも、講座内容の通りでOK
しばらく使っていて、日付を適当にコピペして更新してしまい、日付が分からなくなる事があり、クエリログの設定が必要になりました。
/etc/my.cnf に追記します。
[mysqld]
(略)
general_log=1
general_log_file=/var/log/mariadb/general-query.log
パーミッションはデフォルトで良いようです。
# systemctl restart mariadb
Maria DB はマニュアル通りでしたが、phpMyAdminは失敗したので、Qitaなどを見て、次のように進めました。
(インストール)php は ver7.3 だったので、
# yum install –enablerepo=remi,remi-php73 phpMyAdmin
(設定)インストールされた設定ファイルはマニュアルと異なる形式で、Qita の制限の緩いもので通りました。
# vi /etc/httpd/conf.d/phpMyAdmin.conf
# phpMyAdmin - Web based MySQL browser written in php # # Allows only localhost by default # # But allowing phpMyAdmin to anyone other than localhost should be considered # dangerous unless properly secured by SSL Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin <Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <IfModule mod_authz_core.c> # Apache 2.4 Require all granted ## ↑ Require ディレクティブの引数を「local」から「all granted」に </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory>
(起動)ブラウザから http://(IP_Addr)/phpMyAdmin を入力
ID: root パスワード: MariaDB のもの
でログインできました。
(その他)Alias、SSLはマニュアルの設定でOKでした。https でも、 “このサイトは安全でありません”は出るので、”詳細情報”をクリックして進めるところを迷いました。