How To Install XAMPP Stack On Ubuntu 16.04

To Install XAMPP Stack On Ubuntu 16.04

XAMPP is a free stack which contains PHP, Apache web server, MySQL database, and Perl. This framework installs Apache environment for developers easily. Installation of XAMPP Stack in Ubuntu is explained in this article.

 

Features

  •     Regularly updated to the latest versions of Apache, MariaDB, PHP and Perl.
  •     Supports other modules like OpenSSL, phpMyAdmin, MediaWiki, Joomla, WordPress etc.,
  •     Tests the website designers and programmers work without Internet.
  •     Secured package.
  •     Allows creation and manipulation of databases in MariaDB and SQLite.


To Install XAMPP Stack

Before installing the package, create a directory.

user1@user1:~$ mkdir xampp
user1@user1:~$ cd xampp/
user1@user1:~/xampp$

Download the XAMPP package by using the wget command

user1@user1:~/xampp$ wget https://www.apachefriends.org/xampp-files/5.6.20/xampp-linux-x64-5.6.20-0-installer.run
--2016-07-13 16:26:51-- https://www.apachefriends.org/xampp-files/5.6.20/xampp-linux-x64-5.6.20-0-installer.run
Resolving www.apachefriends.org (www.apachefriends.org)... 107.22.247.161
Connecting to www.apachefriends.org (www.apachefriends.org)|107.22.247.161|:443... connected.
.
.
xampp-linux-x64-5.6 100%[===================>] 129.19M 692KB/s in 4m 4s

2016-07-13 16:30:57 (543 KB/s) - ‘xampp-linux-x64-5.6.20-0-installer.run’ saved [135465406/135465406]

Run the following command to make XAMPP execuatable.

user1@user1:~/xampp$ chmod +x xampp-linux-x64-5.6.20-0-installer.run

Install XAMPP stack as shown below.

user1@user1:~/xampp$ sudo ./xampp-linux-x64-5.6.20-0-installer.run
[sudo] password for user1:

Click Next
1
Select the required components and Click Next.
2

Click Next to proceed further.
3
4
5

XAMPP installation starts now.
6

Finally, click finish.
snap(7)

XAMPP welcome screen appears.
snap(8)
Click Manage servers to verify the list of currently running services.
9

Launch the XAMPP dashboard either by clicking on the Go to application from XAMPP Welcome tab.

8
Or

Open up your browser and navigate to http://localhost/ or http:/<IP_address>/
10

11

 

 

Access phpMyAdmin

phpMyAdmin is a graphical management tool for MySQL to create/delete/modify mysql databases through web browser.

Before accessing the phpMyAdmin, edit the httpd-xampp.conf file located in /opt/lamp/etc/extra/

user1@user1:~/xampp$ sudo vim /opt/lamp/etc/extra/httpd-xampp.conf
[sudo] password for user1:

Comment the following line

AllowOverride AuthConfig Limit
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

Then Add the following line.

AllowOverride AuthConfig Limit
# Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

Save and quit the file.
Restart XAMPP service.

user1@user1:~/xampp$ sudo /opt/lampp/lampp restart

Now access the phpMyAdmin, by triggering the phpMyAdmin Tab on the dashboard.

12

Then click PHPINFO() on the dashboard.
13

 

Security Issues of XAMPP

XAMPP cannot be used in production environment due to security issues. To overcome this the following security issues to be cleared.

  •     The MySQL administrator (root) has no password.
  •      The MySQL daemon is accessible via network.
  •      ProFTPD uses the password “lampp” for user “daemon”.
  •      PhpMyAdmin is accessible via network.
  •      Examples are accessible via network.

Run the following command to overcome the security issues.

user1@user1:~/xampp$ sudo /opt/lampp/lampp security

XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes]
XAMPP: Password:
XAMPP: Password (again):
/opt/lampp/share/xampp/checkapache: line 41: /opt/lampp/htdocs/xampp/.htaccess: No such file or directory
cp: cannot stat ‘/opt/lampp/htdocs/xampp/.htaccess’: No such file or directory
cp: cannot stat ‘/opt/lampp/htdocs/xampp/.htaccess’: No such file or directory
chmod: cannot access ‘/opt/lampp/htdocs/xampp/.htaccess’: No such file or directory
chmod: cannot access ‘/opt/lampp/htdocs/webalizer/.htaccess’: No such file or directory
chmod: cannot access ‘/opt/lampp/phpmyadmin/.htaccess’: No such file or directory
XAMPP: Password protection active. Please use 'xampp' as user name!
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes]
XAMPP: Turned off.
XAMPP: Stopping MySQL...ok.
XAMPP: Starting MySQL...ok.
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes]
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes]
XAMPP: Write the password somewhere down to make sure you won't forget it!!!
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin's authentication method.
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes]
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Reload ProFTPD...ok.
XAMPP: Done.

Open the browser and Click phpMyAdmin in the dashboard.

14
15

 


Thank you! for using Linux Help.

You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website www.linuxhelp.com
Be the first to comment, we value your suggestions. For further queries please comment below.

Tags: Ubuntu Php XAMPP
user image Author :  Jackson