Fit-PC

From the factory – Initial Impressions 5 Jan 2008

For a 500MHZ CPU it performed as you would think. I bit slow to open/close apps and rendering websites. Video playback from the samples they provided did great.

The Bad

The audio only came out of the left speaker. I found this post
http://fit-pc.com/forum/viewtopic.php?t=227&highlight=audio
in the Fit-PC forums and it helped. However, I had to do it several times and finally I made the adjustments while the unit was powered on, not recommended, and kept testing it while putting the back plate back together.

I may have sent it back if I wasn’t going to use this as a server. Hopefully they fix this part or decide to use another in the near future. If I were using this as a multimedia device that required sound I would have sent it back.

Update

Fit-PC sent everyone from that forum new cables to install. You also had the option of sending you unit back to them to fix. I haven’t done mine yet, since I don’t use audio, but did receive my cables.

Pre Install 4 Jan 2008

GParted

Partition #1, ext3, /dev/hda1 – 3.26GB
Partition #5, swap, /dev/hda3 – 768.74MB, (3*memory) for good measure
Partition #6, ext3, /dev/hda2 – 33.25GB, for /home dir

Later I added a partition for /www and /mysql @ 9GB

Post Install 4 Jan 2008

Remove the CD drive from apt get

sudo nano /etc/apt/sources.list

Comment out the CDROM stuff at the top. This way it won’t ask you for your installation CD, “Media change”, and will download the stuff you need. Now you can trash that ISO or CD.

Configure Network 5 Jan 2008

Edit

sudo nano /etc/network/interfaces

auto eth0
iface eth0 inet static address 192.168.1.68 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.254

Restart

sudo /etc/init.d/networking restart

Edit /etc/hosts

sudo /etc/hosts

Add following:
192.168.0.100 fitwit.gorelog.net fitwit

echo fitwit.gorelog.net > /etc/hostname /etc/init.d/hostname.sh restart

OpenSSH 4 Jan 2008

sudo apt-get install ssh openssh-server

Edit

sudo nano /etc/ssh/sshd_config

Set the following

Port XXXX (non default port #)
Protocol 2
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
PermitRootLogin no
X11Forwarding no
AllowUsers administrator

Restart

sudo /etc/init.d/ssh restart

Resources

http://fosswire.com/2008/01/02/bullet-proof-your-server-2-ssh/
http://www.faqs.org/docs/securing/chap15sec122.html

Do your keys

http://fosswire.com/2007/03/26/use-key-based-authentication-with-ssh/

For SFTP
sftp -oPort=55002 username@ip

FTP 5 Jan 2008

http://archiv.debianhowto.de/en/proftpd/c_proftpd.html
http://www.debianhelp.co.uk/proftp.htm

sudo nano /etc/proftpd/proftpd.conf
UseIPv6 from on to off

sudo /etc/init.d/proftpd restart

For SFTP
sftp -oPort=55002 username@ip

Bind Directories (can’t use symlinks)
mount—bind /home/shared /home/user1

Add users
- create the directory first!
sudo useradd USER -p PASSWD -d /home/USER

Move Home 5 Jan 2008

mkdir /mnt/newhome
sudo mount -t ext3 /dev/hda2 /mnt/newhome
cd /home/
sudo find . -depth -print0 | sudo cpio --null --sparse --preserve-modification-time -pvd /mnt/newhome/
sudo umount /mnt/newhome
sudo mv /home /old_home
sudo mkdir /home
sudo mount /dev/hda2 /home sudo cp /etc/fstab /etc/fstab.bak
sudo nano /etc/fstab
/dev/hda5 /home ext3 nodev,nosuid 0 2

Reboot and check that everything works, then
sudo rm -r /old_home

http://ubuntu.wordpress.com/2006/01/29/move-home-to-its-own-partition/

Apache 5 Jan 2008

Enable packages

sudo a2enmod ssl
sudo a2enmod rewrite
sudo /etc/init.d/apache2 force-reload

sudo apache2-ssl-certificate -days 365

http://www.sellersrank.com/ubuntu/setup-apache-subversion-ssl-https-with-virtual-hosts-on-ubuntu/
tar -xzvf filename.tar.gz

https://help.ubuntu.com/community/forum/server/apache2/SSL

PHP 5 Jan 2008

apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-imagick php5-imap php5-memcache php5-mhash php5-ming php5-mysql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy

MySQL 5 Jan 2008

sudo apt-get install mysql-server mysql-client libmysqlclient15-dev

take a look at /etc/mysql/my.cnf
there is a [mysqld] section where you can change the datadir location

steps (not tested!):

1- stop mysqld, sudo /etc/init.d/mysql stop
2- backup your datadir
3- restore the datadir to the new location with mysql permissions
4- change /etc/mysql/my.cnf to specify the new datadir location
5- restart mysqld

Post setup 4 Jan 2008

Backup scripts for /home, /var/www

For MySQL

mysqldump
or
http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html

Swap 6 Jan 2008

Edit /etc/sysctl.conf and add this line to the end:

vm.swappiness=0

I know the previous one said 10, but 0 really cuts the usage down a lot. I changed mine to 5 and don’t see any change.

aMule 11 Jan 2008

amuled -f

Start on startup, edit:
sudo nano /etc/default/amule-daemon

 

List

Wiki
Subversion
Post Setup
Trash
May 1 Cacti
Trash
May 1 USB Hard drive
Trash
Jan 24 aMule, aMuleCMD, aMuleWeb