Skip to content

How to Install XAMPP on Linux Mint 22

XAMPP is a popular open-source web server solution that simplifies the process of setting up a local server environment. It includes:

  • Apache (web server)
  • MariaDB (database management system)
  • PHP (scripting language)
  • Perl (general-purpose programming language)

XAMPP is widely used by developers to create and test web applications before deploying them to live servers.

Why Use XAMPP on Linux Mint 22?

  • Easy installation and setup.
  • Supports PHP and MySQL development.
  • Provides a lightweight local testing environment.
  • Ideal for students, freelancers, and developers.

System Requirements for Installing XAMPP

Before proceeding, ensure your system meets the following requirements:

  • Linux Mint 22 (64-bit recommended)
  • At least 2GB of free disk space
  • Internet connection for downloading the installation file
  • Terminal access with sudo privileges

Step 1: Update System Packages

Updating your system ensures compatibility and smooth installation.

  1. Open the Terminal (Ctrl + Alt + T).
  2. Run the following command:
    sudo apt update && sudo apt upgrade -y
  3. This command updates the package list and upgrades installed packages.

Step 2: Download XAMPP for Linux Mint 22

To install XAMPP, you need to download the correct package.

  1. Visit the Official XAMPP Website:

    Open Apache Friends XAMPP Download Page.
  2. Select the Latest XAMPP Version:

    Choose the Linux version suitable for your development needs.
  3. Download XAMPP Using Terminal:

    Alternatively, use wget to download the latest version:
    wget https://www.apachefriends.org/xampp-files/x.x.x/xampp-linux-x64-x.x.x-0-installer.run

    (Replace x.x.x with the latest version number.)


Step 3: Make the Installer Executable

Before running the installer, modify file permissions.

  1. Navigate to the Downloads directory:
    cd ~/Downloads

  2. Make the file executable:
    chmod +x xampp-linux-x64-x.x.x-0-installer.run

  3. Verify the changes:
    ls -l xampp-linux-x64-x.x.x-0-installer.run

    You should see an “x” in the permissions (-rwxr-xr-x).


Step 4: Install XAMPP on Linux Mint 22

Now, install XAMPP by running the installer.

  1. Execute the installer with root privileges:
    sudo ./xampp-linux-x64-x.x.x-0-installer.run

  2. The installation wizard will appear. Follow these steps:
    • Click Next.
    • Select components (default selection is recommended).
    • Choose the installation directory (/opt/lampp).
    • Click Next until the installation begins.
  3. Once installation is complete, click Finish.

Step 5: Start and Stop XAMPP Services

After installation, you need to start XAMPP services.

To Start XAMPP:

sudo /opt/lampp/lampp start

You should see a confirmation message like:

Starting XAMPP for Linux 7.x.x...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.

To Stop XAMPP:

sudo /opt/lampp/lampp stop

To Restart XAMPP:

sudo /opt/lampp/lampp restart

Step 6: Access the XAMPP Dashboard

Once XAMPP is running, access the dashboard by:

  1. Opening a web browser.
  2. Typing the following URL:
    http://localhost

If XAMPP is installed correctly, the XAMPP Dashboard will appear.


Step 7: Manage MySQL with phpMyAdmin

XAMPP includes phpMyAdmin, a web-based tool for managing databases.

  1. Open a browser and visit:
    http://localhost/phpmyadmin

  2. You can now:
    • Create and manage MySQL databases.
    • Run SQL queries.
    • Import/export database files.

Step 8: Configure XAMPP for Better Performance

To enhance XAMPP’s security and performance, modify configuration files.

1. Change Apache Default Port

If another service is using port 80, change Apache’s port.

  1. Open the httpd.conf file:
    sudo nano /opt/lampp/etc/httpd.conf

  2. Find this line:
    Listen 80

  3. Change it to another port, such as:
    Listen 8080

  4. Save the file (Ctrl + X, then Y, then Enter).
  5. Restart XAMPP:
    sudo /opt/lampp/lampp restart

  6. Now, access XAMPP with:
    http://localhost:8080


Step 9: Uninstall XAMPP from Linux Mint 22

If you want to remove XAMPP, follow these steps:

  1. Stop XAMPP services:
    sudo /opt/lampp/lampp stop

  2. Run the uninstaller:
    sudo /opt/lampp/uninstall

  3. Remove the XAMPP directory:
    sudo rm -rf /opt/lampp

  4. Verify XAMPP is completely removed:
    ls /opt


Common Errors and Fixes

Here are solutions to common XAMPP issues:

1. “Permission Denied” When Starting XAMPP

Run the command with sudo:

sudo /opt/lampp/lampp start

2. Apache Port Conflict

Change the port in httpd.conf (as shown in Step 8).

3. MySQL Not Starting

  • Check for another MySQL service:
    sudo systemctl status mysql

  • If running, stop it:
    sudo systemctl stop mysql

Then restart XAMPP.


Alternatives to XAMPP

If XAMPP doesn’t suit your needs, consider:

  • LAMP Stack – Apache, MySQL, PHP (native installation)
  • WAMP (for Windows users)
  • Docker (containerized development)

Conclusion

Installing XAMPP on Linux Mint 22 is straightforward with this guide. You now have a fully functional local development environment for web applications.

Key Takeaways:

  • XAMPP simplifies local development.
  • Always run commands with sudo to avoid permission errors.
  • Use http://localhost to access XAMPP services.
  • Change default ports to prevent conflicts.
  • Secure phpMyAdmin for better database security.

Now, start building and testing your web projects with XAMPP on Linux Mint 22!


FAQs

1. Can I install XAMPP on Linux Mint 22 without root access?
No, root (sudo) access is required for installation and service management.

2. How do I auto-start XAMPP on boot?
Use crontab -e and add:

@reboot sudo /opt/lampp/lampp start

3. Is XAMPP secure for production use?
No, XAMPP is designed for local development. Use a LAMP stack for production.

4. How do I update XAMPP?
Uninstall the current version and install the latest one.

5. Where is the XAMPP installation directory?
By default, it’s located in /opt/lampp/.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top