Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Minimal Ubuntu server

  1. #1
    Join Date
    Oct 2008
    Beans
    12

    Minimal Ubuntu server

    Hi All,

    I am trying to build a minimal Ubuntu server that acts as a base server for many applications. I need this server to be not mroe than 200MB after the minimal installation.

    Base installation for Ubuntu server still comes up close to 600MB.

    I have tried JeOS, but unfortunately this is meant for VMware appliaces only.

    I have built a minimal server, from Ubuntu Desktop live CD, using debootstrap and that worked fine but still it was around 310MB.

    Is there a way to build a Ubuntu server from the ground up that only has the absolutely necessary packes and then we can add more packages when needed using apt-get?

    I am not interested in spliTaz and Archlilnux etc....

    Any feedback or pointers are appreciated.

    Thanks

  2. #2
    Join Date
    Aug 2008
    Location
    Washington DC
    Beans
    2,186
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Minimal Ubuntu server

    here is what I would do:

    Install the base server.

    Use dpkg to removethe packages that you don't need:

    this command will sort them by size:

    dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n

    ref: http://www.pixelbeat.org/docs/packaging.html

    then clone your disk if you want to install it on other machine:

    ref: http://ask.metafilter.com/69793/How-...ger-hard-drive

  3. #3
    Join Date
    Jun 2008
    Location
    New York, USA
    Beans
    777
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Minimal Ubuntu server

    Quote Originally Posted by yesmat View Post
    Hi All,

    I am trying to build a minimal Ubuntu server that acts as a base server for many applications. I need this server to be not mroe than 200MB after the minimal installation.

    Base installation for Ubuntu server still comes up close to 600MB.

    I have tried JeOS, but unfortunately this is meant for VMware appliaces only.

    I have built a minimal server, from Ubuntu Desktop live CD, using debootstrap and that worked fine but still it was around 310MB.

    Is there a way to build a Ubuntu server from the ground up that only has the absolutely necessary packes and then we can add more packages when needed using apt-get?

    I am not interested in spliTaz and Archlilnux etc....

    Any feedback or pointers are appreciated.

    Thanks
    Check out this link:

    http://www.howtoforge.com/minimal-ub...server-install

    I've done this several times... the instructions work fine.

    You will find that there are a few things missing (no NTP, no MAN pages and no SSH for remote admin) - but of course you can always add those later with apt-get install.

    You also have to ADD the proper entries to /etc/network/interfaces (specifically, the lines for 'eth0' - highlighted in red).

    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet dhcp
    If you install on one machine and move the disk to another, BE SURE to also clear any network entries from '/etc/udev/rules.d/70-persistent-net.rules' so that your eth0 device works. If you install on one machine, that file contains the MAC address for the install machine (linked to eth0). Moved to another machine, it will try to link up the new MAC address to 'eth1" which has no entry and therefore you won't get a network connection.

    Good luck!

    -- Roger
    Last edited by Krupski; October 1st, 2008 at 02:35 PM.
    Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  4. #4
    Join Date
    Oct 2008
    Beans
    12

    Re: Minimal Ubuntu server

    Hi Krupski,

    This what I did. It works fine but this install comes to 300MB as I mentioned in my post. Any suggestions to have a smaller build? around 100MB?

    Thanks

  5. #5
    Join Date
    Oct 2008
    Beans
    12

    Re: Minimal Ubuntu server

    Hi Iponeverything,

    these commands and references are very useful. Many thanks for that. I will try this to see if I can remove some of the packages that i don't need and see what happens.

    Once I achieved the ideal size, then clone or use G4L to create an iso that I can repliacate.

    Thanks

  6. #6
    Join Date
    Aug 2008
    Location
    Washington DC
    Beans
    2,186
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Minimal Ubuntu server

    also don't forget to do a "dpkg clean", and to fix your logrotate scripts so that a chatty process does not fill up your partition..

  7. #7
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Minimal Ubuntu server

    Easy. Set up a FreeBSD server. The footprint will definitely be less than 200MB.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  8. #8
    Join Date
    Aug 2008
    Location
    Washington DC
    Beans
    2,186
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Minimal Ubuntu server

    The only disadvantage that I could see to that is I know my way around linux so well that I can work without a monitor. On FreeBSD I would have spend a fare amount of time looking up how to do things in google.

    Admittedly, that would be a small price to pay if FreeBSD was the right tool for the job.

  9. #9
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Minimal Ubuntu server

    Actually, most of the commands are the same, and the manuals for the *BSDs are very good compared to the Linux man pages. The ports system is a really nice package management system, and easy to learn and use.

    Here are some good resources to get started or check it out before you commit:

    Forums (VERY good resource):

    daemonforums.org

    FreeBSD handbook:

    http://www.freebsd.org/doc/en_US.ISO...ooks/handbook/

    Main site:

    www.freebsd.org

    How To:

    http://freebsdhowtos.com/


    Don't be afraid to ask me either. I can help you get started. The thing I like best about the *BSDs is that there is nothing loaded in the OS that you don't need. You build in what YOU want and the footprint is VERY small. It's also more stable than Linux, and of course Linux is pretty darn stable.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  10. #10
    Join Date
    Jun 2008
    Location
    New York, USA
    Beans
    777
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Minimal Ubuntu server

    Quote Originally Posted by iponeverything View Post
    this command will sort them by size:

    dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
    I have a question... from the list resulting from the above command... how does one know what they can safely remove?

    I imagine creating a dependency nightmare by removing the wrong file(s)!
    Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •