目標是在僅提供一項服務的實體機器上安裝無頭伺服器。換句話說,伺服器專用於運行單一任務。您也可以將其稱為裸機設備。該服務需要 Oracle/Sun Java 版本 6 或 7。除了降低磁碟空間使用率之外,第二個目標是減少為未使用的元件安裝的安全性更新。結果:重新啟動次數減少,停機時間縮短。
JeOS 已不存在。虛擬機器安裝不適用,因為此安裝將在實體硬體上運行。 Ubuntu-13.10-server-amd64「F4最小安裝」與「openssh-server」和「無人值守升級」仍然消耗942MB。
清除不必要的包後sudo apt-get purge accountsservice apparmor console-setup eject ftp fuse geoip-database info iputils-tracepath iso-codes kbd krb5-locales language-selector-common laptop-detect locales man-db manpages memtest86+ mtr-tiny ntfs-3g os-prober parted plymouth-theme-ubuntu-text popularity-contest ppp pppconfig pppoeconf rsync sgml-base tasksel telnet ufw vim-common xauth xkb-data xml-core
有881MB保持。
如何安裝 ubuntu 或精簡現有安裝以供使用最小硬碟空間?
答案1
1.Ubuntu 核心
安裝後使用說明安裝 Ubuntu Core 需要哪些指令?磁碟上已使用的空間是610MB(使用 測量$ df -h
)。
很大程度上是由於linux核心命令的安裝造成的apt-get update && apt-get install linux-{headers,image}-generic
。根據指令輸出,會導致使用 325 MB 的額外磁碟空間。實際上,執行此命令之前使用的空間為 132 MB,而 apt-get 更新之後使用的空間為 141 MB。因此實際上 Ubuntu Core 13.10 amd64 中的 Linux 核心消耗了 469 MB 的磁碟空間。
The following extra packages will be installed:
crda dmsetup gettext-base grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common iw
libasprintf0c2 libdevmapper1.02.1 libfreetype6 libfuse2 libnl-3-200 libnl-genl-3-200 libssl1.0.0
linux-firmware linux-headers-3.11.0-18 linux-headers-3.11.0-18-generic
linux-image-3.11.0-18-generic linux-image-extra-3.11.0-18-generic os-prober ucf wireless-regdb
The following NEW packages will be installed:
crda dmsetup gettext-base grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common iw
libasprintf0c2 libdevmapper1.02.1 libfreetype6 libfuse2 libnl-3-200 libnl-genl-3-200 libssl1.0.0
linux-firmware linux-headers-3.11.0-18 linux-headers-3.11.0-18-generic linux-headers-generic
linux-image-3.11.0-18-generic linux-image-extra-3.11.0-18-generic linux-image-generic os-prober
ucf wireless-regdb
2.反引導程式
Ubuntu 安裝程式使用的實用程式是
debootstrap
.
https://help.ubuntu.com/12.04/installation-guide/powerpc/linux-upgrade.html
AHardy debootstrap minbase 安裝為 142M在df -h
尺寸方面。根據哪個佔用的空間比較少:debootstrap 還是 Ubuntu Core?12.04 debootstrap 安裝大小為 205M。
Fedora 的對應版本debootstrap
名為febootstrap
.它的作者 - Richard WM Jones - 寫了一篇有趣的部落格文章,他在其中描述了如何減少225M最小 febootstrap 到38M。這個小型裝置甚至可以進一步縮小16M當願意釋放 RPM 資料庫(=更新)、區域設定、時區等。