Categories
Uncategorized

Setup Drupal + postgresql+php7.4

Compile php7.4

PHP Displaying empty pages.

In /etc/httpd/conf/httpd.conf ensure the following is in the file

LoadModule php7_module        /usr/lib64/httpd/modules/libphp7.so

Create a new file /etc/httpd/conf.modules.d/php.conf

 PHP Configuration for Apache                                                                                    
#                                                                                                                 
# Load the apache module                                                                                          
#                                                                                                                 
# LoadModule php7_module        /usr/lib64/httpd/modules/libphp7.so                                               
#                                                                                                                 
# Cause the PHP interpreter handle files with a .php extension.                                                   
#                                                                                                                 
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
</Files>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#                                                                                                                 
# Add index.php to the list of files that will be served as directory                                             
# indexes.                                                                                                        
#                                                                                                                 
DirectoryIndex index.php

Find where postgress is installed.

find /usr -wholename '*/bin/postgres'

Setup postgres database:

Install postgres 12

yum install postgresql12-server
/usr/pgsql-12/bin/postgresql-12-setup initdb
su - psotgres

Create user, create database and grant permissions

createuser drupal9 --pwprompt --encrypted
createdb drupal9db --owner=drupal9
psql
\l
grant all privileges on database drupal9db to drupal9;
\q

Postgres 12.x edit pg_hba.conf file

/var/lib/pgsql/12/data/pg_hba.conf

For postgres 9.x

/var/lib/pgsql/data/pg_hba.conf

From

local   replication     all                                     peer
host    replication     all             127.0.0.1/32            ident
host    replication     all             ::1/128                 ident

To

local   replication     all                             md5
host    replication     all             127.0.0.1/32    md5
host    replication     all             ::1/128         md5