在Ubuntu 7.10中安裝phpmyadmin其實很簡單,由於是第一次安裝,不免遇到點麻煩。
1.首先確保已經安裝了php5-mcrypt包,否則的話會出現“cannot load mcrypt extention”錯誤
sudo apt-get install php5-mcrypt
找不到php5-mcrypt包嗎?那肯定是沒有勾選universe源(係統->係統管理->軟件源->Ubuntu軟件->社區維護的開源軟件(unniverse)
2.將phpMyAdmin-2.11.4-rc1-all-languages-utf-8-only.tar.gz復制到/var/www目錄下
sudo cp /media/cdrom/phpMyAdmin-2.11.4-rc1-all-languages-utf-8-only.tar.gz /var/www
3.解壓
sudo tar zxvf phpMyAdmin-2.11.4-rc1-all-languages-utf-8-only.tar.gz
4.網上資料說要編輯config.inc.php,但我卻找不到,祇有一個config.sample.inc.php的文件,後來查看目錄中的 Documentation,裡面說“Creating a config.inc.php file......To manually create the file......you can copy config.sample.inc.php to get minimal configuration file”意思就是說要自己動手創建一個config.inc.php文件,但可以以config.sample.inc.php為模版來快速創建,哈,怪不得我改了半天config.sample.inc.php都冇反應,原來phpmyadmin祇認config.inc.php,那復制一份不就得了嘛。
sudo cp config.sample.inc.php config.inc.php
5.還要改一下裡面的$cfg['blowfish_secret'] =''行,隨便填點東西進去,網上說一般寫自己的網站,比方說“www.aborigine.cn”,一定要填,否則會出現“配置文件現在需要絕密的短語密碼(blowfish_secret)”錯誤,那是因為$cfg['Servers'][$i]['auth_type'] = 'cookie'的緣故,具體有什麼用,有待研究^_^
6.到此就可以了,其牠什麼都不用改了,用浏覽器打開目錄就會出現登錄界面。