サーバーTips

[root@multi html]# cd /usr/local/src
[root@multi src]# wget https://files.phpmyadmin.net/phpMyAdmin/5.1.3/phpMyAdmin-5.1.3-all-languages.tar.gz
[sekigawa@multi src]# tar xvf phpMyAdmin-5.1.3-all-languages.tar.gz
[sekigawa@multi src]# mv /mnt/dsk1/www/html/phpMyAdmin /mnt/dsk1/www/html/phpMyAdmin.bak
[sekigawa@multi src]# mv phpMyAdmin-5.1.3-all-languages /mnt/dsk1/www/html/phpMyAdmin
[sekigawa@multi src]# cd /mnt/dsk1/www/html/phpMyAdmin
[sekigawa@multi src]# mkdir tmp
[sekigawa@multi src]# chown -R apache:apache tmp
[sekigawa@multi src]# chmod 700 tmp
[sekigawa@multi src]# mysql -u root -p < /mnt/dsk1/www/html/phpMyAdmin/sql/create_tables.sql
[sekigawa@multi src]# mysql -u root -p
MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY '任意のパスワード';
MariaDB [(none)]> FLUSH PRIVILEGES;
[sekigawa@multi src]# openssl rand -base64 32
lqT8zGjhsI7RXWIU3VobTCejjxiZ84GbUwrVMOPmq7w=
[sekigawa@multi src]# vi config.inc.php
<?php
/* blowfish_secret は 32 文字以上のランダムな文字列にしてください */
$cfg['blowfish_secret'] = 'lqT8zGjhsI7RXWIU3VobTCejjxiZ84GbUwrVMOPmq7w=';

//$i = 0;
$i = 1;
$cfg['ServerDefault'] = 1;

/* 基本的なサーバー設定 */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

/* 環境保存領域(pmaユーザーが存在し、phpmyadmin DBがあることが前提) */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '任意のパスワード';
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';

/* テンポラリディレクトリ(Apacheが書き込めること) */
$cfg['TempDir'] = 'tmp';

/* ファイルアップロードなどに使う一時保存用パス(任意) */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
[sekigawa@multi src]# systemctl restart httpd

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS