Blog about Web Programming and Electronics
💬 👤
back Back to blog
Linux

Installing XAMPP Server on Linux and Connecting to PHPStorm

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

  1. Start: sudo /opt/lampp/lampp start
  2. Stop: sudo /opt/lampp/lampp stop
  3. Restart: sudo /opt/lampp/lampp restart

Connecting to PHPStorm

To make PHPStorm recognize XAMPP\'s PHP, follow these steps:

  1. Open File > Settings (Ctrl+Alt+S).
  2. Go to PHP and click on the three dots (...) next to the interpreter.
  3. Click +, select From Local... and enter the path: /opt/lampp/bin/php
  4. Confirm with OK and click Apply.
back Back to blog