Install and run XAMPP on Windows and Linux

In this basic tutorial, you will learn how to install XAMPP. XAMPP is used to run Apache HTTP Server, MySQL database, and interprets scripts written in the PHP. It is a great tool to test or host a website on your own machine. Lets see how install and start it.

  1. Download and Install.
    • Install for Windows here
    • Linux (Knoppix mainly) Installation here and Please follow that guide only if you are Linux User.
  2. Now run the program.
  3. The control panel will open. You need to start the Apache and MySQL services and make sure that they are green.

xampp

 

Now, all you need to do is the browse to the installation folder of XAMPP and get to the htdocs folder. Assuming you installed XAMPP in c:\ then look for the following path.

C:\xampp\htdocs

Now make a folder named mywebsite inside the htdocs folder and inside it, make a file named index.php like this.

C:\xampp\htdocs\mywebsite\index.php

Open and edit the index.php file and add the following code.

Now, go to your browser, and visit one of the following links.

If you see the message in the above code. then you have not only installed XAMPP but you are now able to work with PHP.

Knoppix touchpad click workaround

Problem: I can’t click with my touchpad in Knoppix. I can use USB/bluetooth mouse normally but the Laptop’s touchpad can’t be tapped to click.

Solution:

  1. Go to terminal and enter the following

    knoppix@Microknoppix:~$ synclient Tapbutton1=1

  2. Now try closing the terminal by tapping the [X] in the terminal window and it will work.

Note: This only works for the current session which means if you restart knoppix, the touchpad will be back to unclickable. I will update the post as soon as I discover the permanent solution to the problem. But as far as I am concerned, I can do that on every boot 🙂

 

Installing, running and testing and stopping Xampp services in Knoppix

Knoppix is very portable and easy to use. Being a developer, I know that it is important to keep your tools handy.  This post is about installing Xampp in Knoppix. The following steps can get it running in no time ;D

  1. Get the latest .tar.gz of Xampp and download it in a folder.
  2. Go to the downloaded file’s folder using File Manager.
  3. Open Terminal in the .tar.gz file’s folder by pressing

    Tools>Open Current Folder in Terminal

The next step will Install Xampp in /opt folder.

  1. Type the following command in the terminal (make sure the name of the .tar.gz file is correct)

…:~$ sudo tar xvfs NAME OF FILE.tar.gz -C/opt

Afterwards, you will see a lot of installation activity in the terminal window. When it finishes, it is necessary to change permissions to the htdocs folder in xampp in order to make development easy and possible.

  1. Type the following in Terminal to allow file permissions in htdocs

…:~$ chmod 777 /opt/lampp/htdocs

  1. Now we can start Xampp

…:~$ /opt/lampp/lampp start

  1. Now go to browser and type localhost and it will be working fine. Also check if phpmyadmin is working.
  1. To stop Xampp services, go to terminal and type this

…:~$ /opt/lampp/lampp stop

  1. Enjoy! 🙂

 

Installing WINE in knoppix (CD and DVD)

Wine in Knoppix CD version

Type the following in Terminal

It will download and install wine along with its required repositories. Afterwards, you can install Wine by typing sudo apt-get install wine1.5.

Afterwards, if you with to install a Windows program in Knoppix, then simply copy the setup on the desktop (makes it easy) and then click the setup file. If everything was set properly, then Wine will appear to install the program. It is important to note that some programs require some files (such as .dll files) which are mostly provided in Windows but not in Linux. Therefore it is important that those files are to be copied in the required folders.

Wine in Knoppix DVD version

As for those users of Knoppix who intend to use the DVD version, then there is no need to install anything because Wine comes as a pre-installed package in the DVD version.