2008年1月8日 星期二

apt套件安裝不完全時的問題 - 被apt鎖住無法移除

Q:使用apt-get指令安裝某個package之後,想要移除卻出現以下訊息
E:could not open lock file /var/cache/apt/archives/lock - open(21 is a directory)
E:unable to lock the download directory

A:
sudo mv /var/cache/apt/archives/lock ~/.
sudo apt-get clean
第一行是將apt的鎖移除
第二行使用apt來移除該package
最好在套件管理程式也將該安裝不完整的package移除

2008年1月7日 星期一

ubuntu PPPoE設定

Ubuntu在DHCP下會自動偵測網路連結,
PPPoE寬頻撥接則需要手動設定。

sudo pppoeconf
注意提示輸入帳號 account 跟密碼 password
之後一直yes就行了。

設定過程中的最後一個問題是
「你是否要開機就自動連上網」
選yes的話就跟DHCP一樣開機就自動上網了。

LAMP

setting LAMP services
Linux os: ubuntu 7.10 Gutsy Gibbon
apache server: apache2

  • sudo aptitude install apache2

MySQL: To install both the server and client:


  • sudo apt-get install mysql-server-5.0
    PHP: php5
    PHP5 and the Apache PHP5 module

    • sudo aptitude install php5 libapache2-mod-php5

    Restart Apache

    • sudo /etc/init.d/apache2 restart

    and we may set web service in /var/www

    Reference: http://ubuntuguide.org/wiki/Ubuntu:Gutsy