Debian installation on Magnia SG20
I downloaded the 180 MB ISO image for Debian 5.
I created a VMware machine with
- "Other Linux with 2.6 kernel"
- 512 MB of RAM
- 1 GB IDE drive - after installation I will transfer everything to Compact Flash.
- 2 network interfaces
I booted from the ISO image and installed a basic Debian image. I accepted most defaults.
- Time zone - Pacific
- Partitioning - I created a single 1GB partition (no swap space)
- Filesystem changed from 'EXT3 journalled' to EXT2
- Use archive at osuosl.org
- "Standard" installation (I want to decide what packages to install later.)
The CF will be mounted read-only most of the time to increase its longevity. Therefore I don't want a swap space on the CF drive and I don't want journalling on the CF drive.
I am assuming there will be a CF adapter in IDE slot 0 and a 2.5" drive in IDE slot 1 The system will spin down the hard drive when it is not in use. I will do everything I can to minimize hits on this drive to prolong its lifespan.
What this server will be used for
The primary function is to implement an asterisk phone system. Beyond that I'd like to set up a web-based system for tracking volunteer hours. I have an idea that volunteers will be able to log in and out either via Web page or phone, and when they are logged in they can receive phone calls on the phone they logged in on. When they are logged out they can receive voice mail messages. A web page will show who is logged in and where.
- Phone system - Asterisk
- Intranet Web server - cherokee with php
- Database? - I will avoid needing one. A DBMS will generate too much uncontrolled disk i/o.
- File and print services - Samba
- System management - Webmin, openvpn, ddclient
Webmin will be used locally by staff to perform simple administrative operations. Openvpn will be set up so that I can get secure remote access to the server from my home. Using Openvpn means I will have to set up dynamic dns updates so I will install ddclient.
Packages
After the initial install, 504 MB of disk space were in use. The space usage as configure below is about 530 MB
I added packages, cleaned things up, and rebooted.
apt-get install asterisk festival samba ntp apt-get install cherokee php5-cgi apt-get --purge remove bind9-host apt-get install openssh-server rsync apt-get install openvpn ddclient dnsmasq apt-get install hdparm smartmontools apt-get autoremove apt-get clean reboot
On reboot I noticed NFS file sharing was enabled. I removed the packages. I don't like exim4 email so I removed that and replaced it with postfix.
apt-get --purge remove exim4 portmap nfs-common apt-get install postfix
I chose "no configuration" for postfix, I will set it up myself later.
Hard disk
I wanted the second hard drive to be a physical drive, not a CF card, so that it can be used to store data files, voice mail, etc.
So I added an 8GB hard drive to the virtual machine and moved the /var partition over there. I created two partitions on the hard drive. The first is swap space. The second will be /var. I moved the home directory tree and made a symlink for convenience; you could create a separate partition for home. I don't plan to have any normal user accounts on this system so I don't feel it needs to be a separate space.
telinit 1 fdisk /dev/hdb mkswap /dev/hdb1 mke2fs -j /dev/hdb2 mount /dev/hdb1 /mnt cd /var tar cf - * | (cd /mnt; tar xpf -)
Move the old /var directory so the new one can be mounted in its place
umount /mnt cd / mv var var.old mkdir var mount /dev/hdb2 /var
Add a line to /etc/fstab to mount the new /var partition
echo "/dev/hdb1 swap swap defaults 0 0" >> /etc/fstab echo "/dev/hdb2 /var ext3 defaults 0 0" >> /etc/fstab
Make sure things are still working
reboot
Now you can safely remove the old var tree if you want
cd / rm -rf var.old
Moving home directory and creating a symlink
cd /var mkdir home mv /home/* home cd / rmdir home ln -s /var/home
Moving tmp to /var/tmp
cd / tar cf - tmp | (cd /var; tar xpvf -) rm -rf tmp ln -s /var/tmp
This moved about 200 MB from my root filesystem to the hard drive, leaving the CF image at about 455 MB.
Reducing disk access
Swap space is in the hard disk but hopefully seldom is ever used. We should have enough RAM to run everything without any paging.
Setting disk spin down
Logging
Using a RAM disk Should /var/run be on a RAM disk?
LCD program
I added the SG20 lcd program; see Magnia LCD for details.
External sound system
My Chintimini application calls for being able to hear incoming phone calls on a speaker. I am not sure how to do that yet. USB speaker?