


Red Hat Enterprise Linux Server release 7.3にphpMyAdminをインストールしてみました。
とは言ってもいつも通りyumでインストールしただけなんですが。
必要なrepositoryは下記になります。
・rhel-7-server-rpms
・rhel-7-server-optional-rpms
・epel
phpMyAdminはepel.repoにあります。
- rhel-7-server-optional-rpms有効
- epelインストール
- phpMyAdminの情報
- phpMyAdminインストール
継続して利用するのでデフォルトで有効にしておきます。
1 |
# yum-config-manager --enable rhel-7-server-optional-rpms |
Fedora Projectのepelを利用します。普段は利用しないのでenabled=0にしました。
https://fedoraproject.org/wiki/EPEL
1 |
# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/e/epel-release-7-9.noarch.rpm |
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 |
# yum --enablerepo=epel info phpMyAdmin Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager Available Packages Name : phpMyAdmin Arch : noarch Version : 4.4.15.9 Release : 1.el7 Size : 4.7 M Repo : epel/x86_64 Summary : Handle the administration of MySQL over the World Wide Web URL : https://www.phpmyadmin.net/ License : GPLv2+ and MIT and BSD Description : phpMyAdmin is a tool written in PHP intended to handle the administration of : MySQL over the World Wide Web. Most frequently used operations are supported : by the user interface (managing databases, tables, fields, relations, indexes, : users, permissions), while you still have the ability to directly execute any : SQL statement. : : Features include an intuitive web interface, support for most MySQL features : (browse and drop databases, tables, views, fields and indexes, create, copy, : drop, rename and alter databases, tables, fields and indexes, maintenance : server, databases and tables, with proposals on server configuration, execute, : edit and bookmark any SQL-statement, even batch-queries, manage MySQL users : and privileges, manage stored procedures and triggers), import data from CSV : and SQL, export data to various formats: CSV, SQL, XML, PDF, OpenDocument Text : and Spreadsheet, Word, Excel, LATEX and others, administering multiple servers, : creating PDF graphics of your database layout, creating complex queries using : Query-by-example (QBE), searching globally in a database or a subset of it, : transforming stored data into any format using a set of predefined functions, : like displaying BLOB-data as image or download-link and much more... |
依存関係で必要なプログラムもインストールしてくれます。
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 31 32 33 34 35 36 37 38 |
# yum --enablerepo=epel install phpMyAdmin (snip) Dependencies Resolved ======================================================================================================= Package Arch Version Repository Size ======================================================================================================= Installing: phpMyAdmin noarch 4.4.15.9-1.el7 epel 4.7 M Installing for dependencies: dejavu-fonts-common noarch 2.33-6.el7 rhel-7-server-rpms 64 k dejavu-sans-fonts noarch 2.33-6.el7 rhel-7-server-rpms 1.4 M libtidy x86_64 0.99.0-31.20091203.el7 epel 132 k php-bcmath x86_64 5.4.16-42.el7 rhel-7-server-optional-rpms 57 k php-fedora-autoloader noarch 0.2.1-2.el7 epel 9.0 k php-mbstring x86_64 5.4.16-42.el7 rhel-7-server-optional-rpms 504 k php-mysql x86_64 5.4.16-42.el7 rhel-7-server-rpms 101 k php-php-gettext noarch 1.0.12-1.el7 epel 23 k php-tcpdf noarch 6.2.13-1.el7 epel 2.1 M php-tcpdf-dejavu-sans-fonts noarch 6.2.13-1.el7 epel 257 k php-tidy x86_64 5.4.16-7.el7 epel 23 k Transaction Summary ======================================================================================================= Install 1 Package (+11 Dependent packages) (snip) Installed: phpMyAdmin.noarch 0:4.4.15.9-1.el7 Dependency Installed: dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-fonts.noarch 0:2.33-6.el7 libtidy.x86_64 0:0.99.0-31.20091203.el7 php-bcmath.x86_64 0:5.4.16-42.el7 php-fedora-autoloader.noarch 0:0.2.1-2.el7 php-mbstring.x86_64 0:5.4.16-42.el7 php-mysql.x86_64 0:5.4.16-42.el7 php-php-gettext.noarch 0:1.0.12-1.el7 php-tcpdf.noarch 0:6.2.13-1.el7 php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.13-1.el7 php-tidy.x86_64 0:5.4.16-7.el7 Complete! |
Apache用設定ファイルは下記になります。必要に応じて接続許可IPなどの設定を行います。
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# cat /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 <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> # These directories do not require access over HTTP - taken from the original # phpMyAdmin upstream tarball # <Directory /usr/share/phpMyAdmin/libraries/> Order Deny,Allow Deny from All Allow from None </Directory> <Directory /usr/share/phpMyAdmin/setup/lib/> Order Deny,Allow Deny from All Allow from None </Directory> <Directory /usr/share/phpMyAdmin/setup/frames/> Order Deny,Allow Deny from All Allow from None </Directory> # This configuration prevents mod_security at phpMyAdmin directories from # filtering SQL etc. This may break your mod_security implementation. # #<IfModule mod_security.c> # <Directory /usr/share/phpMyAdmin/> # SecRuleInheritance Off # </Directory> #</IfModule> |