Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Required package

Update the Ubuntu repository and install common packages:

Code Block
$ sudo apt-get update
$ sude apt-get install curl git unzip mbstring

Install PHP7.4

It’s crucial to install 7.4, not 8.x

...

Info

In case of any problems, try to remove php-common and repeat the installation of modules

$ sudo apt-get --purge remove php-common

Install composer

Code Block
$ sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Install postgres

Code Block
$ sudo apt-get install postgres

...

Code Block
$ sudo -u postgres psql -c "create database webclient;"
$ sudo -u postgres psql -c "create user webclient;"
$ sudo -u postgres psql -c "alter user webclient with encrypted password 'webclient';"
$ sudo -u postgres psql -c "grant all privileges on database webclient to webclient;"

Install nginx

Code Block
$ sudo apt-get install nginx

...

Code Block
$ sudo systemctl restart nginx

Copy and prepare the code

Copy the package to /var/www/html

...

  1. firebase.php

  2. config.js

  3. config.php

Initialize the database

Open this URL in your browser window

...