From 517e42c18500cb92f6cbb41fa13911073b7c2817 Mon Sep 17 00:00:00 2001 From: Anand Date: Tue, 16 Jul 2024 16:42:06 -0700 Subject: [PATCH 1/4] Update install_php74.sh to include latest PHP version Update install_php74.sh to include latest PHP version --- scripts/install_php74.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_php74.sh b/scripts/install_php74.sh index b6f4757..aa1be66 100644 --- a/scripts/install_php74.sh +++ b/scripts/install_php74.sh @@ -18,10 +18,10 @@ echo "MySQL Shell successfully installed !" if [[ $(uname -r | sed 's/^.*\(el[0-9]\+\).*$/\1/') == "el8" ]] then - dnf -y module enable php:remi-7.4 + dnf -y module enable php:remi-8.2 dnf -y install php php-cli php-mysqlnd php-zip php-gd php-mcrypt php-mbstring php-xml php-json php-opcache else - yum-config-manager --enable remi-php74 + yum-config-manager --enable remi-php82 yum -y install php php-cli php-mysqlnd php-zip php-gd php-mcrypt php-mbstring php-xml php-json php-opcache fi From f3857e0234ad0aa3509444a0e3648b2f0f2eb84a Mon Sep 17 00:00:00 2001 From: Anand Date: Tue, 16 Jul 2024 16:45:47 -0700 Subject: [PATCH 2/4] Update main.tf to run security_script post drupal installation Update main.tf to run security_script post drupal installation --- main.tf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.tf b/main.tf index 48228aa..330600d 100644 --- a/main.tf +++ b/main.tf @@ -555,12 +555,12 @@ resource "null_resource" "drupal_provisioner_without_bastion" { inline = [ "chmod +x ${local.php_script}", "sudo ${local.php_script}", + "chmod +x ${local.install_drupal}", + "sudo ${local.install_drupal}", "chmod +x ${local.security_script}", "sudo ${local.security_script}", "chmod +x ${local.create_drupal_db}", - "sudo ${local.create_drupal_db}", - "chmod +x ${local.install_drupal}", - "sudo ${local.install_drupal}" + "sudo ${local.create_drupal_db}" ] } @@ -701,12 +701,12 @@ resource "null_resource" "drupal_provisioner_with_bastion" { inline = [ "chmod +x ${local.php_script}", "sudo ${local.php_script}", + "chmod +x ${local.install_drupal}", + "sudo ${local.install_drupal}", "chmod +x ${local.security_script}", "sudo ${local.security_script}", "chmod +x ${local.create_drupal_db}", - "sudo ${local.create_drupal_db}", - "chmod +x ${local.install_drupal}", - "sudo ${local.install_drupal}" + "sudo ${local.create_drupal_db}" ] } @@ -847,12 +847,12 @@ resource "null_resource" "drupal_provisioner_with_injected_bastion_server_public inline = [ "chmod +x ${local.php_script}", "sudo ${local.php_script}", + "chmod +x ${local.install_drupal}", + "sudo ${local.install_drupal}", "chmod +x ${local.security_script}", "sudo ${local.security_script}", "chmod +x ${local.create_drupal_db}", - "sudo ${local.create_drupal_db}", - "chmod +x ${local.install_drupal}", - "sudo ${local.install_drupal}" + "sudo ${local.create_drupal_db}" ] } From 640fcc2ffb5c31af630669a549b745263fa95b6f Mon Sep 17 00:00:00 2001 From: Anand Date: Tue, 16 Jul 2024 17:49:19 -0700 Subject: [PATCH 3/4] Update install_drupal.sh to resolve the issue of clean URLs not enabled Update install_drupal.sh to resolve the issue of clean URLs not enabled --- scripts/install_drupal.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/install_drupal.sh b/scripts/install_drupal.sh index da8c9fc..c1650f1 100644 --- a/scripts/install_drupal.sh +++ b/scripts/install_drupal.sh @@ -15,7 +15,7 @@ if [[ $use_shared_storage == "true" ]]; then cd ${drupal_shared_working_dir} else echo "No mount NFS share. Moving to /var/www/html" - cd /var/www/html + cd /var/www/ fi wget https://www.drupal.org/download-latest/tar.gz @@ -26,10 +26,11 @@ if [[ $use_shared_storage == "true" ]]; then rm -rf ${drupal_shared_working_dir}/drupal-* cp ${drupal_shared_working_dir}/sites/default/default.settings.php sites/default/settings.php else - tar zxvf tar.gz --directory /var/www/html - cp -r /var/www/html/drupal-*/* /var/www/html - rm -rf /var/www/html/drupal-* - cp /var/www/html/sites/default/default.settings.php sites/default/settings.php + tar zxvf tar.gz --directory + rm -rf html/ tar.gz + mv drupal-* html + cd html + cp sites/default/default.settings.php sites/default/settings.php fi if [[ $use_shared_storage == "true" ]]; then @@ -44,7 +45,8 @@ if [[ $use_shared_storage == "true" ]]; then rm /home/opc/index.html chown apache:apache ${drupal_shared_working_dir}/index.html else - chown apache:apache -R /var/www/html + cd - + chown apache. -R html sed -i '/AllowOverride None/c\AllowOverride All' /etc/httpd/conf/httpd.conf fi From fbd8c62b1dd465460c35d8b72ce73be18e5df597 Mon Sep 17 00:00:00 2001 From: Anand Date: Tue, 16 Jul 2024 17:50:33 -0700 Subject: [PATCH 4/4] Update install_drupal.sh to fix the clean url issue Update install_drupal.sh to fix the clean url issue --- scripts/install_drupal.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_drupal.sh b/scripts/install_drupal.sh index c1650f1..49c7e41 100644 --- a/scripts/install_drupal.sh +++ b/scripts/install_drupal.sh @@ -26,7 +26,7 @@ if [[ $use_shared_storage == "true" ]]; then rm -rf ${drupal_shared_working_dir}/drupal-* cp ${drupal_shared_working_dir}/sites/default/default.settings.php sites/default/settings.php else - tar zxvf tar.gz --directory + tar zxvf tar.gz rm -rf html/ tar.gz mv drupal-* html cd html