XAMPP is a free, open
source stack that contains Apache web server, MySQL database, PHP, and
Perl. The main goal of XAMPP is to build an easy to install Apache
environment for developers. Unlike LAMP, and LEMP stacks, It makes the
developers so easy to have all packages installed at once in a couple of
minutes. XAMMP is acronym of X(Cross platform), Apache, MySQL, PHP, and Perl.
In this handy tutorial, let us see how to
install XAMPP stack on Ubuntu 15.04, and its previous versions such as
14.04, 13.10 etc.
Install XAMPP Stack On Ubuntu
Download the latest version from the official download page. As of writing this article, the latest version was 5.6.8.
After downloading the XAMPP package, make it executable as shown below.
sudo chmod +x xampp-linux-x64-5.6.8-0-installer.run
Now, install XAMPP stack as shown below.
sudo ./xampp-linux-x64-5.6.8-0-installer.run
You’ll be asked to answer a couple questions. Here. I will go with defaults.
Press Y to accept the defaults.
---------------------------------------------------------------------------- Welcome to the XAMPP Setup Wizard. ---------------------------------------------------------------------------- Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue. XAMPP Core Files : Y (Cannot be edited) XAMPP Developer Files [Y/n] :y Is the selection above correct? [Y/n]: y ---------------------------------------------------------------------------- Installation Directory XAMPP will be installed to /opt/lampp Press [Enter] to continue: ---------------------------------------------------------------------------- Setup is now ready to begin installing XAMPP on your computer. Do you want to continue? [Y/n]: y ---------------------------------------------------------------------------- Please wait while Setup installs XAMPP on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Setup has finished installing XAMPP on your computer.
Starting/Stopping XAMPP Server
XAMPP will be installed in /opt/lampp directory. After installing XAMPP, you can start it using the following command.
sudo /opt/lampp/lampp start
Sample output:
Starting XAMPP for Linux 5.6.8-0... XAMPP: Starting Apache...already running. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok.
Like wise, you can stop the service using command:
sudo /opt/lampp/lampp stop
Sample output:
Stopping XAMPP for Linux 5.6.8-0... XAMPP: Stopping Apache...ok. XAMPP: Stopping MySQL...ok. XAMPP: Stopping ProFTPD...ok.
Test XAMPP
To check if everything is OK, open up your web browser, and navigate to http://ip-address/xampp.
You may get the following error. This is
because, the XAMPP test page will not be accessible from the remote
clients using IP address.
To resolve this error, edit file /opt/lampp/etc/extra/httpd-xampp.conf,
sudo nano /opt/lampp/etc/extra/httpd-xampp.conf
Find the following line:
[...] Require local [...]
And, comment it out:
[...] #Require local [...]
For more details, refer the XAMPP forum.
Restart XAMPP service.
sudo /opt/lampp/lampp restart
Refresh the XAMPP test page. Now, you’ll be able to access the XAMPP test page.
Select the language. In my case, I selected English.
This is how my XAMPP welcome page looked.
Access phpMyAdmin
phpMyAdmin is a graphical management tool
for MySQL. Using this tool, you can create/delete/modify mysql
databases graphically via a web browser.
To access phpMyAdmin, click on the “phpMyAdmin” link on the left pane of the XAMPP welcome page.
This is how my phpMyAdmin dashboard looks.
Likewise, you can view the phpinfo() page. The phpinfo() will also be accessed from the left pane of the XAMPP welcome page.
Viewing Statistics of the XAMPP server
XAMPP comes with pre-installed webalizer
application, which is a fast, free web server log file analysis
program. It displays the web server usage reports in HTML format with a
web browser.
To access webalizer, click on the “webalizer” link on the left pane of the XAMPP welcome page.
Security Issues of XAMPP
XAMPP is not meant for production use, it’s only for development purpose. Don’t attempt to use XAMPP in production environments.
The way XAMPP is configured is to be open
as possible to allow the developers anything they want. For development
environments this is great but in a production environment, it could be
fatal.
Here a list of missing security in XAMPP:
- 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.
To fix the above security holes, enter the following command:
sudo /opt/lampp/lampp security
You’ll be asked a couple of questions to secure the XAMPP installation. Answer the questions accordingly.
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): 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.
That’s it. Now your XAMPP server is secured.
Cheers!
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.