Help - Search - Members - Calendar
Full Version: [HOW TO] Set up server fast
Neowin Forums > *nix Customization & Support > Completed *nix HOWTO & FAQs
beh
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
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 biggrin.gif

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


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
thisispete
what services does this server give us?

ie. mail, web hosting, sql etc...
markjensen
Cool. smile.gif

Just curious, what services are running after you do this setup? (ssh?)
Also, what does iptables look like?
beh
I added some stuff i was missing including how to run an sshd, the bad part is that there is no iptables package installed by default.
PureEdit
Thanks, I needed something like this.

Looks like it sets up the following:
1. httpd
2. php
3. mysql
4. ftpd
5. sshd
Mx²
Cool, interesting, thanks!
AndurilShards
thanks!

I've always wanted to know smile.gif
zer0
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.
Hurmoth
Can anyone tell me why everytime I try to change something it tells me that the filesystem is read-only unsure.gif

For example, I try to reboot the system and it tells me:
QUOTE
Fed 7 19:04:31 box daemon.info init: cannot execute "/etc/init"
Remounting filesystem read-only
uniacid
you probably don't have it set to the right permissions
Another_Paul
How do you change your IP address using DSL? This is a newbie here if u cant tell...
Another_Paul
QUOTE(Another_Paul @ Mar 14 2005, 16:52)
How do you change your IP address using DSL?  This is a newbie here if u cant tell...
[right][snapback]585617191[/snapback][/right]


Just found out how.

Right Click for the Menu, go to SYSTEM then NET SETUP then NETCARDCONFIG smile.gif
Nate.E
So this sets up a basic personal server? How would you go about actually connecting your server to the internet so you could host webpages on it?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.