System update and upgrade
Since we are going to install a lot of things it is recommended to update the package list to get the last version of those packages.
_$: apt update _$: apt upgrade
_$: apt install nginx
_$: apt install postgresql
We will install both PHP and the package needed to connect to PostgreSQL databases from your PHP code. If you are going to connect to another database you will have to change that package accordingly (e.g. php7.0-mysql for MySQL).
_$: apt-get install php7.0 _$: apt-get install php7.0-pgsql
php7.0 package will install the following packages:
but we will need some more PHP packages for nextcloud to run:
_$: apt install php7.0-curl php7.0-gd php7.0-mbstring php7.0-xml php7.0-zip