<\/span><\/h2>\nApache is the web server of choice for this tutorial. It’s one of the most popular web servers in the world, and that’s what will be serving our web interface. Let’s install it now.<\/p>\n
First, check if Apache is already installed and running on the server:<\/p>\n
dpkg -l | grep -i apache2\nps aux | grep apache2<\/pre>\nIf it is not installed, run the following command to install the Apache web server:<\/p>\n
apt-get install apache2<\/pre>\nEnable Apache service to start automatically upon server boot with:<\/p>\n
systemctl enable apache2<\/pre>\nWe can also check the status of the Apache service with the following command:<\/p>\n
systemctl status apache2<\/pre>\nOutput:<\/p>\n
\u25cf apache2.service – The Apache HTTP Server
\nLoaded: loaded (\/lib\/systemd\/system\/apache2.service; enabled; vendor preset: enabled)
\nDrop-In: \/lib\/systemd\/system\/apache2.service.d
\n\u2514\u2500apache2-systemd.conf
\nActive: active (running) since Fri 2019-06-14 10:13:06 CDT; 1min 4s ago
\nMain PID: 9723 (apache2)
\nTasks: 6 (limit: 2321)
\nCGroup: \/system.slice\/apache2.service
\n\u251c\u25009723 \/usr\/sbin\/apache2 -k start
\n\u251c\u25009726 \/usr\/sbin\/apache2 -k start
\n\u251c\u25009727 \/usr\/sbin\/apache2 -k start
\n\u251c\u25009728 \/usr\/sbin\/apache2 -k start
\n\u251c\u25009729 \/usr\/sbin\/apache2 -k start
\n\u2514\u25009730 \/usr\/sbin\/apache2 -k start<\/p>\n
We can now install PostgreSQL.<\/p>\n
<\/span>Step 3: Install PostgreSQL<\/span><\/h2>\nRun the following command to install PostgreSQL 10.8, the latest version available in the official Ubuntu repositories, along with some required PostgreSQL packages:<\/p>\n
sudo apt-get install postgresql postgresql-client postgresql-client-common postgresql-common postgresql-contrib<\/pre>\nOnce this is done, set a password for the PostgreSQL superuser account (postgres), using the following commands:<\/p>\n
sudo -u postgres psql<\/pre>\npsql (10.8 (Ubuntu 10.8-0ubuntu0.18.04.1))\nType \"help\" for help.<\/pre>\npostgres=# psql\npostgres-# \\password postgres (Enter a new password twice)\npostgres-# \\q<\/pre>\nEdit the PostgreSQL configuration file (pg_hba.conf<\/code>) and enable md5 passwords for local connections:<\/p>\nvi \/etc\/postgresql\/10\/main\/pg_hba.conf<\/pre>\nReplace the following text:<\/p>\n
local all postgres peer\nlocal all all peer<\/pre>\nWith this text instead:<\/p>\n
local all postgres md5\nlocal all all md5<\/pre>\nRestart the PostgreSQL service by executing this line:<\/p>\n
service postgresql restart<\/pre>\nIt is now time to install phpPgAdmin.<\/p>\n