1. Home
  2. Docs
  3. GCP Marketplace
  4. GCP LAPP (PHP8.3) VM on Rocky Linux 9

GCP LAPP (PHP8.3) VM on Rocky Linux 9

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 find the password from Compute Engine console Log.

  1. Go to the Compute Engine console -> VM instances
  1. Select your VM Instance -> Select Serial port 1 (console)

Serial port 1 (console) log

You can also SSH into your instance and find the login credential using the following command.

$ cat /home/rocky/credentials 
////////////////////credentials info////////////////////
--- PostgreSQL
----- User     : postgres
----- Password : qgcbGdyvpy96sEnl
////////////////////////////////////////////////////////

Login PostgreSQL SHELL

$ sudo -i -u postgres psql -U postgres
psql (16.8)
Type "help" for help.

postgres=# SHOW data_directory;
   data_directory    
---------------------
 /var/lib/pgsql/data
(1 row)

or

$ psql -h localhost -U postgres
Password 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.

Reference

Tags ,

How can we help?