Difference between revisions of "Debian"

From Organic Design wiki
m (Using RAM disk)
m
Line 1: Line 1:
[[File:Debian-logo.svg|100px|right]][http://www.debian.org/intro/about Debian] is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian uses the Linux [http://www.kernel.org kernel] (the core of an operating system), but most of the basic OS tools come from the [http://www.gnu.org GNU project]; hence the name GNU/Linux.
+
[[File:Debian-logo.svg|100px|right]][http://www.debian.org/intro/about Debian] is a free operating system using the [http://www.kernel.org Linux kernel], but most of the basic OS tools come from the [http://www.gnu.org GNU project]; hence the name GNU/Linux. At Organic Design we install Debian on our [[server]]s using the [[install a new server]] [[procedure]], and have been using it for over ten years.
 
 
At Organic Design we install Debian on our [[server]]s using the [[install a new server]] [[procedure]], and have been using it for over ten years.
 
  
 
As of June 2013 we decided to change from [[Ubuntu]] to Debian for our workstations as well since Ubuntu is increasingly becoming the "microsoft of the free software world" with pay software and services at every corner and [http://www.fsf.org/blogs/rms/ubuntu-spyware-what-to-do compulsory spyware] riddled throughout system.
 
As of June 2013 we decided to change from [[Ubuntu]] to Debian for our workstations as well since Ubuntu is increasingly becoming the "microsoft of the free software world" with pay software and services at every corner and [http://www.fsf.org/blogs/rms/ubuntu-spyware-what-to-do compulsory spyware] riddled throughout system.

Revision as of 15:08, 17 June 2013

Debian-logo.svg

Debian is a free operating system using the Linux kernel, but most of the basic OS tools come from the GNU project; hence the name GNU/Linux. At Organic Design we install Debian on our servers using the install a new server procedure, and have been using it for over ten years.

As of June 2013 we decided to change from Ubuntu to Debian for our workstations as well since Ubuntu is increasingly becoming the "microsoft of the free software world" with pay software and services at every corner and compulsory spyware riddled throughout system.

Installation

Debian live boot.png

Installation is covered here and for our typical situation involves downloading the first of the amd64 DVD iso images and copying it onto a memory stick using the following commands from a root shell where X is the number of the device that the USB stick is on which can be obtained from dmesg or df etc. Note that the numbers on the end of devices such as /dev/sda1 refer to the partitions within the device, but the boot record is outside of any specific partition, so the number must be excluded in the command to refer to the device as a whole.

<bash>

umount /dev/sdX cp debian.iso /dev/sdX sync </bash>

Post install checklist

APT

  • subversion
  • git
  • p7zip-full
  • python-qt4

Software center

  • Advanced settings (then add all buttons to windows from shell menu)
  • Geany
  • VLC
  • Pidgin (with OTR and plugin pack and copy backed up .purple after install)
  • Thunderbird (install enigmail and import keys or close, copy and chown backed up .gnupg dir and reboot - and don't forget to set this)
  • Skype
  • Gimp
  • World clock

Other

  • Bitmessage (needs python-qt4 and install the local email client support)

SSD optimisation

I've had one too many mechanical disk failures and have finally decided to move over to SSD. They still have a long way to go as a technology since they still suffer from the major problem of flash technology in general which is that each memory bit can only be written to a thousand times (3 thousand on the most recent technology). So I'm just going to get a small cheap one initially and hopefully in six months or so they'll be longer lasting and more practical sizes. I'll be most likely going for a 120GB Samgsung 840 series, and here's why. Most of the following is taken from SSD optimisation in the Debian wiki, and another good artile here in the Arch Linux wiki.

Swap

Most systems these days have enough RAM that they rarely ever use the swap file at all unless there's a bug that chews up memory. If you have 4GB or more you may as well disable the swap partition completely from /etc/fstab or by installing your OS with no swap in the first place.

Mount options

There are some important mount options that should be enabled in /etc/fstab for the filesystem on SSD paritions. The filesystem should be ext4 not ext3 to work well with an SSD.

  • discard: SSD's use the ATA TRIM command for sustained long-term performance and wear-leveling, but it needs to be activated by adding the discard mount option.
  • noatime: Use this option to prevent logging of read accesses to the file system via an update to the atime information associated with the file.
  • commit=N: Set this to the number of seconds to wait before committing changes to the physical storage. By waiting longer before performing a journal commit multiple writes are often performed in one go. This option is often ised on laptops when running on battery to reduce the number of spinups for the drive saving power.

Using RAM disk

You can move /var/run and /var/lock to a RAM filing system simply by editing /etc/default/rcS and changing the following two lines for RAMRUN and RAMLOCK from no to yes. Note, check mount first some OS's such as Ubuntu already mount these into tmpfs by default.

To mount /tmp and /var/log in RAM. Add these lines to the end of /etc/fstab to mount them in tmpfs (temporary file system):

tmpfs /tmp     tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0

Save, then sudo mount -a and reboot for the changes to take effect. Running df, you should see a new line with /tmp, and /var/log mounted on tmpfs.

Firefox

Firefox downloads webpages from links it thinks you may click. This may make the experience seem faster but really it just bogs down Firefox and your netbook. Type about:config in the address bar, then set network.prefetch-next to false.

You can also move the Firefox cache inro RAM by setting the browser.cache.disk.parent_directory to /tmp which from the configuration above should now be in RAM.

See also