Page 1 of 4

Raspbian Server Edition?

Posted: Thu Aug 16, 2012 7:32 pm
by thenewguy
Raspbian looks really nice. That being said, it seems to be designed with desktop use in mind. I think the Raspberry Pi would make a really good little headless server. Are there any plans to create a Server Edition of Raspbian? Something that would just have the basic GNU utilities and OpenSSH running?

Re: Raspbian Server Edition?

Posted: Thu Aug 16, 2012 7:36 pm
by Jim JKla
The Wheezy image starts as command line and only starts the Gui desktop manually

All you would need to do is remove the X window stuff it does not need.

ssh on wheezy is started by default.

Look at the noob stuff on the wiki

Re: Raspbian Server Edition?

Posted: Thu Aug 16, 2012 7:43 pm
by thenewguy
I realize these things, my issue isn't a question of functionality so much a size. I could download and set up a full Raspbian image, but I think some people (such as myself) would appreciate starting with a smaller download. There is something nice about being able to start from the ground and build up from it, rather than starting with everything and trimming it down.

Re: Raspbian Server Edition?

Posted: Thu Aug 16, 2012 7:59 pm
by Jim JKla
Someone may yet write a quick noob viable version. ;)

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 6:11 am
by SirLagz
I'm actually in the process of creating just this :)
It'll come with instructions on how to strip out EVERYTHING that you don't need from the default wheezy install, as well as a download image to burn onto a SD card.

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 6:27 am
by Jim JKla
SirLagz wrote:I'm actually in the process of creating just this :)
Looking forward to this it would be a good addition to the wiki. ;)

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 6:39 am
by fos
I have a LAMP development system running on my RPi. It was easy to set up. When I get home from work this evening, I'll list the packages you need to apt-get. Everything is available.

Jeff

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 6:45 am
by SirLagz
fos wrote:I have a LAMP development system running on my RPi. It was easy to set up. When I get home from work this evening, I'll list the packages you need to apt-get. Everything is available.

Jeff
Did you strip stuff before you installed the LAMP packages ?

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 9:39 am
by Evilbadger
jerry.tk did make an installer for Raspbian based upon the Debian installer, and you could use that to install just a base system.

Installer thread: http://www.raspberrypi.org/phpBB3/viewt ... =66&t=6532

Detailed instructions: http://www.raspbian.org/RaspbianInstaller

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 2:48 pm
by SirLagz
Unfortunately that does take a while as it's essentially a net-install.
I find that it's faster burning an image and them removing the excess baggage.

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 4:01 pm
by Jim JKla
Unless we get an image on the download page. ;)

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 4:13 pm
by SirLagz
Almost done :)
got 277 packages removed so far.
Size is down to 460 megabytes at the moment, seeing what else I can strip.

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 7:01 pm
by SirLagz
Aaaand it's done uploading
http://sirlagz.net/?p=650
Give it a shot and see how you go.
I would be very happy if anyone has any feedback for me.

Thanks !

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 11:44 pm
by Baldrick1
While a smaller OS is fantastic, the question I have is will less packages being installed mean the Pi is using less resources or is it purely a space thing?

Apologies if its a bad question but I'm fairly new to Linux. I know that on Windows, in theory you can have as much installed as you want and it'll run at the same speed unless you start making use of the installed apps. However, the reality is that you get all sorts of auto starting services and so on that slow the machine down when you have loads installed. Is this the same or different with Linux in general and/or a cut down Raspbian server edition?

Re: Raspbian Server Edition?

Posted: Fri Aug 17, 2012 11:53 pm
by thenewguy
There probably won't be any speed difference, unless some services are removed too. The benefits are mostly in download size, disk space used and reduced bandwidth needed for updates.

Re: Raspbian Server Edition?

Posted: Sat Aug 18, 2012 12:27 am
by MmmPi
It should be faster. The idea here is a Server Edition thats had its desktop removed. You control it by remote. No desktop, more resources available for other things.

@SirLagz : No, Thank you! :D

Re: Raspbian Server Edition?

Posted: Sat Aug 18, 2012 1:11 am
by SirLagz
IIRC I did remove a few services that were related to X so memory usage should go down by a bit.

Also, download size has stayed a similar size for now. I kept the image at 2 gigs, however i will hopefully be cutting it down more tonight and resizing the image itself.

If anyone has installed it and notice any other packages that could be stripped, feel free to shoot me a pm or comment on my blog and i can strip it down further

Re: Raspbian Server Edition?

Posted: Sun Aug 19, 2012 8:24 pm
by MoonTEC
SirLagz wrote:IIRC I did remove a few services that were related to X so memory usage should go down by a bit.
Also, download size has stayed a similar size for now. I kept the image at 2 gigs, however i will hopefully be cutting it down more tonight and resizing the image itself.
If anyone has installed it and notice any other packages that could be stripped, feel free to shoot me a pm or comment on my blog and i can strip it down further
In Your image there are modules for cutdown kernel version and full kernel. You can leave just for full kernell if using it. When preparing images for downloading, it is good practice to zerofill freespace for better compression. More details in post from a highly respected mpthompson.
When I was checking all posted tutorials in forum, made raspbian test image to fit 1GB SD card. With XBMC, Quake3(including demo packs), nginx, php5-fpm, owncloud, rpi-update, links, htop, tmux, mocp, mc, localepurge and etc. Removing locales saves a lot of space. Download size was less than 200MB. My raspi is self hosting it on http://valkam.net/raspbian/. Now I'm using raspi also for:
* private git server with gitolite,
* data mining server with sqlite3 db, wget, bash and awk scripts
* playing internet radio streams
All at same time and there are still a lot free resources. I love it.

Re: Raspbian Server Edition?

Posted: Sun Aug 19, 2012 8:39 pm
by thenewguy
Just want to chime in here with the "zero fill" suggestion. I've found an easy way to make sure an image file is filled with zeros (and therefor compresses better) is to create a new, empty image and copy your data into it. For example

dd if=/dev/zero of=new_image.img bs=1000000 count=2000
mount original_image.img Old_Image
mount new_image New_Image
cp -R Old_Image/* New_Image
umount Old_Image
umount New_image

I've found the copy command makes efficient use of the available space, making the new image compress better.

Re: Raspbian Server Edition?

Posted: Mon Aug 20, 2012 1:55 am
by SirLagz
Thanks for that guys, I'll cut it down when I get home :)

Re: Raspbian Server Edition?

Posted: Mon Aug 20, 2012 1:35 pm
by thenewguy
thenewguy wrote:Just want to chime in here with the "zero fill" suggestion. I've found an easy way to make sure an image file is filled with zeros (and therefor compresses better) is to create a new, empty image and copy your data into it. For example

dd if=/dev/zero of=new_image.img bs=1000000 count=2000
mount original_image.img Old_Image
mount new_image New_Image
cp -R Old_Image/* New_Image
umount Old_Image
umount New_image

I've found the copy command makes efficient use of the available space, making the new image compress better.
Sorry, I missed a step. After the "dd" line there should be a command creating a file system for the new image. Something like

mkfs.ext3 new_image

Re: Raspbian Server Edition?

Posted: Mon Aug 20, 2012 2:30 pm
by SirLagz
No problems, I know how to do it :)
Just didn't think of it at the time

Re: Raspbian Server Edition?

Posted: Mon Aug 20, 2012 5:13 pm
by SirLagz
New version of Raspbian Server Edition (RSE)

Main changes -
I've zeroed the image, made it into a 1 gig image, the download is now around 100 MB
I've also re-added raspi-config back into the image, and added a few options for RSE. Not much at the moment but I'm open to suggestions.

Try it out, see what you think !

Thanks !

Re: Raspbian Server Edition?

Posted: Fri Aug 24, 2012 3:33 am
by nickstewartroc
Running the RSE v2 atm. Running great so far! So far the only thing I've had to do is do a apt-get install sudo
Other than that, Awesome work! :D

-Nick

Re: Raspbian Server Edition?

Posted: Fri Aug 24, 2012 7:22 am
by SirLagz
Thanks :)
I'll be sure to add sudo back into the next version :)