In this tutorial we’ll get XAMPP setup so we can start coding websites.
XAMPP for Linux
Download XAMPP from ApacheFriends. You can put it in your home directory.
Open up a terminal and run this command
tar xvfz xampp-linux-1.7.tar.gz -C /opt
This will extract the XAMPP (should be called lampp) directory to /opt. If you already have an XAMPP installation this command will overwrite it so be careful. Now we need to start the LAMP server using this command
/opt/lampp/lampp start
Now everythings up and running. You can test the setup by going to http://localhost in a web browser.
To start a website you need to create a folder in the htdocs directory under lampp. You can make a simple index.html file and put it in the created folder. Now visit http://localhost/your_created_folder and you should see your index.html file.
When you’re done coding you can stop your LAMP server with this command
/opt/lampp/lampp stop
XAMPP for Windows
Download XAMPP from ApacheFriends. I’d go with the installer. Once its done you should see XAMPP in Start >> Programs >> XAMPP. It comes with a Control Panel GUI to let you select which servers to start/stop. The directory setup is the same as under Linux.
phpMyAdmin
XAMPP comes with phpMyAdmin which is a frontend for mySQL databases. It’s great for people that don’t want to use the command line to interact with their databases.
To access it, go to http://localhost/phpmyadmin. Here’s a screenshot highlighting where you can create your first database.

After you enter a name and click create, you’ll be taken to the screen below. You can add tables to your db here. Just enter the name of your table and how many fields you need.

This last screenshot shows where you can change the field type and extra things like auto increment and primary key.

Now we can get started with PHP.


Recent Comments