• 8 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 3/7/22

Develop Web Applications

Discover the Web Development Tools in Linux

Now let’s look at web development, where once again, Linux comes up with a great acronym: LAMP (Linux, Apache, MySQL, PHP).

We’ll examine each component of this acronym. Some apps include all of these components, such as XAMPP, which we will install shortly.

  • “L” for Linux: There’s probably nothing more to add here as you now know all about Linux! This is the Operating System component of LAMP. 

  • “A” for Apache: The program that brings you web services is combined with the foundation that provides and maintains it: Apache. The program is actually called HTTPD; any name that can be shortened in the IT world will be!

  • “M” for MySQL: This is the Database component. When Oracle bought SUN (and MySQL), the community was so worried that this database engine would disappear (as Oracle is a competitor). Luckily for the LAMP acronym, the community had the good sense to call it MariaDB; phew! A “fork” was created, i.e., a new version based on the last open-source version.

  • P for PHP, in this case for the Interpreter component – the LAMP language technology. Here again, history has been kind, as P also works for Perl or Python! 

The following presentation covers setting up a LAMP stack, but you’ll notice that the author starts by talking about Windows and something called WSL 2.

Why is this important in a Linux course? 

WSL 2 stands for Windows Subsystem for Linux version 2, and is actually a Linux kernel that runs in a virtual machine under Windows. 

LAMP = Linux, Apache, MySQL, PHP

Typically, you’d have to install and configure each component individually to run your web project. And it’s highly advisable to do this for your production machines.

But for development environments, some tools combine all of these components – a sort of ready-to-use MEGA package with everything you need. It makes your life easier, so you can focus on the code part.

Some of these tools are specifically for Windows (WAMP) or macOS (MAMP). The one we’re going to install is available for any system, whether Windows, Linux, or macOS. 

Its name is XAMPP

Use Your LAMP Architecture

Let’s get to work and install XAMPP on your distribution.

To install this application, you’re going to have to follow a different procedure from what you’ve seen previously.

Why?

Because it isn’t available in package format either within or outside the distribution.

How does that work, then?

Don’t worry. We’re going to use a procedure that you may already be familiar with, as it looks a lot like the traditional Windows setup.exe.

You’ll see, it’s quite simple, mainly it just involves clicking next, next and next! 🤣

Once the application is installed, we’ll look at the main features, particularly those that will allow you to create your first web development project quickly!

Over to You!

Create your project in XAMPP!

Following the steps described in the videos below to create your own XAMPP project:

  • Check that XAMPP services are launched, not forgetting the Apache Web Server service.

  • Create a directory for your projects in the correct part of the XAMPP tree.

  • Assign the necessary permissions to this directory for your user account to read and write in it.

  • Create your homepage as a first PHP script. 

  • Check that you can display your homepage from a browser. 

Let's Recap!

  • You also have all the tools you need to develop web applications in Linux.

  • LAMP is the original acronym for Linux Apache MySQL and PHP. 

  • XAMPP lets you easily deploy a LAMP development environment. 

That’s it. Now you have everything to develop your web applications. Let’s review some of the terminal commands you learned. 

Glossary of Terminal Commands

Here's a quick summary of the new commands you've encountered:

  • dpkg -i package.deb: This command lets you install a package that is not managed by the distribution's package repository. Be aware that you might have to manage dependencies manually. 

  • java -version: This command checks if Java is installed on the system and sends the current version.

  • javac -version: This command checks if the Java compiler is installed on the system and sends the current version.

  • python3 -v: This command calls on the Python code interpreter and sends the current installed version. 

  • python3 script.py: This command calls on the Python code interpreter to interpret the script file passed as a parameter. 

  • sudochmod +x file: This command lets you assign execution permissions to the file passed as a parameter.

  • ls: This command lists the content of the directory passed as a parameter, or that of the current directory if no parameters have been passed. The option -l provides a fuller display, in column format.

  • sudo ./file: This command lets you run the file via escalation of privileges.

  • sudo /opt/lampp/xmanager.run: This command runs the file selected if it has execution permissions via escalation of privileges. It allows you to launch the XAMPP management console.

  • ln -s /directory-or-file/source /directory-or-file/shortcut: This command allows you to create a shortcut from one file/directory to another. 

Course Conclusion

You’ve made it to the end of this course! I hope you enjoyed it and that you no longer believe that Linux is complicated!

Now you know where Linux comes from and why its desktop environments are different from Windows and macOS. Even better, you now know how to choose your own desktop environment and install a distribution that provides it.

You also know the difference between the kernel and distribution, what packages are for, and how to use them to update your Linux and install extra applications.

You’ve seen that Linux also offers solutions in terms of browsers, email clients, and office suites.

If you’re a graphic designer, editor/producer, developer, or even a webmaster, you’ve learned that Linux can also help you with your work!

Finally, you’ve only just started to dip into the possibilities and potential of the terminal. If you want to find out more and join the ranks of advanced users, sign up for the next course: Administer a Linux system. See you very soon!

Example of certificate of achievement
Example of certificate of achievement