How To Download & Install XAMPP On Linux
XAMPP is a development tool for web developers especially targetted towards back-end web development i.e., server-side scripting, managing databases, etc. XAMPP is easy to install (and get to work), unlike other methods where one has to download all the individual programs manually and set them up on their choice of platform which is tedious and time consuming for newbies.
With XAMPP you can execute your PHP scripts and see the results directly on your local machine without an Internet connection, or query a database using MySQL. Thus, you get to test your web app before deploying it on the Internet for the World to try out.
Download XAMPP for Linux
Head over to this website to download XAMPP. You’ll notice three download options for different platforms: Windows, Linux, and OS X. Click the middle option “XAMPP for Linux” and the download will start.
On a side note, since XAMPP can be installed on Windows and OS X too, this creates an excellent opportunity (in case you’re a pupil) to collaborate on a project with your Windows or OS X peers together.
Installing XAMPP On Linux
After you’ve downloaded XAMPP installation file, open a terminal program and browse to the directory where you downloaded the file. Usually, it’s in the Downloads folder so the below command would work on all Linux platforms unless you customized the download location yourself:
cd ~/Downloads
Change the file mode to executable:
chmod +x xampp-linux-x64-7.2.5-0-installer.run
Then using sudo, execute the xampp installation file to install it on your computer:
sudo ./xampp-linux-x64-7.2.5-0-installer.run
cd ~/Downloads
Change the file mode to executable:
chmod +x xampp-linux-x64-7.2.5-0-installer.run
Then using sudo, execute the xampp installation file to install it on your computer:
sudo ./xampp-linux-x64-7.2.5-0-installer.run
Launching XAMPP
After installation, you might have clicked Finish by leaving the Launch XAMPP option ticked (and it’ll launch). But unlike usual applications on your computer where you just launch them by point and click, XAMPP has no .desktop files, you’ll have to launch it using a terminal emulator program. Also, XAMPP requires root privileges in order to be run successfully.
Launch a terminal program, then change your current directory to /opt/lampp and execute the below command to start xampp sudo ./manager-linux-x64.run After that, turn on Apache web Server on the Manage Servers tab and then launch your favorite web browser. On the URL bar, load this page http://localhost.com or http://127.0.0.1, you’ll notice the similar output as shown in the screenshot below.
Conclusion
You’ve successfully set up XAMPP and got it working! You can use it to test your PHP scripts or play around with MySQL. In case you have a good foundation in HTML, CSS, PHP, MySQL, and JavaScript, you can develop and test your web app before deploying it. Just don’t forget to enable the servers you intend to work on.