Convert your Ubuntu/Debian between different versions, like Desktop to Server

There is a very useful tool under Debian/Ubuntu GNU/Linux called tasksel, which can help us “convert” our Debian/Ubuntu between versions.

Install via apt-get/aptitude:

peter@peter-lab ~ $ sudo apt-get install tasksel
[sudo] password for peter:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
tasksel-data
The following NEW packages will be installed:
tasksel tasksel-data
0 upgraded, 2 newly installed, 0 to remove and 46 not upgraded.
Need to get 36.0 kB of archives.
After this operation, 385 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ubuntu.mirror/ubuntu/ trusty/main tasksel-data all 2.88ubuntu15 [6,366 B]
Get:2 http://ubuntu.mirror/ubuntu/ trusty/main tasksel all 2.88ubuntu15 [29.7 kB]
Fetched 36.0 kB in 0s (363 kB/s)
Preconfiguring packages ...
Selecting previously unselected package tasksel-data.
(Reading database ... 229261 files and directories currently installed.)
Preparing to unpack .../tasksel-data_2.88ubuntu15_all.deb ...
Unpacking tasksel-data (2.88ubuntu15) ...
Selecting previously unselected package tasksel.
Preparing to unpack .../tasksel_2.88ubuntu15_all.deb ...
Unpacking tasksel (2.88ubuntu15) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Setting up tasksel-data (2.88ubuntu15) ...
Setting up tasksel (2.88ubuntu15) ...
Processing triggers for menu (2.1.46ubuntu1) ...

and run:

peter@peter-lab ~ $ sudo tasksel

It’ll show you a menu like this:

tasksel_menu
閱讀全文

把 FreeBSD 9.1 的套件管理機制從 pkg 轉到 pkgng

pkgng 是 FreeBSD 10.0 開始才有的套件管理機制

有鑑於 FreeBSD 9.1 上的 “pkg_install EOL is scheduled for 2014-09-01” 訊息不斷跳出來提醒 …

終於決定開始著手轉換至新的套件管理機制

方法參照:5.4. Using pkgng for Binary Package Management

FreeBSD 8.4 以後的版本可以直接執行(更早的版本需手動安裝ports-mgmt/pkg):
/usr/sbin/pkg

然後會出現:

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:

當然就回答 y 繼續
閱讀全文