XAMPP is a popular PHP,Apache,Mysql development package.I am using it from last 4+ years.It is easy to setup and work with.It has phpMyAdmin to deal with database based applications and CMS. It is good for WordPress too.
Here are steps to install XAMPP on Ubuntu from Scratch.
1. Get latest version of XAMPP from Apache friends.
2. Enable root access of the computer
Once downloaded you will get xampp-linux-1.7.7.tar.gz file.For installing any application at linux you need to Root access of the computer. In Ubuntu by default the Root account is not enabled.If you are installing it on ubuntu then you need to enable Root access for it by following command.
3.Open your terminal and type following
sudo passwd root
Then you will be prompted to set the password for Root(as UNIX password) account as shown in below picture.
For other distributions like Red Hat Linux you have root account enabled at the time of installing.
4. Log In
Once Root account is enables you need to Log In and extract the downloaded file in
a. Login as root. Open the terminal and Write
su enter the root password.
Now you have Logged In as root user.
b. you need to extract the downloaded archive in
/opt directory by using following command.
tar xvfz xampp-linux-1.7.7.tar.gz -C /opt
After writing This command if all is going well then you will go a series of file extraction.Now you have installed XAMPP.
you need to do configuration for security.
5.You need to start XAMPP by using following command.
Apache and mysql is running.
6.You can test it by writing
in any web browser.You will get following page as shown below.
7.By default in XAMPP installation.
- The MySQL administrator (root) has no password.
- The MySQL database can be accessed by network.
- PhpMyAdmin is accessible via network etc.
to overcome these security issues you need to set it by running following command in terminal.
8.You can check the security status of your installation by following URL.
9.Now it is time to test the current installation is working or not
To test Apache
a.Change directory permission of
by following command.
sudo chmod 777 -R /opt/lampp/htdocs
create a folder name test and create a
PHP file named
write following small test code in that
<?php phpinfo() ?>
and open following url :
you will see following screen