Setup your own webserver to host your blog site at home using ubuntu linux
Posted on Dec 23, 2007 under Apache, General, Ubuntu, Webserver |You can setup your own webserver in your home and use it to host your own blog from home and fully utilizing your internet access. What do you need for the start of something certain people think its impossible to do?
1. Any working condition PC. (Yes, can be an old one or a latest one, doesn’t matter because we only need HDD space, Good processor and a sufficient amount of RAM)
2. Modem+Router
3. Ethernet Card for that PC
Then you have all the ingredients that is required to cook, why not? Get the Ubuntu 7.10 iso image from this http://www.ubuntu.com/getubuntu/download , download it and burn the image to a cd. If your processor if 64bit , you must get the one for 64bit processors. After you have finished burning the image, just insert the cd into your PC and reboot it. You will be prompted to a menu whereby you need to select Install to the hard disk.

Then the rest will be a guided installation until you reach this stage :

For more guided images of the installation, visit this link http://howtoforge.com/perfect_server_ubuntu7.10 . Just following until the installation only, the rest of the server setup I will guide you through it. Now login to your new ubuntu server. If the router is connected to the server you will be able to ping google.com and get a reply from the packets sent.
Run this command :
sudo apt-get install apache2 mysql-server-5.0 vim mysql-client-5.0 php5-mysql mysql-common php5 php5-common libapache2-mod-auth-mysql libapache2-mod-php5 openssh
This will probably take a while to download and install all of those services needed. Just put a “y” in every request that you get during this installation. Oka, meanwhile waiting for the installation, if your isp doesnt provide you with a static ip address, you probably need to get one ip address from http://dyndns.com . The you will have to create a host , for example mine is gravin.homelinux.net . So if you visit http://gravin.homelinux.net , that will be the exact webserver that we are trying to install here. The blog website is running on wordpress . Later on will guide you on installing wordpress after the setup of your webserver.
Then after that you need to setup inadyn (for dynamic ip adresses only) :
sudo vim /etc/inadyn.conf
Press “a” to insert these text :
username yourdyndnsusername
password yourdyndnspasswdhere
update_period 60000
alias gravin.homelinux.net(here will be your selected dyndns host name)
background
Then type “:wq” to save the file.
You have to set root passwd now ,
sudo passwd root
Enter your passwd and verify again. Then do a “su root” . Once you are root, type “crontab -e” , you will editing the crontab file, type in this text “@reboot /usr/sbin/inadyn” and hit “ctrl + o and ctrl + x. Thats it and you should see @reboot /usr/sbin/inadyn when you type “crontab -l” .
Now, whenever your server starts/reboots, it will automatically direct your dynamic ip address to the dyndns hostname. Direct your web browser to your dyndns hostname, you should see It Works!. Which means your webserver is up and running. Now you just need to install wordpress (which i will guide you on the next post) on it and start blogging!
Share This
By wjl (Wolfgang Lonien) on Dec 23, 2007 | Reply
You forgot to mention the port forwarding needed inside your router - that would probably a “catch” for newbies. Otherwise, ok. Mentioning the upload speed of your (DSL?) line should also be worthwile. Plus: running anything else than a very thin client (5W power or so) would and will result in electricity costs far beyond to what you pay for a vserver which is on a Gigabit-line somewhere.
cheers,
wjl
http://wolfgang.lonien.de/
http://blog.thedebianuser.org/
By admin on Dec 23, 2007 | Reply
You are right, I forgot to mention the port forwading part in the router, will do so in the next post.Everything comes with their pros and cons.Will also discuss is it worth the trouble to run your own server or get a simple hosting package will be good.
By iCalvyn on Feb 11, 2008 | Reply
Gravin, thank for this tips, i am looking to build my own webserver too, I have the ubuntu CD, but not sure ist the same with what you mention or not…
The CD i have is can boot up without harddisk… but not sure can install it or not… going to try up now… thank for the guide…I hv book mark ur page
By iCalvyn on Feb 12, 2008 | Reply
the CD i have is just for workstation, not server one. I have download the server edition and seen like unable to install in my workstation… still try and error…
By Gravin on Feb 12, 2008 | Reply
what is the error you got Calvyn?