===========安裝phpMyAdmin===========
#cd /usr/ports/databases/phpmyadmin
#make install clean
===========編輯httpd.conf=============
//限制phpMyAdmin的使用
#ee /usr/local/etc/apache22/httpd.conf
//最底下加入Alias語法
Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/"
<Directory "/usr/local/www/phpMyAdmin/">
Options none
AllowOverride Limit
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 .example.com
//允許登入的 IP,想讓123.45.x.x的使用者登入,可增加123.45.即可
</Directory>
//更改完成,需重新啟動Apache
#/usr/local/etc/rc.d/apache22 restart
==========設定phpMyAdmin設定檔 config.inc.php==========
#cd /usr/local/www/phpMyAdmin/
#cp libraries/config.default.php config.inc.php
//到安裝資料夾下,複製預設檔案,成為config.inc.php
#ee config.inc.php
//編輯設定檔config.inc.php
//找到
$cfg['PmaAbsoluteUri'] = '';
//可改成$cfg['PmaAbsoluteUri'] = 'http://www.test.com/testadmin';
$cfg['Servers'][$i]['auth_type'] = 'cookie'; //約177行
//將cookie改成http
//存檔完成。