How to install LAPP (Apache + PHP + PostgreSQL) on Ubuntu 20.04

Windows Articles

Install Nim programming language on Ubuntu 20.04 / Debian 10

Nowadays, almost everything is done with the help of a computer and a program. And the programs are made through a programming language. That...

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows...

Install Matomo on Ubuntu 20.04

Hello, friends. In this post, you will learn how to install Matomo on Ubuntu 20.04. It's quite useful to measure the traffic to our...

How to change DNS in Windows 10

Hi! Today we will talk a bit about networks. In fact, we will touch on a topic related to connectivity. Specifically we will see...

The new Windows 10 file explorer will arrive with 21H2 update.

Hello! Microsoft does not stop working (except at Christmas) to continue polishing to Windows 10. In fact, users are gradually receiving the 20H2 update....
angeloma
angeloma
Senior Writer and partner

There are many combinations of programs and servers in Linux. Of all of them, the LAMP or LEMP stack is one of the most known and popular but some prefer PostgreSQL over MariaDB / MySQL. So, in this post, you will learn how to install the LAPP stack on Ubuntu 20.04

This stack also provides us with a functional server but with a different database manager like PostgreSQL. This database handler is maybe the most powerful in the world in open source. So it is normal that many want to make the change.

So, let’s start.

How to install LAPP on Ubuntu 20.04

1.- Install Apache web server on Ubuntu 20.04

The first step is to install the Apache webserver which is one of the most secure and reliable servers within Linux. Together with Nginx, they are one of the most popular in the world.

So, open a terminal or SSH session and run it:

sudo apt install apache2

Then, start the service and enable it to start with the system:

sudo systemctl start apache2
sudo systemctl enable apache2

Finally, you can open a web browser and go to the following address http://your-server or http://ip-server and you will see Apache’s default page.

Apache Default page on Ubuntu 20.04
Apache Default page on Ubuntu 20.04

This indicates that the installation has been successful.

2.- Install PHP on Ubuntu 20.04

Now the next component is PHP which is a very popular programming language in the web environment. Therefore, it must be installed along with some of its fundamental modules.

php7.4 libapache2-mod-php7.4 openssl php-imagick php7.4-common php7.4-curl php7.4-gd php7.4-imap php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-pgsql php-ssh2 php7.4-xml php7.4-zip unzip

Now to prove that PHP and Apache are working properly, let’s make a test file.

sudo nano /var/www/html/test.php

And add the following content:

Save the changes and close the editor.

Then restart Apache:

sudo systemctl restart apache2

Then open it from your web browser, for example http://your-server/test.php

PHPinfo method
PHPinfo method

If you manage to see a page with the PHP information, then both are working correctly.

3.- Install PostgreSQL on Ubuntu 20.04

PostgreSQL is one of the most advanced and modern relational database managers out there. It is always shown as the immediate competitor of MySQL and MariaDB in the segment of open source and community database managers.

One of the main advantages of using PostgreSQL is that it has extensive documentation and supports powerful features. All this in an open-source and free application.

Installing PostgreSQL is quite simple and we explain it in detail in this post:

How to install PostgreSQL on Ubuntu 20.04?

And so you have the LAPP stack ready to work.

Conclusion

The LAMP stack is one of the popular and famous ones that exist but it is not the only one. Now we present you an alternative that changes to MySQL / MariaDB by PostgreSQL in a fast and easy way and forming the LAPP stack that is quite used too

Thanks for reading

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Install Nim programming language on Ubuntu 20.04 / Debian 10

Nowadays, almost everything is done with the help of a computer and a program. And the programs are made through a programming language. That...

Configure Samba File share Services with Ubuntu 20.04 LTS

Here, Today! let's discuss samba file share service with Ubuntu 20.04 LTS. If you need to share files between Linux and MS Windows...

Install Matomo on Ubuntu 20.04

Hello, friends. In this post, you will learn how to install Matomo on Ubuntu 20.04. It's quite useful to measure the traffic to our...

How to change DNS in Windows 10

Hi! Today we will talk a bit about networks. In fact, we will touch on a topic related to connectivity. Specifically we will see...

The new Windows 10 file explorer will arrive with 21H2 update.

Hello! Microsoft does not stop working (except at Christmas) to continue polishing to Windows 10. In fact, users are gradually receiving the 20H2 update....
x