XAMPP is a popular package that combines Apache, MariaDB, and PHP in one place. Although Linux uses its own repositories, XAMPP is an excellent choice for developers who need an isolated and quickly settable environment.
Download and Installation Preparation
- Visit the official Apache Friends website and download the latest version for Linux.
- Open the terminal and navigate to the folder containing the downloaded file (e.g., Downloads):
cd ~/Downloads
- Add execution permissions to the file:
sudo chmod +x xampp-linux-x64-installer.run
Installation and Launch
Run the installer with the command:
sudo ./xampp-linux-x64-installer.run
Follow the wizard, which will install XAMPP in the /opt/lampp directory. If the server does not
start automatically, use the command:
sudo /opt/lampp/lampp start
Troubleshooting (net-tools)
If an error regarding the netstat command appears, you must install additional network utilities:
sudo apt update && sudo apt install net-tools sudo /opt/lampp/lampp restart
Management Commands
- Start:
sudo /opt/lampp/lampp start - Stop:
sudo /opt/lampp/lampp stop - Restart:
sudo /opt/lampp/lampp restart
Connecting to PHPStorm
To make PHPStorm recognize XAMPP\'s PHP, follow these steps:
- Open File > Settings (Ctrl+Alt+S).
- Go to PHP and click on the three dots (...) next to the interpreter.
- Click +, select From Local... and enter the path:
/opt/lampp/bin/php - Confirm with OK and click Apply.