Hello Code Breakers
Today I am here with one great tutorial. Today I will show you the way to start your own home server to host your website from home. It very easy and you can do with just few commands.
Here I assume that you have following configuration in your PC/Laptop.
OS: Ubuntu 10.04 or Later
Hard Drive: 50GB(Minimum)
Ram: 2GB(Minimum)
And good Internet broadband connection with speed atleast 1Mbps.
Note: We must require a modem/router to put your website online . (If you are BSNL broadband user u will most probably have the modem/router).
So Lets Break It Than!!!
You will notice here that we are adding "sudo" before command to give it administrative rights, so it will ask for administer password. so enter it. It will ask you for permission to download contents from internet, Sof enter "Y" and press enter. Thats it now wait till download and installation finish.
Setp-2: Once tasksel is installed, write following command in terminal
enter administrator password if asked. and you will see following screen.
Find ans select "LAMP Server" by pressing space key.
And press Tab key to select <ok> and press enter.
when you press Enter you will see following screen. Let the installation finish.
In the middle of installing process you will ask to configure MySQL "root" user password with the following screen. Keep in mind that what ever password you will enter remember it very well. We will need that in further installation and also if you loss that password you cant retrieve it.
So we have installed "LAMP Server". So now we can check it that our server is working properly or not.
Open firefox(or browser you are using) and enter url "http://localhost" and u will se following screen. If you see this screen You have successfully installed you web server.
Step-3: Now we will install "phpmyadmin" as MySQL database GUI interface. If you dont know about phpmyadmin you can google it. So to install phpmyadmin write following command in terminal.
If it ask for password enter your administrator password.
Just enter "Y" and press Enter. and wait till installation finish.
Now as in the middle of the installation it will ask for to configure phpmyadmin with your serveer.
Select "apache2" and press ok.
Now it will ask to configure MySQL database with phpmyadmin.
First select "ok" and than "Yes". Now it will ask to enter password for root user. Enter the same password as we have enter in Step-2 for MySQL configuration. Enter the same password in bellow screens.
And wait for installation to finished. Thats it!. We have done here. Now we will check that phpmyadmin is working or not.
and Go.
Thats It you have install and configure your webserver successfully.
Step-4: Now we will put our server online. So it can be accessible from any where. Now I am going to explain for BSNL modem/router. But for others the mechanism is same. So lets do it.
Now select "Pre-Defined" -> "Server"-"Web Server" as show in above figure. Now we have to enter internal IP address to "Forward to host internal IP Address".
And note down the "inet addr" of "eth0" . Here for me it is "192.168.44.130". Now enter this address in to "Forward to host internal IP Address" .
And click on Apply. Thats all you are done. now put your website content in "/var/www/" folder and thats it now you can access you website from anywhere.
Today I am here with one great tutorial. Today I will show you the way to start your own home server to host your website from home. It very easy and you can do with just few commands.
Here I assume that you have following configuration in your PC/Laptop.
OS: Ubuntu 10.04 or Later
Hard Drive: 50GB(Minimum)
Ram: 2GB(Minimum)
And good Internet broadband connection with speed atleast 1Mbps.
Note: We must require a modem/router to put your website online . (If you are BSNL broadband user u will most probably have the modem/router).
So Lets Break It Than!!!
Setp-1: First of we will need to install Apache sever. As we are going to make web server we need PHP,MySQL and Apache server, And in Ubuntu this can be easily available in one single package called "LAMP Server". So for to install LAMP server in Ubuntu in very easy way and with GUI so that those who are not comfortable with commands can install it with ease we will install on package called "Tasksel". If you are using Ubuntu 10.04 mostly this package is installed in it by default,but those who are using Ubuntu latest version will need to install it. So for that start your terminal with Alt+Ctrl+t, and write following command in terminal.
Setp-2: Once tasksel is installed, write following command in terminal
enter administrator password if asked. and you will see following screen.
Find ans select "LAMP Server" by pressing space key.
And press Tab key to select <ok> and press enter.
when you press Enter you will see following screen. Let the installation finish.
In the middle of installing process you will ask to configure MySQL "root" user password with the following screen. Keep in mind that what ever password you will enter remember it very well. We will need that in further installation and also if you loss that password you cant retrieve it.
So we have installed "LAMP Server". So now we can check it that our server is working properly or not.
Open firefox(or browser you are using) and enter url "http://localhost" and u will se following screen. If you see this screen You have successfully installed you web server.
Step-3: Now we will install "phpmyadmin" as MySQL database GUI interface. If you dont know about phpmyadmin you can google it. So to install phpmyadmin write following command in terminal.
If it ask for password enter your administrator password.
Just enter "Y" and press Enter. and wait till installation finish.
Now as in the middle of the installation it will ask for to configure phpmyadmin with your serveer.
Select "apache2" and press ok.
Now it will ask to configure MySQL database with phpmyadmin.
First select "ok" and than "Yes". Now it will ask to enter password for root user. Enter the same password as we have enter in Step-2 for MySQL configuration. Enter the same password in bellow screens.
And wait for installation to finished. Thats it!. We have done here. Now we will check that phpmyadmin is working or not.
and Go.
Thats It you have install and configure your webserver successfully.
Step-4: Now we will put our server online. So it can be accessible from any where. Now I am going to explain for BSNL modem/router. But for others the mechanism is same. So lets do it.
- First open you browser and enter "http://192.168.1.1" in url.
- As you open this url you will ask for username and password. Now for BSNL modem generally username and password is "admin". Enter admin in username and password. and u will se tht you will be redirected to modem configuration page.
- Now find tab name "Port Forwarding" from the left side bar. you can find that in under security tab mostly.
- Now you must be wondering why we need this, because we are going to set up our port 80 for webserver communication using TCP to Outside world.(This is the easy explanation for you but in technical way its little complex.)
- So click on Add. You will see following page.
Now select "Pre-Defined" -> "Server"-"Web Server" as show in above figure. Now we have to enter internal IP address to "Forward to host internal IP Address".
To get you PC/Laptop internal IP address type "sudo ifconfig" command in terminal.
And note down the "inet addr" of "eth0" . Here for me it is "192.168.44.130". Now enter this address in to "Forward to host internal IP Address" .
And click on Apply. Thats all you are done. now put your website content in "/var/www/" folder and thats it now you can access you website from anywhere.
Note: But for that you have to purchase one Domain name and configure it with your server. That i will explain in another tutorial.
Till Then "Break It, Feel It And Learn It"
No comments:
Post a Comment