How to set up your own basic webserver - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Closed Thread
Thread Tools Display Modes
Old 10-04-2005, 08:20 AM   #1 (permalink)
Wizard Techie
Join Date: Mar 2004
Posts: 3,782
Default How to set up your own basic webserver

This guide will teach an absolute Linux n00b how to:
Install Linux on a old Junky PC
Network it
Set up Apache web server.
Set up PHP and MYSQL.
Install a forum, other BB or Wiki software.
Serve this to the Internet or locally.

What You Need?
A old computer
A home network
Ubuntu 5.04 install discs.
Internet Connection

My Test System
This was thrown together from gathered parts around the place:
P3 450
256mb SDRAM
4gb HDD
8mb RIVA TNT 2
ATX Case & PSU

Part 1 - Hardware
Get together an old computer. I have done this on a P3 450 but im sure it will work ok on older p2 computers. Make sure the HDD and CDROM is set up correctly and everything works nicely.

Part 2 - Software
We will be using Ubuntu 5.04 "Hoary" for this project. I have found this distro to be very stable, easy to set up and fairly compatible. It is Debian based and has a large user base so support is easy to get hold of. You can download Ubuntu ISO's from or you can get Ubuntu CD's shipped to you (takes > 6 weeks) free by going here.

Part 3 - Installing Ubuntu
If you want to dual boot Windows and Linux, create a second partition with your desired partitioning software (eg. Partition Magic) before starting, also make sure that your ADSL modem (if you are using one) is connected via Ethernet for easiest configuration Put the Ubuntu install disc into the drive and restart the computer. Make sure the CDROM is set to the first boot device in the BIOS. When it comes up with the boot prompt, press enter. Once the box pops up asking for details about country etc. enter the appropriate details and press enter. Once it comes up with the "Installing Base System" message you can relax for a while. The next tricky part is the partitioning. If you dont want Windows on it as well, just erase the entire disk and Ubuntu will work out all the required partitions itself. If you want to dual boot (more advanced), highlight the partition you created in Windows, and press enter. Tell it to format it as EXT 3, and the mount point as "/". Continue through the steps (no other tricky configuration after this). Eventually you will be prompted to take the CD out and restart. Now you can go away for a while. The system needs to install and download security updates, this can be done un aided so you can go out for lunch, or to the beach and it will do everything for you. Once you come back, login with the username and password you suppied before, you will be then greeted by a desktop.

Part 4 - Installing Software
Now, right click on the desktop and click Terminal. Type in "sudo chmod 777 /etc/apt/sources.list" then press enter and type in your password when prompted to it. Then type in "gedit /etc/apt/sources.list" and find where it says:
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb warty universe
# deb-src warty universe
And take the "#" from in front of the last 2 lines then save.

Now make sure you are connected to the internet, open Terminal and type in:

"sudo apt-get install php4-mysql" and press enter
"sudo apt-get install apache2" and press enter
"sudo apt-get install php4" and press enter
"sudo apt-get install mysql-server" and press enter
"sudo apt-get install libapache2-mod-auth-mysql" and press enter
"sudo apt-get install php4-mysql" and press enter
"sudo apt-get install phpmyadmin" and press enter

Part 5 - Configuring Stuff
You have installed all the programs you need so now, at terminal type in:

"sudo gedit /etc/php4/apache2/php.ini"

Find the line that says:

And remove the ";" from in front of it.

Then type in:

sudo /usr/sbin/apache2ctl restart
Now your web server us set up. Go to http://localhost in Firefox and it should come up with the Apache start page.

To put in your own files, open up terminal and type:

"sudo chmod -R 777 /var/www"

Then copy whatever files you want to serve into /var/www.

Part 6 - Managing Databases and Installing Forum Software
Go to http://localhost/phpmyadmin and login with the user: Root and no password. Once you have logged in you should change the password for security. In Phpmyadmin you are able to create, delete, upload and backup your forums databases easily and remotely.

Part 7 - Other Conveniant Stuff
Would you find it useful if you could manage all the files in the /var/www folder from anywhere on your network through a ftp client? If so you can set up some software that will let you connect to your server via FTP.

Part 8 - Further Reading
Ubuntu Wiki
More Reading on Installing Ubuntu

Core 2 Duo E6400, DFI Infinity 975X/G, 2x 512mb DDR2 667mhz, Albatron 7900gt, WD 200gb SATA, Samsung DVD-RW, Silverstone ST-50EF 500w PSU.
waynejkruse10 is offline  
Old 10-04-2005, 08:53 AM   #2 (permalink)
Ultra Techie
Join Date: Jul 2005
Posts: 813

Good read, thanks.

I wanted to do exactly that, but found that Ubuntu ran horribly on my old system (P2, 64MB, 8GB). Funny thing is with a few adjustments Windows XP runs pretty smoothly on it.

Associates Degree in IS

A+ Certified

Studying for Network+
BASSMASTER is offline  
Old 10-04-2005, 06:13 PM   #3 (permalink)
Wizard Techie
Join Date: Mar 2004
Posts: 3,782

Well, the ram is the problem, thats what really chokes linux. If you want it to run fast, i will put in the guide how to run everything from command line (and that does run fast).
Core 2 Duo E6400, DFI Infinity 975X/G, 2x 512mb DDR2 667mhz, Albatron 7900gt, WD 200gb SATA, Samsung DVD-RW, Silverstone ST-50EF 500w PSU.
waynejkruse10 is offline  
Old 10-11-2005, 12:13 PM   #4 (permalink)
Newb Techie
Join Date: Sep 2005
Posts: 19

how set a windows server
pavel721 is offline  
Old 10-11-2005, 03:15 PM   #5 (permalink)
True Techie
Join Date: Feb 2005
Posts: 124

Yea that is what I did without the mysql and I used suse linux 9.3 pro It works pretty good for my little site and for the word URL if you router supports then set it up it makes it a LOT easier then a ip address for my friends to go to
[size=1]New build
dfi lanparty sli-dr
amd x2 3800+
evga 7800GTX
2 gigs (2 x 1gig) ocz ram
500 gigs (250gb x2) seagate hard drive
Windows XP Home Edition
mooseman is offline  
Old 10-11-2005, 03:39 PM   #6 (permalink)
Wizard Techie
Join Date: Mar 2004
Posts: 3,782

how set a windows server
Nah Linux works fine. Anyway im not experienced with Windows server os's and you need to buy it.
Core 2 Duo E6400, DFI Infinity 975X/G, 2x 512mb DDR2 667mhz, Albatron 7900gt, WD 200gb SATA, Samsung DVD-RW, Silverstone ST-50EF 500w PSU.
waynejkruse10 is offline  
Old 10-11-2005, 05:45 PM   #7 (permalink)
Wizard Techie
Join Date: Jun 2005
Posts: 3,339

This isn't a linux forum

Just pop in your XP CD go to components. Then select "Install IIS" Then your web server is set up and only minor adjustments need to be made. Else use apache which I do not know how to set up.
<form action=\"\" method=\"get\">
<input type=\"text\" name=\"search\"> <input type=\"submit\" name=\"submit\" value=\"Search TF before you post!\"></form>
Vista Discussion | 64 Bit Discussion |Microsoft Homepage | Yo Linux | Paul Thurrott | Fire Fox | Thunder Bird | Image Shack | Photo Bucket | Put File | Anti-Spyware | MS Anti-Spyware | Trillian | Anti-Virus | On Line Virus Scan
Tyler1989 is offline  
Old 10-12-2005, 02:12 AM   #8 (permalink)
Wizard Techie
Join Date: Mar 2004
Posts: 3,782

Yeah, could some mod please move and pin this???

you still need a database and php renderer. IIs doesnt have as much support as apache does. The most viable option is MYSQL or PostgreSQL which are all designed to go with Apache. Same with PHP. Also, you dont need to go out and buy a legit copy of XP for heaps of money when you can just use free linux .

Even so, i wouldnt buy another copy of Windows for my server if i was going to use windows as my server os.
Core 2 Duo E6400, DFI Infinity 975X/G, 2x 512mb DDR2 667mhz, Albatron 7900gt, WD 200gb SATA, Samsung DVD-RW, Silverstone ST-50EF 500w PSU.
waynejkruse10 is offline  
Old 10-12-2005, 08:35 AM   #9 (permalink)
Super Techie
Join Date: Oct 2003
Posts: 439

Good guide. I use debian myself. I have no experience with the OS you mention of, haven't even heard of it. Debian works extremely well in low end computers though. Command line of course, no gui. You can install the x system on it, but not much point. You might as well use a different os if you want the gui interface.

With two simple commands after install though, you can have php, mysql, and apache installed. Have to edit the apache config, but all this takes less than 2min. Combine this setup with putty and winscp and you can't go wrong. Extremely easy and efficient! Just takes a command or two to setup mysql and create a database as well.

Anyway, that's what I like/prefer/use.
\"I have many layer-eight problems in my life, including myself.\"
Obtruse_Man4 is offline  
Old 10-12-2005, 08:45 AM   #10 (permalink)
PowerQuest / Opera
TheMajor's Avatar
Join Date: Jun 2004
Location: Netherlands
Posts: 10,177

I use Windows as server. I know Linux is better. But it's more complicated and I don't want to spend too much time on it. I would also have to spend a lot of time figuring out lots of other things besides setting up Apache, like how to enable virtual hosts, remote desktop, ftp server, file sharing with windows, how to restart services, etc.

TheMajorMMX - Intel P200 MMX @ 225Mhz - V-Tech (PcPartner) Baby-AT mb w/ Intel Triton TX chipset - Nvidia Riva TNT2 M64 w/ 16MB - 256MB M-Tec SDRAM - Still running.....
TheMajor is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities

Copyright 2002-2015 Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 06:50 AM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.