Turn an old Computer into a web server! by z2daj

Step 1: Prepare the Computer

i know, i know, but i know that there might be those who view this instructable who don't have an old computer....

anyway on to prepping the computer. your computer should have:
-at least 64MB of RAM (not too hard to get passed that these days)
-an intel or AMD processor (still not too hard)
-a cd-rom drive (still not hard)
-at least 600MB of space (you're going to want more than that since this is a server!)
-and the ability to boot from a CD
-an ethernet port

all in all, most of these requirements are easy to accomplish. since we will be using server edition for this install, this computer won't necessarily need 4GB RAM and a 500GB hard drive, though it would be nice...
xmozox says: Dec 18, 2011. 9:53 AM
hello
after i add hostname for compter my computer dont do anything goes to a purple screen can any1 help
jgeorge13 says: Nov 28, 2011. 11:49 AM
I installed Ubuntu 11.10 Server Edition. The install went pretty well with only a few speed bumps, but I'm having an issue with the command line "sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl"; Ubuntu gives me an error finding the package to install. I'm also getting an error locating the webmin package. I cannot install webmin because apparently it no longer exists at the sourceforge.com URL according to my Ubuntu server. I checked both of these command lines as well as the webmin download URL and re-entered all said command lines in the above instructions with zero success. Any idea as to why I'm having these issues?
z2daj (author) says: Dec 7, 2011. 10:18 AM
The URLs are most assuredly outdated. My recommendation would be to google the packages in order to get the up-to-date package information.

If you need help, I can look into as well, though with two majors and the end of semester approaching... it may be couple weeks or so before I am able to.
callumofawesome says: Feb 22, 2011. 9:10 AM
how do i remove this???

I would really like to be able to have windows back on there
Zephlon Arphanosh says: Sep 29, 2011. 11:19 AM
If you kept the disc that came with your Windows PC, all you have to do is put it in and re-install.
jbeatty1 says: May 27, 2011. 6:26 PM
cool im a do this now :D
jeremycollins says: Jul 19, 2009. 10:11 PM
I am having a little trouble with webmin and accessing my server. i installed webmin using the terminal commands you provided and it did not display any errors. The pc I want to use is connected via ethernet that is connected to a router. We have three pcs in the house, one running from an 802.11g wireless signal and the other are wired (ethernet). How do I get the ip for my server pc? I visited whatsmyip.org from my regular computer but it didn't work when accesing webmin. Also, from netopia (my router brand) I saw this note: From the LAN (Local Area Network), you will also be able to access these servers, but only using the internal private IP address. Access via the public IP address is not supported from a local ethernet connection. Does this mean I cannot set up a webserver? I would really appreciate your assistance. Thanks for the great tutorial...I just hope I can get it working right!
z2daj (author) says: Jan 29, 2011. 7:47 PM
*Nearly two years later...*

If you know the router's IP address, say 192.168.1.1 for example, and you have a DNS network, the router will automatically assign IP addresses to connected devices using this scheme 192.168.1.xx where 'xx' is the IP of the computer connected to the router. In most cases by default, the the IP addresses of connected devices begins at 101 and go on, as the router's address in this case would be 100.


Sorry for the late response! I never get e-mails when comments are posted, and I forgot all about this account!

With humble apologies,
-z2daj
x-treme says: Dec 9, 2010. 5:43 AM
You can also use dot.tk, I prefer it over no-ip.com. Top-level domains > Sub-domains
harry599 says: Aug 24, 2010. 7:02 AM
When we have to enter these: HTTP 80 80 TCP serverIP FTP 21 21 TCP/UDP serverIP SSH 22 22 TCP serverIP Do we have to copy it exactly or do we put the ip in the bit that says serverIP? Thanks Harry
Ian01 says: Oct 24, 2010. 3:24 PM
You put your server's local IP address there.
Lord_Drogoth says: Apr 12, 2010. 5:38 PM
 I seem to be unable to do the first command of step 4 it gives me the same error every time. "E: Couldn't find package libnet-ssleay-per" If you could help me it would be much appreciated.
z2daj (author) says: Apr 12, 2010. 5:49 PM
 i know this sounds silly, but just make sure you typed everything right :D

i couldn't get anything to install at one point because of typos myself
Lord_Drogoth says: Apr 12, 2010. 5:52 PM
 I checked it several times for errors before I entered  it and type it all over again and check that errors and I still didn't catch anything wrong with it
z2daj (author) says: Apr 12, 2010. 5:55 PM
 hmm, just do sudo apt-get install perl and then continue on. If the dependency of the webmin package isn't fulfilled, it should automatically search and install it from the repository. Good Luck!
Lord_Drogoth says: Apr 12, 2010. 6:01 PM
 I'll try that thank you for your help and for the exceedingly speedy reply
digitrunner says: Mar 9, 2010. 6:54 AM
Great instructible and great intro LOL, I know, I know, I know, I know I know, ... Aint No Sunshine When She's Gone by Bill Withers, brb have to go put the song on now to get it out of my head...:P
abadfart says: May 15, 2009. 11:18 PM
dose anyone know prompt i don't
erikals says: Feb 24, 2010. 1:26 AM
Google 'unix tutorials'
UNIX is what all linux distributions use. It is included as part of Ubuntu, openSUSE and any other linux distribution.
octavian234 says: Aug 25, 2009. 10:12 PM
your website doesnt work
Lance Mt. says: Oct 25, 2009. 11:56 PM
 lol nope. I'm also wondering if i can just keep it as a ip address?
iNORTON says: Sep 20, 2009. 7:07 PM
I don't have ssh in the list of application names.... I have ftp...http...https...dns..smpt...pop3....telnet...ipsec...pptp...netmeeting...dcs-1000...dcs-2000/dcs-5300...i2eye..
I was wondering what I might substitute to be able to have the same config as you do.. I am using a d-link 2300 router...

jpr3 says: Sep 4, 2009. 8:11 PM
THANKS for a great instructable. I've been wanting to do this for a long time - and I got it working in no time. You are great and Instructables is great! John
airsoftguy1310 says: Apr 4, 2009. 4:25 PM
when i try and get webmin it says "E: Commad line option 'i' (from -i is not) know." plez hellp p.s. replace () with []
dpdonohue says: Aug 5, 2009. 4:43 PM
z2daj (author) says: May 25, 2009. 6:11 PM
did you do
sudo wget http://prdownloads.sourceforge.net/webadmin/webmin_1.470_all.deb

and then do

sudo dpkg -i webmin_1.470_all.deb
Stephen304 says: Apr 11, 2009. 12:14 PM
What extras should one install for a basic server that will host php scripts and html pages with the possibility of a sql database? Do i need to check install lamp? Near the end of the install it has an extras thing, i don't know if i need any.
dpdonohue says: Aug 5, 2009. 4:42 PM
yeah LAMP will do the trick perfectly
z2daj (author) says: May 25, 2009. 6:10 PM
yea you would want the LAMP server and Open SSH, sorry for the long comment wait, i've been very busy for the past month :P
Stephen304 says: May 26, 2009. 4:26 AM
Oh thanks, yeah, ive had a hardware deficiency lately and i have to use a tv for a monitor, and my dad doesn't like that. So i have to wait till hes gone somewhere. Next time i get a chance i will get back to that menu and see if i can get past it. Thanks.
beauwalker23 says: Jul 13, 2009. 11:28 AM
Okay, I have a computer running windows 98. I dont know how old this computer is... You think I ca still do this?
dpdonohue says: Aug 5, 2009. 4:41 PM
as long as it meets the requirements then yeah
ccrh2008 says: Jun 3, 2009. 10:42 AM
could it be possible to have a type of program on the server to allow it to broadcast video from a webcam instantaneously
asherzgfx says: May 25, 2009. 4:45 PM
I can't get any of the apps to install, it says that they may be missing or obsoleted? Any ideas?
z2daj (author) says: May 25, 2009. 6:07 PM
try running sudo apt-get upgrade also, what version of ubutnu are you using? they released 9.04 a month ago
asherzgfx says: May 26, 2009. 4:30 AM
that worked great, thanks.
asherzgfx says: May 25, 2009. 4:01 PM
When I went to select the extra's to install on the last screenshot, I pressed enter by accident and it didn't install any of them... Is there any way I can install them without having to re install the whole of Ubuntu?
z2daj (author) says: May 25, 2009. 6:09 PM
yea you can, although you need to know the exact package names. the command would be sudo apt-get install where is the name of the package without the "<>".
ninjabananas990 says: May 17, 2009. 7:33 PM
Can you make a tut. on how to get the domain name? I am really lost on it and have been working on it for days. The only way I know to get to the server is through my local network, I dont understand how to access it worldwide. If it had its own IP (not a network IP) I could easily set up the domain.
ownsuall says: Nov 6, 2008. 4:02 PM
Followed your steps but came out with a problem here... I can access my webpage from home (beastsinaction.no-ip.org) but can't view it anywhere else..
z2daj (author) says: Nov 6, 2008. 4:36 PM
make sure you forward ports correctly, such as making sure that the TCP/UDP is correctly set and also, i've done this before... make sure your server is on... ha
ownsuall says: Nov 6, 2008. 4:50 PM
Computers on and working it dosen't matter if the ip address is diffrent then 192.168.1.xxx right?
z2daj (author) says: Nov 6, 2008. 5:12 PM
it does... let's say your server IP is 192.168.1.108 in the port forwarding box for ip address, you'd put 192.168.1.108 or if your router fills in the first part then just 108 the IP address in the port forwarding has to be the same has the server's IP address, otherwise web traffic on those ports will not be directed to and from your server. give it a try now and tell me how it works. good luck!
ownsuall says: Nov 6, 2008. 5:57 PM
turns out my xbox was using the same ip address XD Fixed that. One question about the no-ip account for the IP/URL part do we put are external ip or the 192.168.1.108 ip address in there
z2daj (author) says: Nov 7, 2008. 11:19 AM
you'd put in your external IP. tell me if you get all up and running smoothly because i know once you get your website going, you're going to want to expand on it A LOT. i went from a simple page to a a little more complex simple page with some video hosting. but i want to have a CMS with php so i can have my own forum and user-base/database
ownsuall says: Nov 8, 2008. 9:38 AM
I believe i found my problem my server was using 192.168.1.1 as the default gateway but i need to change that to my gateway and i have no idea how to do that so please help me one more time on this...
z2daj (author) says: Nov 8, 2008. 10:08 AM
what is your gateway's address? are you using a DNS network? what brand is your router? in order to change the gateway address in ubuntu server, you need to edit the eth0 config file
ownsuall says: Nov 8, 2008. 10:14 AM
My server says its 192.168.1.1 But i need it to be 192.169.1.1 Not sure what a DNS network is... im using a linksys WRT160N router. How would i configure the Eth0 file i found it using WinSCP but it just says permission denied when i try to over write it =(
z2daj (author) says: Nov 8, 2008. 11:22 AM
ok, this is what you do. log into your server and enter these commands one at a time: sudo ip route add default via 192.169.1.1 sudo vi /etc/network/interfaces and then under eth0 add this in: gateway 192.169.1.1 then press Ctrl+X to exit and then type Y to save then enter this command to restart networking sudo /etc/init.d/networking restart then restart your server and viola!
ownsuall says: Nov 8, 2008. 9:11 PM
Uh the Sudo vi /etc/network/interfaces command dosent work it just stays there and does nothing. Do i have to type it in on the computer or does webmin's command shell cover that?
z2daj (author) says: Nov 9, 2008. 6:33 AM
try sudo nano /etc/network/interfaces the webmin command shell should cover it, so does PuTTy, but since your port forwarding it a little off, i'd stay with Webmin.
ownsuall says: Nov 9, 2008. 11:08 AM
uh did that and got this "Error opening terminal: unknown."
ownsuall says: Nov 9, 2008. 11:13 AM
I have nano installed so thats not the problem. maybe i just need to type it into the computer it's self?
z2daj (author) says: Nov 9, 2008. 5:02 PM
yes, that would probably be the best thing to do
ownsuall says: Nov 14, 2008. 2:52 PM
Sorry for the wait but got Gateway working but cant use the "sudo ip route add default via 192.169.1.1" command it says "Error: an inet prefix is expected rather than "deafult""
ownsuall says: Feb 4, 2009. 6:56 PM
Just reloaded the whole entire thing thought I might try it again but still can't get it too work i have open ports maybe my isp is blocking it idk If theres an information i can give that can help you help me please tell me
ownsuall says: Feb 4, 2009. 7:06 PM
I think I figured it out when i do a tracert command i do one hop to my server my ISP must be blocking them CURSE YOU CHARTER!!!!!!!!!!
computer_guy says: Feb 2, 2009. 5:57 PM
will this server work with windows?
z2daj (author) says: Feb 2, 2009. 6:14 PM
what do you mean "work with windows"? do you mean will you be able to see webpages? yes. will you be able to share files via WinSCP? yes. it all depends on what you want to know :P
computer_guy says: Feb 3, 2009. 2:02 PM
I ment if i install ubuntu on a computer (server edition) will it be able to support my windows on my other computer.
cotton says: Jan 26, 2009. 5:37 PM
no offince but this was horrible at the perl part its to much space taken so i chose ssh lol and it needs mre then 600 mb
TWMCNANEY says: Dec 20, 2008. 2:22 PM
ok i fixed it, i had a problem with the mail, config, so anyway i have another question, i dont know what my ip address for the server is there anyway too find out? I want to be able to go to no-ip.com and get a host name or whatever. Im connected throught the network at home.
z2daj (author) says: Dec 20, 2008. 2:52 PM
ok, ssh into your server with PuTTY, and input this command: ifconfig and there you go, the shell response will include your server's IP address
TWMCNANEY says: Dec 20, 2008. 8:03 PM
Ok I'll trytry that just as soon as I get ssh and putty riming, I found it by going to the home computer were the router is linked to and copyed the ip, and it works, thanks for the help, This is a great instructable.
TWMCNANEY says: Dec 20, 2008. 12:16 PM
ok so when i try https://ubuntu:10000/ its says page cant be found, what do i do?
z2daj (author) says: Dec 20, 2008. 12:25 PM
is your server connected to the internet on your network? are you trying to access your server from another network, or from the network that your server is on? and are you sure that your server is just "ubuntu" or is it ubuntu-server? try using the IP address of the server instead.
dchall8 says: Sep 27, 2008. 1:22 PM
Please help me to understand why I would want to do this? I have a website at my ISP. Could I put the website on one of these servers, give it a meaningful name, and not have to deal with the throughput restrictions at the ISP? And then could anyone access it??? I could use something like that.
PKM says: Sep 29, 2008. 1:15 PM
Essentially, you don't have to deal with all your ISP's sh... rubbish. You can host as much as you have the hard disk space for, it doesn't have to have adverts all over it, you can have whatever domain name you want (but obviously might have to pay for www.bestwebsiteintheworld.com or whatever), can configure and run web-based applications on your box so you can have rich content on your web site- essentially, other than bandwidth restrictions this lets you do what you want. It's more effort than using your ISP's webspace, certainly, but it gives you a huge degree of flexibility.
z2daj (author) says: Sep 29, 2008. 3:35 PM
i couldn't have said it better myself =D
z2daj (author) says: Sep 27, 2008. 1:48 PM
you probably could use the ISP website from your server. you'd just need to configure apache to use that web-space. the limitations from the ISP, i don't think that could be avoided, since they provide you with an internet connection and the web-space to begin with. however, do you know if you have a site already? or is it just an unused space, waiting for it to be used. if that's the case, then you can set this server up for an FTP and such
Bongmaster says: Sep 27, 2008. 10:35 AM
nice :) tho i used puppy for mine :D and xampp works great :)
z2daj (author) says: Sep 27, 2008. 11:11 AM
yea, it's amazing how much you can do with open source =D
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!