This VM is a LAPP Web Server installed on Rocky Linux 9.
This AMI supports following versions.
- PHP 8.3
- Apache 2.4
- PostgreSQL 16
Security considerations
- Host firewall: Disabled. External access is restricted by Google Cloud firewall rules (http-server, https-server).
- SELinux: Permissive to avoid blocking Apache/PHP modules.
Web Server
We prepared SSL/TLS so you can access to top page using http:// or https://.
DB Server Password
You can SSH into your instance and retrieve the login credentials by running the following command:
$ cat /home/rocky/credentials ////////////////////credentials info////////////////////--- PostgreSQL----- User : postgres----- Password : qgcbGdyvpy96sEnl////////////////////////////////////////////////////////
Login PostgreSQL SHELL
$ sudo -i -u postgres psql -U postgrespsql (16.8)Type "help" for help.postgres=# SHOW data_directory; data_directory --------------------- /var/lib/pgsql/data(1 row)
or
$ psql -h localhost -U postgresPassword for user postgres: psql (16.8)Type "help" for help.postgres=# SELECT version(); version -------------------------------------------------------------------------------------------------------------- PostgreSQL 16.8 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5), 64-bit(1 row)
Option pgAdmin 4
You can access to PostgreSQL using pgAdmin 4 with ssh tunnel.
ex.) create ssh tunnel
$ gcloud compute ssh --zone "us-west1-a" rocky@vm-instance-name --project "projectname" -- -N -L 5432:localhost:5432
Dashboard

Click Add New Server
General

Type Your DB Server Name
Connection
Click Connection Tab

- Host name/address: localhost
- Port: 5432
- Maintenance database: postgres
- Username: postgres
- Password: *******
Click Save
Let’s use pgAdmin
Double-click the created server.
