phpMyAdmin のインストール

インストール

phpMyAdmin は、mysql(MariaDB) をブラウザで管理するツールです。

# yum -y install --enablerepo=remi,remi-php72 phpMyAdmin

nginxの設定

HTTPS 通信にし、他人からアクセス出来ないように IP 制限を付けます。

/etc/nginx/conf.d/myhttps.conf
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
server {
    listen                  443 ssl;
    ssl_certificate         /etc/nginx/ssl/server.crt;
    ssl_certificate_key     /etc/nginx/ssl/server.key;
    server_name             localhost;
    root                    /var/www-ssl;
    index                   index.php index.html index.htm;
 
    # アクセス制限(ローカルのみ許可)
    allow                   192.168.3.0/24;
    deny                    all;
 
    # phpMyAdmin
    location /tools/phpMyAdmin {
        alias               /usr/share/phpMyAdmin;
        index               index.php;
 
        location ~ ^/tools/phpMyAdmin/(.+\.php)$ {
            alias           /usr/share/phpMyAdmin/$1;
            fastcgi_pass    127.0.0.1:9000;
            fastcgi_index   index.php;
            fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include         fastcgi_params;
        }
    }
}

centos/v7/phpmyadmin_のインストール.txt · 最終更新: 2020/04/11 05:18 by admin
 
特に明示されていない限り、本Wikiの内容は次のライセンスに従います: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki