Quote:
Originally Posted by vzxen
@unSpawn I did try your method and it helped me quite alot. The above is not yet final and if you say its wrong I will do it all over again.
|
I vaguely remember installing Centos-5.5 in a compact matter so I tried it again with a VMware Server guest. Short account follows. Note I use CentOS-5.6-i386-netinstall.iso with text-based install and only selected "Base". Ensure you visit and deselect all other package groups and packages.
On i386 the list of packages to remove then is:
Code:
rpm -e udftools dump rmt nano tree lftp rsync ftp telnet mtr talk nc rsh finger htmlview pinfo dosfstools fbset rdate\
rdist conman parted bluez-gnome mkbootdisk ecryptfs-utils bluez-utils irda-utils system-config-network-tui aspell\
dos2unix aspell-en crash firstboot-tui gamin gamin-python yum-updatesd sos NetworkManager-glib NetworkManager\
desktop-file-utils redhat-menus iptables-ipv6 wireless-tools numactl iptstate cpuspeed eject pam_smb pam_passwdqc\
xorg-x11-filesystem anacron system-config-securitylevel-tui rhpl amtu GConf2 wpa_supplicant notification-daemon\
libnotify dhcpv6-client ipsec-tools pam_ccreds pam_pkcs11 pam_krb5 ifd-egate pcmciautils ORBit2 gpm portmap ppp\
ypbind nfs-utils rp-pppoe yp-tools coolkey libjpeg freetype libICE libSM libtiff cairo libXft pango fontconfig\
gtk2 cups-libs startup-notification libwnck trousers pcsc-lite ccid oddjob oddjob-libs hicolor-icon-theme\
bitstream-vera-fonts libX11 libXext libXrender libXfixes libXcursor libXrandr libXres libXi libXinerama
This should get things down to about 650M.
The list of packages to remove with "--nodeps" is:
Code:
rpm -e --nodeps pax bc time ed redhat-logos
Now run a first 'yum -y update' which brings the size back up to 700M after which you could run:
Code:
rpm -e words specspo kernel-2.6.18-238.el5
Finally I did some liposuction I'd really advice against:
Code:
doLipo() { cd "$1" || exit 1; find ./* -maxdepth 0 -type d | while read DIRNAME; do DIRNAME=$(basename "${DIRNAME}");
case "${DIRNAME}" in "$2") continue;; *) tar -cjf "${DIRNAME}.tar.bz2" "${DIRNAME}" --remove-files && rm -rf "${DIRNAME}";; esac; done
} # End of doLipo
doLipo /usr/share/zoneinfo posix
umask 0027; mkdir /usr/share/doc/fake; doLipo /usr/share/doc; rm -rf /usr/share/doc/fake
doLipo /usr/share/locale/ en_US
...bringing post-install size down to 645M.
Quote:
Originally Posted by vzxen
> what's with the i386 PLUS x86_64?
Thats what I was thinking. Why does CentOS install both arch rpms for some of the packages. e.g. OpenSSL had both i386 and x86_64 RPMs. Is there a way to make a PURE x86_64 system only. I had used the Latest DVD of CentOS x86_64 5.6
|
Apparently this approach is how the North-American Upstream Vendor supports multiarch. The workarounds, unfortunately not usable at install time, comprise of editing /etc/yum.conf and adding the lines:
Code:
exactarch=1
exclude=*.i386 *.i586 *.i686
and always specifying the arch when installing or upgrading as in 'yum install foo.x86_64'.
In closing I would like to emphasize three "rules" that spell success: being the best, using resources well and keeping up with things. Being the best in this case could mean that the product you offer your customers or users fits their needs and maximizes your
profits (if any) or at least minimizes the amount of support you must offer: there is a thin line between minimizing a base install and mutilating it beyond recognition. Using your resources well could mean that you let whatever you use work for you and not against you: if what RHEL slash Centos offers and stands for doesn't work for you do look at other distributions or OSes. Keeping up with things (efficiency, research, or words made hollow by ads like "innovation") for you, and I would strongly urge you to give it some thought, could mean revisiting your core ideas to ensure what you do will keep working for you as you expand and scale up. Fifty times a base install image is okay, three hundred is ridiculous but scaling up to one thousand times is
ludicrous. At least look at other methods available to you like Kickstart (or P2P, CDN or whatever else: I don't know what env your customers are in?).
Good luck!