Web development on KDE neon with XAMPP

XAMPP is an easy to use installer to create a pre-built LAMP stack on your machine. That sounds a lot more technical than it is. Basically it installs a web server onto your computer so you can access the files through your browser and the actual files being served as an aid to web-development.

You will still need to create the files using something like Bluefish but now you can view them at the same time in your browser and see what other people will see when the site/application is live. Once XAMPP is running you can see what is being served by Apache in your browser at,

http://localhost

There should also be an instance of phpMyAdmin installed that can be reached at,

http://localhost/phpmyadmin/

Installing XAMPP

Installing XAMPP on KDE neon is done slightly differently than normal as XAMPP isn’t held in the software repositories and instead you have to get it directly from the Apache Foundation. This can be done by going to their web-page and clicking on the XAMPP for Linux link. This will start downloading a file called something like,

xampp-linux-x64-7.3.2-2-installer.run

At the time of writing the download was about 132MB so if you have a slow connection it may take a while.

Downloading XAMPP
Downloading XAMPP

Changing file permissions

After it has downloaded you need to go to the file and check it has the right permissions to install by opening up Konsole and going to the directory that the file has downloaded into. Then use the command,

chmod 755 xampp-linux-x64-7.3.2-2-installer.run

Your installer might have a different name and really who wants to type that out anyway. Try typing the start and then when you get to the name use Tab to auto complete.

File Permissions XAMPP
File Permissions XAMPP

Installation

You can now start the installation process by typing (Again, use Tab to auto complete),

sudo ./xampp-linux-x64-7.3.2-2-installer.run

This will execute the file and the graphical install will pop up. Do not close the Konsole window, as this is still a process running in it.

You can basically go straight through the graphical installer. Deselect the “Learn more about Bitname” one perhaps, take a note of the installation directory and at the end you can automatically launch XAMPP as well.

Running installer XAMPP
Running installer XAMPP

Extra packages

XAMPP relies on another package that isn’t install automatically on KDE neon and this causes it to error when starting in future. This can be fixed by opening Konsole and typing,

sudo apt install net-tools
Installing Net-tools XAMPP
Installing net-tools XAMPP

Starting XAMPP in future

In future you will need to start XAMPP from the command line. This can be done by opening Konsole and typing,

sudo /opt/lampp/lampp start

You don’t need to keep Konsole open for it to keep going. You can also use the stop option as well or restart for that matter.

Adding XAMPP to the Applications Menu

If you have a memory like mine though maybe adding it to the Applications Menu is a good idea. This can be done by right clicking on the Application Menu icon and choosing edit applications. This will open the KDE Menu Editor.

You can put the shortcut to open XAMPP anywhere you want but for me it makes sense to have it under Development/Web Development so I am going to select Web Development and then New Item in the top menu. Fill in the name of the application (In this case XAMPP) and a description and and comments you want to make and then type this onto the Command: part,

kdesu /opt/lampp/lampp start

You can see the command is almost the same as the Konsole command but as we want to be using a GUI we get a GUI admin prompt by using kdesu.

On the right of the Menu Editor is an icon selector. Selecting it will pop up the KDE Menu icon selector. Choose ‘Other icons’ and then browse to,

/opt/lampp/htdocs/

and you should find XAMPPS favicon.ico image.

KDE Menu Editor

Uninstalling XAMPP

The un-installer for XAMPP is like the installer in that it needs to be run from Konsole. You can uninstall the program by opening Konsole and typing,

sudo /opt/lampp/uninstall

After entering your password it will ask you if you really want to uninstall and if you choose yes then the program will be removed.

Leave a comment