Tuesday, April 27, 2021

How to Install XAMPP on linux ?

 What is XAMPP?



XAMPP is the most popular PHP development environment.

XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl.


Download the latest version from here


wget https://www.apachefriends.org/xampp-files/7.4.16/xampp-linux-x64-7.4.16-0-installer.run


After download change the permission :


chmod 755 xampp-linux-x64-7.4.16-0-installer.run


sudo ./xampp-linux-x64-7.4.16-0-installer.run


If it linux server Press all Yes during installation. 

If it is the desktop version of linux press next during installation. 



Now need to change the permission for htdocs :


cd /opt/lampp/



chmod -R 777 htdocs


cd htdocs


create one demo.php file and write code :


<?php

echo “Welcome to linux for freshers” 

?>


To start the XAMPP service :


sudo /opt/lampp/lampp start


Starting XAMPP for Linux 7.4.16-0...

XAMPP: Starting Apache...ok.

XAMPP: Starting MySQL...ok.

XAMPP: Starting ProFTPD...ok.




To run the php file:

http://localhost/demo.php


Or 


http://lip_address/demo.php




To stop the XAMPP service:


sudo /opt/lampp/lampp stop


Stopping XAMPP for Linux 7.4.16-0...

XAMPP: Stopping Apache...ok.

XAMPP: Stopping MySQL...ok.

XAMPP: Stopping ProFTPD...ok.



No comments:

Post a Comment