24h購物| | PChome| 登入
2006-08-02 11:05:32| 人氣124| 回應1 | 上一篇 | 下一篇

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

推薦 0 收藏 0 轉貼0 訂閱站台

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

//安裝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

台長: Ronald
人氣(124) | 回應(1)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類 | 個人分類: FreeBSD |
此分類下一篇:更新Ports tree的新方法→csup
此分類上一篇:架設網頁伺服器(Apache+php+MySQL)→Step 1

阿拉
我在安裝apache-2.2.2_1 時出現ERROR
2006-09-08 23:07:59
是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文