作者: 許老師 日期: 2010-01-21 10:37
最近更新:99.05.20
一、安裝前的準備
請參考此篇的第一~七項 → [按我前往]
清楚易懂!
二、安裝、設定phpmyadmin和mysql
phpmyadmin不要用yum來安裝!
請到官方網站下載新的版本,
解壓縮後的資料夾要放在/var/www/html/ 底下
官方下載點 → [按我前往]
(筆者是下載 phpMyAdmin-2.11.10-all-languages.tar.gz
如果你要下載最新的3.3.3版也可以用)
為什麼要安裝phpmyadmin?
網路上查的結果是:
如果你不裝,
ostube安裝的Step1會無法順利到下一步!
請看下圖的紅框
mysql可用yum來安裝,
裝完後記得要啟動mysql,
#chkconfig mysqld on
#service mysqld start
並設定mysql的root密碼
#mysqladmin -u root password '密碼'
設定phpmyadmin:
#cp /var/www/html/phpMyAdmin/libraries/config.default.php /var/www/html/phpMyAdmin/config.inc.php
#vim /var/www/html/phpMyAdmin/config.inc.php
#vim /var/www/html/phpMyAdmin/config.inc.php
39 行 $cfg['PmaAbsoluteUri'] = ''; 修改成
→$cfg['PmaAbsoluteUri'] = 'http://IP/phpMyAdmin/';
159 行 $cfg['Servers'][$i]['auth_type'] = 'config';修改成
159 行 $cfg['Servers'][$i]['auth_type'] = 'config';修改成
→$cfg['Servers'][$i]['auth_type'] = 'http';
如果此時進入http://你的IP/phpmyadmin,
出現「PHP 5.2+ is required」的字樣,
代表你下載的phpmyadmin版本太新~
請下載2.x版的來裝,
或是更新你的PHP到5.2.13!
(ostube2.6目前和php5.3.x不相容)
PHP更新好之後,
記得要執行下列指令:
#service httpd restart
#service mysqld restart
若出現如下圖的訊息(網頁編碼請改成正體中文才會正常顯示)
通常代表沒有安裝php-mysql 套件,
yum吧!
裝好後,再進入一次 http://你的IP/phpmyadmin
應該可以看到一個要輸入帳密的框框了!
好不容易進入phpmyadmin的網頁,
卻發現下方還有一個錯誤訊息:
代表沒有安裝php-mbstring套件,
yum吧!
裝好後,
#service httpd restart
網頁再按一下重新整理就解決了!
進入phpmyadmin之後,
有一件事情很重要!!
請先新增一個ostube的資料庫,
如下圖的設定,後面的校對一定要選utf8_unicode_ci
這個步驟是為了以後要維護裡面的一個資料表:
ost_media
它記錄所有上傳的多媒體檔案的資訊,
如果你看到這些資訊都是亂碼時,
心裡一定很……
三、調整php.ini 的設定 (數值僅供參考)
# vim /etc/php.ini
max_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 100M
upload_max_filesize = 80M
error_reporting = E_ALL & ~E_NOTICEmax_execution_time = 300
max_input_time = 600
memory_limit = 160M
post_max_size = 100M
upload_max_filesize = 80M
display_errors = On
改完數值後,記得要重啟httpd服務!
P.S.關於 php.ini 這三個數值的設定,官方文件 有以下的說明:
post_max_size integer
Sets max size of post data allowed. This setting also affects file upload.
To upload large files, this value must be larger than upload_max_filesize.
If memory limit is enabled by your configure script, memory_limit also affects
file uploading. Generally speaking, memory_limit should be larger than
post_max_size . When an integer is used, the value is measured in bytes.
Shorthand notation, as described in this FAQ, may also be used. If the size
of post data is greater than post_max_size, the $_POST and $_FILES
superglobals are empty. This can be tracked in various ways,
e.g. by passing the $_GET variable to the script processing the data,
i.e.
沒有留言:
張貼留言