phpMyAdmin MySQL、MariaDB、およびDrizzleサーバーを管理するためのWebベースの管理ツールです。作成、削除、クエリ、テーブル、列、リレーション、インデックス、ユーザー、権限などのデータベースアクティビティの実行に役立ちます。
このガイドは、phpMyAdminを Fedora 27にインストールするのに役立ちます / Fedora 26 /25。
phpMyAdminをインストール
次のコマンドを使用してphpMyAdminをインストールします。
dnf -y install phpmyadmin httpd
phpMyAdminを構成する
デフォルトでは、phpMyAdminはWeb設定ファイルを /etc/httpd/conf.dに配置します ディレクトリ;ルールとアクセス許可があります。 phpMyAdminには、ローカルホストからのみアクセスできます。これを変更するには、 phpMyadmin.confファイルを編集する必要があります。
Fedoraでは、Webアクセスは mod_authz_core.cによって管理されます。 モジュール;そのため、変更しても通常の許可または拒否ルールは機能しません。
vi /etc/httpd/conf.d/phpMyAdmin.conf
デフォルトの設定は次のようになります。
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 <RequireAny> Require ip 127.0.0.1 Require ip ::1 </RequireAny> </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> <Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require ip 127.0.0.1 Require ip ::1 </RequireAny> </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>
Requireip127.0.0.1およびRequireip::1をコメントアウトしてください 次に、すべての許可を要求するを追加します コメント行のすぐ下。以下のようになります。
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 <RequireAny> # Require ip 127.0.0.1 # Require ip ::1 Require all granted </RequireAny> </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> <Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> # Require ip 127.0.0.1 # Require ip ::1 Require all granted </RequireAny> </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>
Apacheサービスを再起動します。
systemctl restart httpd
外部ネットワークからのHTTPリクエストを許可するようにファイアウォールを構成します。
firewall-cmd --permanent --add-service=http firewall-cmd --reload
phpMyAdminにアクセス
ブラウザからphpMyAdminにアクセスします。URLは
になります。 http:// your-ip-address / phpMyAdminルート(データベース管理者)またはDBユーザーとしてログインします。
データベースページが表示されます。
それで全部です。これがお役に立てば幸いです。コメントをお待ちしております。