[HOW TO] Set up server fast


Recommended Posts

Recently I redid my server and I did it so incredibly easy and fast, so I decided to share what I did.

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

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

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

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

wget http://internap.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.4.10a.tar.gz

once the download is complete type

tar xvfz xampp-linux-1.4.10a.tar.gz -C /opt

Step 9) When the extraction finishes type

/opt/lampp/lampp start

this should start apache with php and mysql, and the ftpd hopefully everything worked well :D

IMPORTANT:

run this to set all the passwords

/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

ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" 
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

Edited by beh
Link to comment
Share on other sites

Cool. :)

Just curious, what services are running after you do this setup? (ssh?)

Also, what does iptables look like?

Link to comment
Share on other sites

  • 3 weeks later...

according to the XAMPP website the package includes: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, Turck MMCache, SQLite and IMAP C-Client. thats quite a lot for such a short install. also this dosent have to be installed on DSL.

i think this is how i will set up my server just on another distro

aslo a nice artical on how to setup and configure this is here

http://www-106.ibm.com/developerworks/linux/library/l-xampp/

just thought i would help out a bit.

Link to comment
Share on other sites

  • 1 month later...

Can anyone tell me why everytime I try to change something it tells me that the filesystem is read-only :unsure:

For example, I try to reboot the system and it tells me:

Fed 7 19:04:31 box daemon.info init: cannot execute "/etc/init"

Remounting filesystem read-only

Link to comment
Share on other sites

  • 1 month later...
How do you change your IP address using DSL?  This is a newbie here if u cant tell...

585617191[/snapback]

Just found out how.

Right Click for the Menu, go to SYSTEM then NET SETUP then NETCARDCONFIG :)

Link to comment
Share on other sites

  • 10 months later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.