Local server is a model of a web server that is limited to a machine. Now what is a Web Server?
Web server can either refer to a hardware or a software that helps to deliver web content to be accessed on the internet. We have to use web servers to host websites or any web applications but it has some other uses as well. This week at ‘This is How We Do It’, we will be learning how to setup your own local server.
XAMPP is a cross platform free and open source web server package that consists of Apache HTTP server, My SQL Database, and interpreters for scripts written in php and Perl. It also comes with a number of other modules including OpenSSL and phpMyAdmin.
Here are the steps you need to follow to setup the local server on your machine:
- Download the latest version of XAMPP for your operating system from sourceforge.net
(We will be only talking about Linux and Mac OS X. For Windows there is just a .exe package that you need to install like a usual executable file.)
- Go to linux shell what we also call it as the terminal.
- Login as the system administrator.
- Extract the downloaded archive file to /opt
tar xvfz xampp-linux-1.8.0.tar.gz -C /opt
And thats it you have successfully installed XAMPP on your operation system.
To install XAMPP on Mac OS X, just do the following:
- Open the DMG-Image.
- Drag’n’Drop the XAMPP folder into your Applications folder.
- To start XAMPP, type
On OS X, simply open XAMPP Control and start Apache, MySQL and ProFTPD.
- Now visit http://localhost to check whether the installation has been completed or not.
If yes then you will see a page like this
- To stop XAMPP, type
- To completely uninstall XAMPP, type
rm -rf /opt/lampp
Thats all about it. Now you are all set to host local websites and web apps. Mind that the websites created on local server will be limited to your machine only ie: it cannot be accessed via the Internet. For hosting websites that can be accessed via the Internet, you need to buy a web hosting package with all these services installed.