apt -y update && apt -y upgrade
reboot
Install dependency
apt install gnupg gnupg2 gnupg1 -y
Download the key used to sign NGINX packages and the repository, and add it to the apt program’s key ring
sudo wget https://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
Edit the nano /etc/apt/sources.list file and add these lines
deb https://nginx.org/packages/mainline/ubuntu/ <CODENAME> nginx
deb-src https://nginx.org/packages/mainline/ubuntu/ <CODENAME> nginx
Install nginx
apt -y update
apt -y install nginx
Install dependency
apt -y install software-properties-common
add-apt-repository ppa:ondrej/php
apt update
apt install php8.0 php8.0-{mysql,pgsql,gd,cli,common,snmp,ldap,curl,mbstring,zip,fpm,mongodb,intl,xml,imagick,xmlrpc,soap}
apt install php7.4 php7.4-{mysql,pgsql,gd,cli,common,snmp,ldap,curl,mbstring,zip,fpm,mongodb,intl,xml,imagick,xmlrpc,soap}
Edit nano /etc/php/7.4/fpm/pool.d/www.conf (if using php 7.4)
user = nginx
group = nginx
;listen = /run/php/php8.0-fpm.sock
listen = /run/php/php7.4-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
apt install certbot python3-certbot-nginx
Referensi:
- https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/
- https://wiki.crowncloud.net/?How_to_install_php_8_on_Ubuntu_21_04
- https://gist.github.com/virbo/3e4fbe0beda84833947e30a81d7d7b49
- https://phoenixnap.com/kb/letsencrypt-nginx
- https://www.server-world.info/en/note?os=Ubuntu_21.04&p=postgresql&f=1
- https://www.atlassian.com/data/admin/how-to-change-a-user-to-superuser-in-postgresql
- https://www.postgresqltutorial.com/postgresql-administration/postgresql-change-password/