How to install GRAV CMS on Oracle Linux 9.3

To Install Grav CMS On Oracle Linux 9.3

Introduction:

Grav is a free, self-hosted Content Management System (CMS) written in PHP. It uses flat-file databases both in the backend and in the frontend. The Grav admin plugin offers an intuitive and simple interface for configuring and creating content.

Procedure Steps:

Step 1: Check the OS version by using the below command

[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="9.3"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.3"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:3:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.3
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.3

Step 2: Install Apache web server by using the below command

[root@linuxhelp ~]# dnf install httpd* -y
Oracle Linux 9 BaseOS Latest (x86_64)                                                                      16 kB/s | 3.6 kB     00:00    
Oracle Linux 9 BaseOS Latest (x86_64)                                                                     6.8 MB/s |  23 MB     00:03    
Oracle Linux 9 Application Stream Packages (x86_64)                                                        22 kB/s | 3.9 kB     00:00    
Oracle Linux 9 Application Stream Packages (x86_64)                                                       8.3 MB/s |  31 MB     00:03    
Oracle Linux 9 UEK Release 7 (x86_64)                                                                      14 kB/s | 3.0 kB     00:00    
Oracle Linux 9 UEK Release 7 (x86_64)                                                                     7.7 MB/s |  31 MB     00:04    
Last metadata expiration check: 0:00:11 ago on Monday 29 April 2024 11:10:22 PM.
Dependencies resolved.
==========================================================================================================================================
 Package                             Architecture            Version                             Repository                          Size
==========================================================================================================================================
Installing:
 httpd                               x86_64                  2.4.57-5.0.1.el9                    ol9_appstream                       65 k
 httpd-core                          x86_64                  2.4.57-5.0.1.el9                    ol9_appstream                      1.8 M
 httpd-devel                         x86_64                  2.4.57-5.0.1.el9                    ol9_appstream                      272 k
 httpd-filesystem                    noarch                  2.4.57-5.0.1.el9                    ol9_appstream                       12 k
 httpd-manual                        noarch                  2.4.57-5.0.1.el9                    ol9_appstream                      2.5 M
 httpd-tools                         x86_64                  2.4.57-5.0.1.el9                    ol9_appstream                       94 k
Installing dependencies:
 apr                                 x86_64                  1.7.0-12.el9_3                      ol9_appstream                      131 k
 apr-devel                           x86_64                  1.7.0-12.el9_3                      ol9_appstream                      279 k
 apr-util                            x86_64                  1.6.1-23.el9                        ol9_appstream                       99 k
 apr-util-bdb                        x86_64                  1.6.1-23.el9                        ol9_appstream                       12 k
 apr-util-devel                      x86_64                  1.6.1-23.el9                        ol9_appstream                      110 k
 cyrus-sasl                          x86_64                  2.1.27-21.el9                       ol9_baseos_latest                   84 k
 cyrus-sasl-devel                    x86_64                  2.1.27-21.el9                       ol9_appstream                      157 k
 expat-devel                         x86_64                  2.5.0-1.el9                         ol9_appstream                       66 k
 libdb-devel                         x86_64                  5.3.28-53.0.1.el9                   ol9_appstream                       36 k
 openldap-devel                      x86_64                  2.6.3-1.el9                         ol9_appstream                      982 k
 oracle-logos-httpd                  noarch                  90.2-1.0.4.el9                      ol9_baseos_latest                   37 k
Installing weak dependencies:
 apr-util-openssl                    x86_64                  1.6.1-23.el9                        ol9_appstream                       14 k
 mod_http2                           x86_64                  1.15.19-5.el9_3.1                   ol9_appstream                      157 k
 mod_lua                             x86_64                  2.4.57-5.0.1.el9                    ol9_appstream                       59 k

Transaction Summary
==========================================================================================================================================
Install  20 Packages

Total download size: 6.9 M
Installed size: 20 M
Downloading Packages:
(1/20): cyrus-sasl-2.1.27-21.el9.x86_64.rpm                                                               162 kB/s |  84 kB     00:00    
(2/20): oracle-logos-httpd-90.2-1.0.4.el9.noarch.rpm                                                       69 kB/s |  37 kB     00:00    
(3/20): apr-devel-1.7.0-12.el9_3.x86_64.rpm                                                               3.2 MB/s | 279 kB     00:00    
(4/20): apr-util-1.6.1-23.el9.x86_64.rpm                                                                  1.1 MB/s |  99 kB     00:00    
(5/20): apr-1.7.0-12.el9_3.x86_64.rpm                                                                     206 kB/s | 131 kB     00:00    
(6/20): apr-util-bdb-1.6.1-23.el9.x86_64.rpm                                                              363 kB/s |  12 kB     00:00    
(7/20): apr-util-openssl-1.6.1-23.el9.x86_64.rpm                                                          276 kB/s |  14 kB     00:00    
(8/20): apr-util-devel-1.6.1-23.el9.x86_64.rpm                                                            1.1 MB/s | 110 kB     00:00    
(9/20): expat-devel-2.5.0-1.el9.x86_64.rpm                                                                1.2 MB/s |  66 kB     00:00    
(10/20): cyrus-sasl-devel-2.1.27-21.el9.x86_64.rpm                                                        1.3 MB/s | 157 kB     00:00    
(11/20): httpd-2.4.57-5.0.1.el9.x86_64.rpm                                                                970 kB/s |  65 kB     00:00    
(12/20): httpd-filesystem-2.4.57-5.0.1.el9.noarch.rpm                                                     683 kB/s |  12 kB     00:00    
(13/20): httpd-devel-2.4.57-5.0.1.el9.x86_64.rpm                                                          1.5 MB/s | 272 kB     00:00    
(14/20): httpd-tools-2.4.57-5.0.1.el9.x86_64.rpm                                                          502 kB/s |  94 kB     00:00    
(15/20): libdb-devel-5.3.28-53.0.1.el9.x86_64.rpm                                                         656 kB/s |  36 kB     00:00    
(16/20): httpd-core-2.4.57-5.0.1.el9.x86_64.rpm                                                           3.2 MB/s | 1.8 MB     00:00    
(17/20): mod_http2-1.15.19-5.el9_3.1.x86_64.rpm                                                           1.2 MB/s | 157 kB     00:00    
(18/20): mod_lua-2.4.57-5.0.1.el9.x86_64.rpm                                                              1.0 MB/s |  59 kB     00:00    
(19/20): httpd-manual-2.4.57-5.0.1.el9.noarch.rpm                                                         3.5 MB/s | 2.5 MB     00:00    
(20/20): openldap-devel-2.6.3-1.el9.x86_64.rpm                                                            3.6 MB/s | 982 kB     00:00    
------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                     4.1 MB/s | 6.9 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                  1/1 
  Installing       : apr-1.7.0-12.el9_3.x86_64                                                                                       1/20 
  Installing       : apr-util-bdb-1.6.1-23.el9.x86_64                                                                                2/20 
  Installing       : apr-util-openssl-1.6.1-23.el9.x86_64                                                                            3/20 
  Installing       : apr-util-1.6.1-23.el9.x86_64                                                                                    4/20 
  Installing       : apr-devel-1.7.0-12.el9_3.x86_64                                                                                 5/20 
  Installing       : httpd-tools-2.4.57-5.0.1.el9.x86_64                                                                             6/20 
  Installing       : libdb-devel-5.3.28-53.0.1.el9.x86_64                                                                            7/20 
  Running scriptlet: httpd-filesystem-2.4.57-5.0.1.el9.noarch                                                                        8/20 
  Installing       : httpd-filesystem-2.4.57-5.0.1.el9.noarch                                                                        8/20 
  Installing       : httpd-core-2.4.57-5.0.1.el9.x86_64                                                                              9/20 
  Installing       : mod_lua-2.4.57-5.0.1.el9.x86_64                                                                                10/20 
  Installing       : expat-devel-2.5.0-1.el9.x86_64                                                                                 11/20 
  Installing       : oracle-logos-httpd-90.2-1.0.4.el9.noarch                                                                       12/20 
  Installing       : mod_http2-1.15.19-5.el9_3.1.x86_64                                                                             13/20 
  Installing       : httpd-2.4.57-5.0.1.el9.x86_64                                                                                  14/20 
  Running scriptlet: httpd-2.4.57-5.0.1.el9.x86_64                                                                                  14/20 
  Running scriptlet: cyrus-sasl-2.1.27-21.el9.x86_64                                                                                15/20 
  Installing       : cyrus-sasl-2.1.27-21.el9.x86_64                                                                                15/20 
  Running scriptlet: cyrus-sasl-2.1.27-21.el9.x86_64                                                                                15/20 
  Installing       : cyrus-sasl-devel-2.1.27-21.el9.x86_64                                                                          16/20 
  Installing       : openldap-devel-2.6.3-1.el9.x86_64                                                                              17/20 
  Installing       : apr-util-devel-1.6.1-23.el9.x86_64                                                                             18/20 
  Installing       : httpd-devel-2.4.57-5.0.1.el9.x86_64                                                                            19/20 
  Installing       : httpd-manual-2.4.57-5.0.1.el9.noarch                                                                           20/20 
  Running scriptlet: httpd-2.4.57-5.0.1.el9.x86_64                                                                                  20/20 
  Running scriptlet: httpd-manual-2.4.57-5.0.1.el9.noarch                                                                           20/20 
  Verifying        : cyrus-sasl-2.1.27-21.el9.x86_64                                                                                 1/20 
  Verifying        : oracle-logos-httpd-90.2-1.0.4.el9.noarch                                                                        2/20 
  Verifying        : apr-1.7.0-12.el9_3.x86_64                                                                                       3/20 
  Verifying        : apr-devel-1.7.0-12.el9_3.x86_64                                                                                 4/20 
  Verifying        : apr-util-1.6.1-23.el9.x86_64                                                                                    5/20 
  Verifying        : apr-util-bdb-1.6.1-23.el9.x86_64                                                                                6/20 
  Verifying        : apr-util-devel-1.6.1-23.el9.x86_64                                                                              7/20 
  Verifying        : apr-util-openssl-1.6.1-23.el9.x86_64                                                                            8/20 
  Verifying        : cyrus-sasl-devel-2.1.27-21.el9.x86_64                                                                           9/20 
  Verifying        : expat-devel-2.5.0-1.el9.x86_64                                                                                 10/20 
  Verifying        : httpd-2.4.57-5.0.1.el9.x86_64                                                                                  11/20 
  Verifying        : httpd-core-2.4.57-5.0.1.el9.x86_64                                                                             12/20 
  Verifying        : httpd-devel-2.4.57-5.0.1.el9.x86_64                                                                            13/20 
  Verifying        : httpd-filesystem-2.4.57-5.0.1.el9.noarch                                                                       14/20 
  Verifying        : httpd-manual-2.4.57-5.0.1.el9.noarch                                                                           15/20 
  Verifying        : httpd-tools-2.4.57-5.0.1.el9.x86_64                                                                            16/20 
  Verifying        : libdb-devel-5.3.28-53.0.1.el9.x86_64                                                                           17/20 
  Verifying        : mod_http2-1.15.19-5.el9_3.1.x86_64                                                                             18/20 
  Verifying        : mod_lua-2.4.57-5.0.1.el9.x86_64                                                                                19/20 
  Verifying        : openldap-devel-2.6.3-1.el9.x86_64                                                                              20/20 

Installed:
  apr-1.7.0-12.el9_3.x86_64                      apr-devel-1.7.0-12.el9_3.x86_64                apr-util-1.6.1-23.el9.x86_64              
  apr-util-bdb-1.6.1-23.el9.x86_64               apr-util-devel-1.6.1-23.el9.x86_64             apr-util-openssl-1.6.1-23.el9.x86_64      
  cyrus-sasl-2.1.27-21.el9.x86_64                cyrus-sasl-devel-2.1.27-21.el9.x86_64          expat-devel-2.5.0-1.el9.x86_64            
  httpd-2.4.57-5.0.1.el9.x86_64                  httpd-core-2.4.57-5.0.1.el9.x86_64             httpd-devel-2.4.57-5.0.1.el9.x86_64       
  httpd-filesystem-2.4.57-5.0.1.el9.noarch       httpd-manual-2.4.57-5.0.1.el9.noarch           httpd-tools-2.4.57-5.0.1.el9.x86_64       
  libdb-devel-5.3.28-53.0.1.el9.x86_64           mod_http2-1.15.19-5.el9_3.1.x86_64             mod_lua-2.4.57-5.0.1.el9.x86_64           
  openldap-devel-2.6.3-1.el9.x86_64              oracle-logos-httpd-90.2-1.0.4.el9.noarch      

Complete!

Step 3: Enable and start the Apache Service by using the below command

[root@linuxhelp ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
 [root@linuxhelp ~]# systemctl start httpd

Step 4: Check the status of the Apache service by using the below command

[root@linuxhelp ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
     Active: active (running) since Mon 2024-04-29 23:11:43 IST; 18s ago
       Docs: man:httpd.service(8)
   Main PID: 104264 (httpd)
     Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec:   0 B/sec"
      Tasks: 213 (limit: 21644)
     Memory: 29.5M
        CPU: 631ms
     CGroup: /system.slice/httpd.service
             ├─104264 /usr/sbin/httpd -DFOREGROUND
             ├─104265 /usr/sbin/httpd -DFOREGROUND
             ├─104266 /usr/sbin/httpd -DFOREGROUND
             ├─104268 /usr/sbin/httpd -DFOREGROUND
             └─104270 /usr/sbin/httpd -DFOREGROUND

Apr 29 23:11:42 linuxhelp systemd[1]: Starting The Apache HTTP Server...
Apr 29 23:11:43 linuxhelp httpd[104264]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe8>
Apr 29 23:11:43 linuxhelp httpd[104264]: Server configured, listening on: port 80
Apr 29 23:11:43 linuxhelp systemd[1]: Started The Apache HTTP Server.

Step 5: Install PHP and its modules by using the below command

[root@linuxhelp ~]# dnf install php php-fpm php-mysqlnd php-opcache php-gd php-xml php-mbstring -y php-zip
Last metadata expiration check: 0:01:59 ago on Monday 29 April 2024 11:10:22 PM.
Dependencies resolved.
==========================================================================================================================================
 Package                           Architecture            Version                                   Repository                      Size
==========================================================================================================================================
Installing:
 php                               x86_64                  8.0.30-1.el9_2                            ol9_appstream                  7.6 k
 php-fpm                           x86_64                  8.0.30-1.el9_2                            ol9_appstream                  1.6 M
 php-gd                            x86_64                  8.0.30-1.el9_2                            ol9_appstream                   39 k
 php-mbstring                      x86_64                  8.0.30-1.el9_2                            ol9_appstream                  467 k
 php-mysqlnd                       x86_64                  8.0.30-1.el9_2                            ol9_appstream                  155 k
 php-opcache                       x86_64                  8.0.30-1.el9_2                            ol9_appstream                  509 k
 php-pecl-zip                      x86_64                  1.19.2-6.el9                              ol9_appstream                   78 k
 php-xml                           x86_64                  8.0.30-1.el9_2                            ol9_appstream                  144 k
Installing dependencies:
 libzip                            x86_64                  1.7.3-7.el9                               ol9_appstream                   63 k
 nginx-filesystem                  noarch                  1:1.20.1-14.0.1.el9_2.1                   ol9_appstream                  8.4 k
 php-common                        x86_64                  8.0.30-1.el9_2                            ol9_appstream                  714 k
 php-pdo                           x86_64                  8.0.30-1.el9_2                            ol9_appstream                   87 k
Installing weak dependencies:
 php-cli                           x86_64                  8.0.30-1.el9_2                            ol9_appstream                  3.1 M

Transaction Summary
==========================================================================================================================================
Install  13 Packages

Total download size: 6.9 M
Installed size: 36 M
Downloading Packages:
(1/13): php-8.0.30-1.el9_2.x86_64.rpm                                                                      12 kB/s | 7.6 kB     00:00    
(2/13): nginx-filesystem-1.20.1-14.0.1.el9_2.1.noarch.rpm                                                  13 kB/s | 8.4 kB     00:00    
(3/13): libzip-1.7.3-7.el9.x86_64.rpm                                                                      87 kB/s |  63 kB     00:00    
(4/13): php-common-8.0.30-1.el9_2.x86_64.rpm                                                              1.2 MB/s | 714 kB     00:00    
(5/13): php-gd-8.0.30-1.el9_2.x86_64.rpm                                                                  630 kB/s |  39 kB     00:00    
(6/13): php-cli-8.0.30-1.el9_2.x86_64.rpm                                                                 3.2 MB/s | 3.1 MB     00:00    
(7/13): php-fpm-8.0.30-1.el9_2.x86_64.rpm                                                                 1.7 MB/s | 1.6 MB     00:00    
(8/13): php-mbstring-8.0.30-1.el9_2.x86_64.rpm                                                            1.1 MB/s | 467 kB     00:00    
(9/13): php-mysqlnd-8.0.30-1.el9_2.x86_64.rpm                                                             849 kB/s | 155 kB     00:00    
(10/13): php-pdo-8.0.30-1.el9_2.x86_64.rpm                                                                978 kB/s |  87 kB     00:00    
(11/13): php-pecl-zip-1.19.2-6.el9.x86_64.rpm                                                             1.0 MB/s |  78 kB     00:00    
(12/13): php-opcache-8.0.30-1.el9_2.x86_64.rpm                                                            2.0 MB/s | 509 kB     00:00    
(13/13): php-xml-8.0.30-1.el9_2.x86_64.rpm                                                                1.4 MB/s | 144 kB     00:00    
------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                     3.5 MB/s | 6.9 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                  1/1 
  Installing       : php-common-8.0.30-1.el9_2.x86_64                                                                                1/13 
  Installing       : php-pdo-8.0.30-1.el9_2.x86_64                                                                                   2/13 
  Installing       : php-cli-8.0.30-1.el9_2.x86_64                                                                                   3/13 
  Installing       : php-mbstring-8.0.30-1.el9_2.x86_64                                                                              4/13 
  Installing       : php-opcache-8.0.30-1.el9_2.x86_64                                                                               5/13 
  Installing       : php-xml-8.0.30-1.el9_2.x86_64                                                                                   6/13 
  Running scriptlet: nginx-filesystem-1:1.20.1-14.0.1.el9_2.1.noarch                                                                 7/13 
  Installing       : nginx-filesystem-1:1.20.1-14.0.1.el9_2.1.noarch                                                                 7/13 
  Installing       : php-fpm-8.0.30-1.el9_2.x86_64                                                                                   8/13 
  Running scriptlet: php-fpm-8.0.30-1.el9_2.x86_64                                                                                   8/13 
  Installing       : libzip-1.7.3-7.el9.x86_64                                                                                       9/13 
  Installing       : php-pecl-zip-1.19.2-6.el9.x86_64                                                                               10/13 
  Installing       : php-8.0.30-1.el9_2.x86_64                                                                                      11/13 
  Installing       : php-mysqlnd-8.0.30-1.el9_2.x86_64                                                                              12/13 
  Installing       : php-gd-8.0.30-1.el9_2.x86_64                                                                                   13/13 
  Running scriptlet: php-gd-8.0.30-1.el9_2.x86_64                                                                                   13/13 
  Verifying        : libzip-1.7.3-7.el9.x86_64                                                                                       1/13 
  Verifying        : nginx-filesystem-1:1.20.1-14.0.1.el9_2.1.noarch                                                                 2/13 
  Verifying        : php-8.0.30-1.el9_2.x86_64                                                                                       3/13 
  Verifying        : php-cli-8.0.30-1.el9_2.x86_64                                                                                   4/13 
  Verifying        : php-common-8.0.30-1.el9_2.x86_64                                                                                5/13 
  Verifying        : php-fpm-8.0.30-1.el9_2.x86_64                                                                                   6/13 
  Verifying        : php-gd-8.0.30-1.el9_2.x86_64                                                                                    7/13 
  Verifying        : php-mbstring-8.0.30-1.el9_2.x86_64                                                                              8/13 
  Verifying        : php-mysqlnd-8.0.30-1.el9_2.x86_64                                                                               9/13 
  Verifying        : php-opcache-8.0.30-1.el9_2.x86_64                                                                              10/13 
  Verifying        : php-pdo-8.0.30-1.el9_2.x86_64                                                                                  11/13 
  Verifying        : php-pecl-zip-1.19.2-6.el9.x86_64                                                                               12/13 
  Verifying        : php-xml-8.0.30-1.el9_2.x86_64                                                                                  13/13 

Installed:
  libzip-1.7.3-7.el9.x86_64                nginx-filesystem-1:1.20.1-14.0.1.el9_2.1.noarch        php-8.0.30-1.el9_2.x86_64               
  php-cli-8.0.30-1.el9_2.x86_64            php-common-8.0.30-1.el9_2.x86_64                       php-fpm-8.0.30-1.el9_2.x86_64           
  php-gd-8.0.30-1.el9_2.x86_64             php-mbstring-8.0.30-1.el9_2.x86_64                     php-mysqlnd-8.0.30-1.el9_2.x86_64       
  php-opcache-8.0.30-1.el9_2.x86_64        php-pdo-8.0.30-1.el9_2.x86_64                          php-pecl-zip-1.19.2-6.el9.x86_64        
  php-xml-8.0.30-1.el9_2.x86_64           

Complete!

Step 6: Download the Grav CMS Package by using the below command

[root@linuxhelp ~]# wget https://getgrav.org/download/core/grav-admin/1.7.43
--2024-04-29 23:12:46--  https://getgrav.org/download/core/grav-admin/1.7.43
Resolving getgrav.org (getgrav.org)... 104.26.2.204, 104.26.3.204, 172.67.72.160, ...
Connecting to getgrav.org (getgrav.org)|104.26.2.204|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/getgrav/grav/releases/download/1.7.43/grav-admin-v1.7.43.zip [following]
--2024-04-29 23:12:48--  https://github.com/getgrav/grav/releases/download/1.7.43/grav-admin-v1.7.43.zip
Resolving github.com (github.com)... 20.207.73.82
Connecting to github.com (github.com)|20.207.73.82|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/22553797/4b6c5dac-1303-4dc7-b798-e829fdf01a76?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240429%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240429T174249Z&X-Amz-Expires=300&X-Amz-Signature=4e093cf23d522f9c19ed70224a2f647196bdf7f2384140de952ee2897529a1b8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=22553797&response-content-disposition=attachment%3B%20filename%3Dgrav-admin-v1.7.43.zip&response-content-type=application%2Foctet-stream [following]
--2024-04-29 23:12:49--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/22553797/4b6c5dac-1303-4dc7-b798-e829fdf01a76?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240429%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240429T174249Z&X-Amz-Expires=300&X-Amz-Signature=4e093cf23d522f9c19ed70224a2f647196bdf7f2384140de952ee2897529a1b8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=22553797&response-content-disposition=attachment%3B%20filename%3Dgrav-admin-v1.7.43.zip&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18567688 (18M) [application/octet-stream]
Saving to: ‘1.7.43’

1.7.43                             100%[==============================================================>]  17.71M  10.8MB/s    in 1.6s    

2024-04-29 23:12:51 (10.8 MB/s) - ‘1.7.43’ saved [18567688/18567688]

Step 7: Long list the files by using the below command

[root@linuxhelp ~]# ll
total 18140
-rw-r--r--. 1 root root 18567688 Oct  2  2023 1.7.43
-rw-------. 1 root root     1067 Jan  7 03:03 anaconda-ks.cfg
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Desktop
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Documents
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Downloads
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Music
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Pictures
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Public
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Templates
drwxr-xr-x. 2 root root        6 Jan  7 03:26 Videos

Step 8: Extract the downloaded zip file by using unzip the command

[root@linuxhelp ~]# unzip 1.7.43
Archive:  1.7.43
   creating: grav-admin/
  inflating: grav-admin/index.php    
  inflating: grav-admin/now.json     
  inflating: grav-admin/.htaccess    
   creating: grav-admin/images/
  inflating: grav-admin/images/.gitkeep  
   creating: grav-admin/assets/
  inflating: grav-admin/assets/.gitkeep  
   creating: grav-admin/.phan/
   creating: grav-admin/.phan/internal_stubs/
  inflating: grav-admin/.phan/internal_stubs/Redis.phan_php  
  inflating: grav-admin/.phan/internal_stubs/memcached.phan_php  
  inflating: grav-admin/.phan/internal_stubs/memcache.phan_php  
  inflating: grav-admin/.phan/config.php  
   creating: grav-admin/webserver-configs/
  inflating: grav-admin/webserver-configs/Caddyfile  
  inflating: grav-admin/webserver-configs/Caddyfile-0.8.x  
  inflating: grav-admin/webserver-configs/htaccess.txt  
  inflating: grav-admin/webserver-configs/nginx.conf  
  inflating: grav-admin/webserver-configs/lighttpd.conf  
  inflating: grav-admin/webserver-configs/web.config  
  inflating: grav-admin/README.md    
   creating: grav-admin/.github/
  inflating: grav-admin/.github/FUNDING.yml  
   creating: grav-admin/backup/
  inflating: grav-admin/backup/.gitkeep  
   creating: grav-admin/cache/
  inflating: grav-admin/cache/.gitkeep  
  inflating: grav-admin/CHANGELOG.md  
   creating: grav-admin/tmp/
  inflating: grav-admin/tmp/.gitkeep  
  inflating: grav-admin/robots.txt   
  inflating: grav-admin/CODE_OF_CONDUCT.md  
  inflating: grav-admin/composer.lock  
  inflating: grav-admin/LICENSE.txt  
  inflating: grav-admin/composer.json  
   creating: grav-admin/system/
   creating: grav-admin/system/images/
   creating: grav-admin/system/images/media/
  inflating: grav-admin/system/images/media/thumb-7z.png  
  inflating: grav-admin/system/images/media/thumb-bat.png  
  inflating: grav-admin/system/images/media/thumb-wps.png  
  inflating: grav-admin/system/images/media/thumb-csr.png  
  inflating: grav-admin/system/images/media/thumb-dbf.png  
  inflating: grav-admin/system/images/media/thumb-woff.png  
  inflating: grav-admin/system/images/media/thumb-pdf.png  
  inflating: grav-admin/system/images/media/thumb-odx.png  
  inflating: grav-admin/system/images/media/thumb-exe.png  
  inflating: grav-admin/system/images/media/thumb-cur.png  

Step 9: Again long list the files and check the extracted directory

[root@linuxhelp ~]# ll
total 18144
-rw-r--r--.  1 root root 18567688 Oct  2  2023 1.7.43
-rw-------.  1 root root     1067 Jan  7 03:03 anaconda-ks.cfg
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Desktop
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Documents
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Downloads
drwxr-xr-x. 15 root root     4096 Oct  2  2023 grav-admin
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Music
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Pictures
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Public
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Templates
drwxr-xr-x.  2 root root        6 Jan  7 03:26 Videos

Step 10: Rename and Move the Extracted Directory to Apache Root Directory by using the below command

[root@linuxhelp ~]# mv grav-admin/ /var/www/grav/

Step 11: Grant Permission and Set Ownership for Grav CMS by using the below command

[root@linuxhelp ~]# chmod -R 755 /var/www/grav/
 [root@linuxhelp ~]# chown -R apache:apache /var/www/grav/

Step 12: Create a Virtual Configuration file to Access Grav CMS by using the below command.

[root@linuxhelp ~]# vim /etc/httpd/conf.d/grav.conf
Insert the below lines in the configuration file
<virtualhost 192.168.6.140:80>
servername  www.linuxhelp1.com
Documentroot  /var/www/grav
<Directory /var/www/grav >
AllowOverride all
allow from all
</Directory>
</virtualhost>

Step 13: Disable the SELinux by using the below command

[root@linuxhelp ~]# setenforce 0

Step 14: Restart the Apache service to apply all changes by using the below command

[root@linuxhelp ~]# systemctl restart httpd

Step 15: Open the Web browser and search the IP address as shown in the below image

Step 16: Here create an admin account to ensure your GRAV install is secure.

This is the Dashboard page of Grav CMS

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install Grav CMS on Oracle Linux 9.3. Your feedback is much welcome.

FAQ
Q
Are there any backup recommendations available for Grav CMS?
A
To back up your Grav files and configurations regularly. Consider using tools like rsync or tar to create backups, and schedule automatic backups to prevent data loss.
Q
How do I update Grav to the latest version?
A
To update Grav, navigate to the Grav directory and use the Grav Package Manager (GPM):
cd /var/www/html/grav
bin/gpm selfupgrade
bin/gpm update
Q
What should be the Grav admin interface URL after the installation?
A
The Grav admin interface is typically accessed at http://your-server-ip/admin or http://your-domain/admin. Ensure that you secure the admin interface with strong credentials.
Q
Can I install Grav CMS in a subdirectory?
A
Yes, you can install Grav in a subdirectory by adjusting the Apache configuration or using a virtual host. Update the DocumentRoot and settings accordingly.
Q
What is Grav CMS?
A
Grav is an open-source flat-file CMS (Content Management System) written in PHP. It is designed to be fast, flexible, and easy to use.