2006-08-02 11:05:32Ronald

架設網頁伺服器(Apache+php+MySQL)→Step 2

/**********************************************
以下安裝過程可能會出現選單, 請依需求選擇.
**********************************************/

//安裝apache-2.2.2_1
# cd /usr/ports/www/apache22/
# make install clean

//安裝PHP-5.1.4
# cd /usr/ports/lang/php5/
# make config
# make install clean

//更改設定
# vi /usr/local/etc/apache22/httpd.conf
//增加index.php
DirectoryIndex index.php index.html
//然後在底部加入
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps

//安裝php5-mysql-5.1.4
# cd /usr/ports/databases/php5-mysql/
# make install clean

//安裝php5-extensions-1.0
# cd /usr/ports/lang/php5-extensions/
//選取需要的項目
# make config
# make install clean

//啟動Apache
# rehash
# apachectl start
//開機時自動執行Apache
# vi /etc/rc.conf
//加上apache22_enable="YES"

//安裝phpMyAdmin
//到網頁放置目錄下
# cd /usr/local/www/apache22/data/
# wget http://nchc.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.7.0-pl1.tar.gz
//解壓縮
# tar zxvf phpMyAdmin-2.7.0-pl1.tar.gz
//更改名稱
# mv phpMyAdmin-2.7.0-pl1/ phpMyAdmin
//此時phpMyAdmin網址為 http://your_ip/phpMyAdmin
//更改設定
# cd phpMyAdmin
# vi config.default.php
//修改設定
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = '密碼'; // MySQL password
阿拉 2006-09-08 23:07:59

我在安裝apache-2.2.2_1 時出現ERROR