1.安裝 Apache2 + php5
首先,把Ubuntu 10.04 灌好。
然後用 Synaptic 來安裝以下套件:
apache2
php5
php5-gd
php5-curl
libapache2-mod-php5
php5
php5-gd
php5-curl
libapache2-mod-php5
安裝完畢後,讓 Apache2 重新啟動一下比較保險 :
sudo /etc/init.d/apache2 restart
進入/var/www 資料夾中 vi phptest.php 在裡面輸入:
<? phpinfo(); ?>
接著存檔,用瀏覽器測試 http://127.0.0.1/phptest.php
如果看到這個畫面就代表php設定完成了。
但如果你發現瀏覽器沒出現這些php資訊,反而是詢問你要不要下載這個檔案,
那你可能要重安裝一下php5;
或者是按照下面這樣做 :
(會發生這種情況有可能是php模組沒有啟動)
sudo a2ensite php5 sudo /etc/init.d/apache2 restart如果還不行可能要再查一下真正出錯的原因。
2.安裝 noip2
首先,去 http://www.no-ip.com 申請no-ip的帳號、並且設定 :
申請帳號完畢後,進入使用者管理介面/Hosts Redirects/Add Host 設定自己的Domain Name
用 Synaptic 搜尋 noip2 並安裝。

安裝結束後會看到這個畫面 :
設定完後按下一步。
List of hosts or groups 這邊就輸入剛剛申請的Host Name
Network device Name 如果用ADSL連線的話,應該是"ppp0"
接著開啟終端機設定它的domain...
andy@andy-Server:/$ sudo noip2 -C Auto configuration for Linux client of no-ip.com. Please enter the login/email string for no-ip.com XXXXXX@kimo.com.tw //輸入帳號 Please enter the password for user 'XXXXXX@kimo.com.tw' **** //輸入密碼 Only one host [XXXXXX.no-ip.org] is registered to this account. It will be used. Do you wish to run something at successful update?[N] (y/N) n //輸入N New configuration file '/var/lib/noip2/noip2.conf' created. //的設定檔產生在這個路徑下
輸入這個指令可以查看設定檔有沒有設定好
andy@andy-Server:/$ sudo noip2 -S 1 noip2 process active. Process 6960, started as noip2 , (version 2.1.9) Using configuration from /var/lib/noip2/noip2.conf Last IP Address set 59.xxx.xxx.xxx Account XXXXXX@kimo.com.tw configured for: host XXXXXX.no-ip.org Address check every 1 minute, directly connected via /dev/ppp0. andy@andy-Server:/$
這樣就設定成功了。
可以測試一下~
沒有留言:
張貼留言