修改OB2D jessie 的sources.list:
vi /etc/apt/sources.list
在 vi 中用 dd 可以刪除整行(用 5dd 可以一次刪除五行)
如果是2019年版的(buster),請改成:
deb https://opensource.nchc.org.tw/debian/ buster main contrib non-free
deb-src https://opensource.nchc.org.tw/debian/ buster main contrib non-free
deb https://opensource.nchc.org.tw/debian/ buster-updates main
deb-src https://opensource.nchc.org.tw/debian/ buster-updates main
deb https://security.debian.org/debian-security buster/updates main contrib non-free
deb https://opensource.nchc.org.tw/debian buster-backports main
如果是2017年版的(stretch),請改成:
deb https://opensource.nchc.org.tw/debian/ stretch main contrib non-free
deb-src https://opensource.nchc.org.tw/debian/ stretch main contrib non-free
deb https://opensource.nchc.org.tw/debian/ stretch-updates main contrib non-free
deb-src https://opensource.nchc.org.tw/debian/ stretch-updates main contrib non-free
deb https://security.debian.org/ stretch/updates main
deb-src https://security.debian.org/ stretch/updates main
這是2016年版的(jessie )
deb https://opensource.nchc.org.tw/debian/ jessie main contrib non-free
deb-src https://opensource.nchc.org.tw/debian/ jessie main contrib non-free
deb https://opensource.nchc.org.tw/debian/ jessie-updates main contrib non-free
deb-src https://opensource.nchc.org.tw/debian/ jessie-updates main contrib non-free
deb https://security.debian.org/ jessie/updates main
deb-src https://security.debian.org/ jessie/updates main
如果是2013年版的(wheezy),請改成:
deb https://opensource.nchc.org.tw/debian/ wheezy main contrib non-free
deb https://opensource.nchc.org.tw/debian/ wheezy-updates main contrib non-free
deb https://security.debian.org/ wheezy/updates main contrib non-free
更新一下apt套件庫清單:
apt-get update
萬一更新後,有出現 There is no public key available for the following key IDs: xxxxxxxxxxxx 的錯誤訊息
請執行以下動作解決之:
apt-get install debian-keyring debian-archive-keyring
apt-key update
如果出現被鎖住的狀況:
E: 無法將 /var/lib/apt/lists/lock 鎖定 - open (11: 資源暫時無法取得)
E: Unable to lock directory /var/lib/apt/lists/
則刪掉lock檔即可
rm /var/lib/apt/lists/lock
2019年後的(buster)安裝php7.3的curl、mail及mbstring函式庫
apt-get install php7.3-curl php7.3-mbstring php7.3-zip php7.3-soap php7.3-mail
2017年後的(stretch)安裝php7的curl及mbstring函式庫
apt-get install php7.0-curl php7.0-mbstring php7.0-zip php7.0-soap
2016年(含以前的)安裝php5的curl及intl函式庫(XOOPS會用到)
apt-get install php5-curl php5-intl php5-zip php5-soap
安裝rsync(方便日後備份)、htop(方便觀察主機狀況)、 fping(設定排程時可能會用到)、 sshfs及nfs(方便遠端掛載備份,無此需求可免裝)、zip(以壓縮)、unzip(以解壓縮)、NTP (校時工具)、安裝ca-certificates,避免wget無法下載https檔但,以及https網址時,Google快速登入會出現錯誤訊息(Google_IOException: HTTP Error: (0) error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs)
apt-get install rsync htop fping sshfs nfs-common zip unzip ntp ntpdate ca-certificates
查詢核心
uname -a
升級核心(非必須)
apt-get install linux-image-4.11.8-ob2d linux-headers-4.11.8-ob2d linux-firmware-image-4.11.8-ob2d
日後要更新套件所有套件:
apt-get upgrade