I'm assuming you have a computer you want to dedicate as a server, which has a hard disk and a cdrom drive that is able to boot cds. I am also assuming that you know how to burn ISO's. This guide is for running an httpd with PHP and MySQL, an ftpd, and sshd
Step 1) Go here and choose a mirror download the latest ISO.
Step 2) Use nero or a similar program to burn the ISO to a cd.
Step 3) Boot the DSL cd and when everything is loaded either press ctrl+alt+backspace to close X and go to the command prompt, or open a terminal inside fluxbox and type
CODE
sudo -u root fdisk /dev/hda
Step 4) You should then see Command (m for help):
Press p to show the current partition table. Press d and then pick the partition number of the patition you want to delete until they are all gone and you have a blank partition table. Now press n to create a new partition, p for a primary partition, then press 1 to put it under partition number one. You should see First cylinder (1-784, default 1): press <return> then it will ask for last cylinder. Here is where you should know large your hard disk is in MB, when you first hit P it tells you this. What you want to do is create this partition as big as possible but leave enough space for a swap partition. You also should know how much RAM you have. Take the amount of ram you have in mb and multiply it by 1.5, this ishow big your swap partition should be. Subtract this amount from the total amount of your disk and that is how much your first partition should be. Where it says Last cylinder type +xxxM where xxx is the size of the hard disk excluding the space reserved for swap.
Step 5) Do the same thing from step for by creating a new partition except this time pick primary and then 2 when it asks which partition number, then press return for the first cylinder and last cylinder so that it uses up the rest of the disk. After the swap partition has been made press t then pick partition 2 then enter 82 for the hex code, this will assign partition 2 as swap space. Last press w to write changes to the disk and exit.
Step 6) Now that you are back at the command line enter this command
CODE
sudo -u root dsl-hdinstall
This will run the hd-install script and should copy all the files to the hard disk and set everything up, it will then ask if you want to set up lilo hit y and press return and then it will reboot.
Step 7) You should have successfully booted into damn small linux from the hard disk now, if all is successful great now close out of the x server it is running by hitting ctrl+alt+backspace and run
CODE
mkswap /dev/hda2
to format the swap partition to be used as swap space.
Step 8) now it is time to install the xampp package for apache php and mysql. type 'su root' so that you switch to root so you have privelages then you can go to this page to find a mirror, and type wget "http://urlofxamppackage.tar.gz" here is my example using an atlanta georgia mirror
CODE
wget http://internap.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.4.10a.tar.gz
once the download is complete type
CODE
tar xvfz xampp-linux-1.4.10a.tar.gz -C /opt
Step 9) When the extraction finishes type
CODE
/opt/lampp/lampp start
this should start apache with php and mysql, and the ftpd hopefully everything worked well
IMPORTANT:
run this to set all the passwords
CODE
/opt/lampp/lampp security
Test the server by going to http://servers.address it should bring up some xampp pages to test that everything is working fine.
To start sshd run these two commands
CODE
ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
sshd
sshd
Notes:
File Locations
http config: /opt/lampp/etc/httpd.conf
ftp config: /opt/lampp/etc/proftpd.conf
To run MySQL queries locally run
/opt/lampp/bin/mysql