Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Debian 7: minimal script

trexostrexos Member

Hello,

a few months ago I found a script which deletes unnecessary packages like apache and samba and so on. IIRC it didn't support Debian 7 yet. I wonder if there is a script which supports Debian 7?

Regards,
Moritz

Comments

  • nerouxneroux Member

    How do you define unnecessary?

  • msg7086msg7086 Member

    You can use the netinst installer which installs the minimal environment.

  • trexostrexos Member

    Yeah well its not really accurate. I mean a script which turns your debian 7 installation into one made with a minimal template. I ask because of of my hoster deleted all minimal templates because of security issues and I dont want to do this all by hand.

  • trexostrexos Member

    @msg7086 said:
    You can use the netinst installer which installs the minimal environment.

    With KVM I do that, but I need something for OpenVZ :)

  • msg7086msg7086 Member

    Install one in kvm or debootstrap, list all existing packages, compare it to a vz installation and remove all differences.

    Well this is the manual way though.

  • NeoonNeoon Community Contributor, Veteran

    apt-get remove apache2

    apt-get remove samba


    apt-get remove ntp

    just like the software name's not that hard.

  • nerouxneroux Member
    edited May 2014

    @Infinity580 said:
    apt-get remove apache2

    apt-get remove samba


    apt-get remove ntp

    just like the software name's not that hard.

    .

    packages like apache and samba and so on.

  • trexostrexos Member

    @Infinity580 said:
    apt-get remove apache2

    apt-get remove samba


    apt-get remove ntp

    just like the software name's not that hard.

    Yeah but its still not possible for me to get nearly to the idleing usage of a minimal template (300MB disk and 6MB rram)

  • NeoonNeoon Community Contributor, Veteran
    edited May 2014
  • netomxnetomx Moderator, Veteran

    Xeoncross one's work good

  • One thing that might help is the harden-servers package. This package conflicts with packages that provide services that might be insecure.

    Do an "apt-cache depends harden-servers | less" to see what it would remove.

  • nunimnunim Member
    edited May 2014
    apt-get purge apache* samba* bind9* sasl* sendmail* exim* 
    shutdown -r

    This typically works for me with any providers template.

    Thanked by 1sonic
  • mikhomikho Member

    @nunim said:

     apt-get purge apache* samaba* bind9* sasl* sendmail* exim* 
    > shutdown -r

    This typically works for me with any providers template.

    Samaba?
    Typo I guess, perhaps samba?

  • nunimnunim Member

    @MikHo said:
    Samaba? Typo I guess, perhaps samba?

    Typo indeed, corrected the original post, thanks.

  • mikhomikho Member

    Good start you got there @nunim

  • earlearl Member

    Minstall seem to support Debian 7

    https://github.com/maxexcloo/Minstall

  • trexostrexos Member
    edited May 2014

    @nunim said:
    Typo indeed, corrected the original post, thanks.

    I currently using this:

    apt-get -y remove --purge apache* apt-get -y remove --purge samba* apt-get -y remove --purge sendmail* apt-get -y remove --purge bind9* apt-get -y remove --purge nscd* apt-get -y remove --purge sasl* apt-get -y remove --purge exim* apt-get -y remove --purge ntp apt-get clean

    Ram usage is 8MB now which is great, but disk usage is about 600MB so it's more than twice as much as a debian minimal template. Can you suggest me any other packages to delete?

  • trexos said: Can you suggest me any other packages to delete?

    Bumping an old thread as it came out easily with a quick google search, to add that usually after you remove all that crap, there are many dependencies that can be removed too.

    apt-get autoremove --purge
    

    Will take care of that. It will clean a few more MB... but won't be enough to bring a clean distro on your server!

  • @trexos said:
    I wonder if there is a script which supports Debian 7?

    DEBIAN_FRONTEND=noninteractive apt-get remove --purge -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" apache2 apache2-doc apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apt-utils bind9 bind9-host bind9utils binutils bsd-mailx bsdmainutils bzip2 ca-certificates console-common console-data cracklib-runtime cron db-util db5.1-util debconf-utils debian-keyring dialog expat fetchmail file finger fontconfig fontconfig-config fonts-freefont-ttf ftp gettext groff-base info install-info iputils-arping iputils-tracepath isc-dhcp-client isc-dhcp-common kbd ldap-utils less libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapt-inst1.5:amd64 libavahi-client3:amd64 libavahi-common-data:amd64 libavahi-common3:amd64 libbind9-80 libcap2:amd64 libcrack2 libcroco3:amd64 libcups2:amd64 libdns88 libfile-copy-recursive-perl libfontconfig1:amd64 libfreetype6:amd64 libgeoip1 libgettextpo0:amd64 libgomp1:amd64 libgssglue1:amd64 libisc84 libisccc80 libisccfg82 liblockfile-bin liblockfile1:amd64 libltdl7:amd64 liblwres80 libmagic1:amd64 libodbc1:amd64 libpaper1:amd64 libpcap0.8:amd64 libperl5.14 libpipeline1:amd64 libpopt0:amd64 libsensors4:amd64 libsnmp-base libsnmp15 libsysfs2:amd64 libtalloc2:amd64 libtdb1:amd64 libtirpc1:amd64 libunistring0:amd64 libwbclient0:amd64 libxml2:amd64 locales-all logrotate lynx lynx-cur m4 make man-db manpages memtester mlocate mtools ncurses-term odbcinst odbcinst1debian2:amd64 openssl openssl-blacklist procmail psutils pwgen rmail rpcbind rsync sasl2-bin screen sendmail sendmail-base sendmail-bin sendmail-cf sendmail-doc sensible-mda sharutils snmp ssl-cert sudo syslinux syslinux-common tcpdump tcsh telnet tofrodos traceroute ttf-dejavu ttf-dejavu-core ttf-dejavu-extra ttf-freefont unixodbc unzip update-inetd uuid-runtime whois wide-dhcpv6-client xinetd; apt-get clean; apt-get remove --purge -y sendmail-base

  • GM2015GM2015 Member
    edited September 2015

    after running all these cleaning tasks, my c1 still has 65 tasks running on it, lol.

                 total       used       free     shared    buffers     cached
    Mem:          2.0G       275M       1.7G        12M        32M       201M
    -/+ buffers/cache:        40M       1.9G
    Swap:           0B         0B         0B
    
    Filesystem      Size  Used Avail Use% Mounted on
    none           1010M     0 1010M   0% /dev
    tmpfs           203M   13M  190M   7% /run
    /dev/nbd0        46G  633M   43G   2% /
    tmpfs          1012M     0 1012M   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs          1012M     0 1012M   0% /sys/fs/cgroup
    
    root@server:~# sudo service --status-all
     [ - ]  bootlogd
     [ - ]  bootlogs
     [ - ]  bootmisc.sh
     [ - ]  checkfs.sh
     [ - ]  checkroot-bootclean.sh
     [ - ]  checkroot.sh
     [ + ]  cron
     [ + ]  dbus
     [ - ]  hostname.sh
     [ - ]  hwclock.sh
     [ - ]  killprocs
     [ + ]  kmod
     [ - ]  motd
     [ - ]  mountall-bootclean.sh
     [ - ]  mountall.sh
     [ - ]  mountdevsubfs.sh
     [ - ]  mountkernfs.sh
     [ - ]  mountnfs-bootclean.sh
     [ - ]  mountnfs.sh
     [ + ]  procps
     [ + ]  rc.local
     [ - ]  rmnologin
     [ - ]  rsync
     [ + ]  rsyslog
     [ - ]  screen-cleanup
     [ - ]  sendsigs
     [ + ]  ssh
     [ - ]  stop-bootlogd
     [ - ]  stop-bootlogd-single
     [ - ]  sudo
     [ + ]  sysstat
     [ + ]  udev
     [ + ]  udev-finish
     [ - ]  umountfs
     [ - ]  umountnfs.sh
     [ - ]  umountroot
     [ + ]  urandom
     [ - ]  uuidd
    
    
Sign In or Register to comment.