• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install Grav CMS on Rocky Linux 9.3

  • 00:32 Cat /etc/os-release
  • 00:48 dnf install httpd -y
  • 01:29 systemctl enable https
  • 01:39 systemctl start httpd
  • 01:52 systemctl status httpd
  • 02:10 dnf install php php-fpm php-mysqlnd php-opcache php-gd php-xml php-mbstring -y php-zip
  • 02:32 wget https://getgrav.org/download/core/grav-admin/1.7.43
  • 02:43 ll
  • 02:55 unzip 1.7.43
  • 03:11 ll
  • 03:25 mv grav-admin /var/www/grav
  • 03:44 chmod -R 775 /var/www/grav/
  • 04:00 chown -R apache:apache /var/www/grav/
  • 04:22 vim /etc/httpd/conf.d/grav.conf
  • 05:04 setenforce 0
  • 05:16 systemctl restart httpd
7718

To Install Grav CMS On Rocky 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.

Installation Steps:

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

[root@Linuxhelp ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.3 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.3"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

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

[root@Linuxhelp ~]# dnf install httpd -y
Rocky Linux 9 - BaseOS                                                                  5.0 kB/s | 4.1 kB     00:00    
Rocky Linux 9 - BaseOS                                                                  1.5 MB/s | 2.2 MB     00:01    
Rocky Linux 9 - AppStream                                                               4.4 kB/s | 4.5 kB     00:01    
Rocky Linux 9 - AppStream                                                               4.1 MB/s | 7.4 MB     00:01    
Rocky Linux 9 - Extras                                                                  3.6 kB/s | 2.9 kB     00:00    
Dependencies resolved.
========================================================================================================================
 Package                          Architecture          Version                          Repository                Size
========================================================================================================================
Installing:
 httpd                            x86_64                2.4.57-5.el9                     appstream                 46 k
Installing dependencies:
 apr                              x86_64                1.7.0-12.el9_3                   appstream                122 k
 apr-util                         x86_64                1.6.1-23.el9                     appstream                 94 k
httpd-tools                      x86_64                2.4.57-5.el9                     appstream                 80 k
 rocky-logos-httpd                noarch                90.14-2.el9                      appstream                 24 k
Installing weak dependencies:
 apr-util-openssl                 x86_64                1.6.1-23.el9                     appstream                 14 k
 mod_http2                        x86_64                1.15.19-5.el9                    appstream                148 k
 mod_lua                          x86_64                2.4.57-5.el9                     appstream                 60 k

Transaction Summary
========================================================================================================================
Install  11 Packages

Total download size: 2.0 M
Installed size: 6.0 M
Downloading Packages:
(1/11): rocky-logos-httpd-90.14-2.el9.noarch.rpm                                        113 kB/s |  24 kB     00:00    
(2/11): httpd-tools-2.4.57-5.el9.x86_64.rpm                                             350 kB/s |  80 kB     00:00    
(3/11): mod_lua-2.4.57-5.el9.x86_64.rpm                                                 247 kB/s |  60 kB     00:00    
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   1.6 MB/s | 2.0 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/11 
  Installing       : apr-util-bdb-1.6.1-23.el9.x86_64                                                              2/11 
  Installing       : apr-util-1.6.1-23.el9.x86_64                                                                  3/11 
  Verifying        : rocky-logos-httpd-90.14-2.el9.noarch                                                          1/11 
  Verifying        : mod_lua-2.4.57-5.el9.x86_64                                                                   2/11 
  Verifying        : httpd-tools-2.4.57-5.el9.x86_64                                                               3/11 
Installed:
  apr-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-openssl-1.6.1-23.el9.x86_64     httpd-2.4.57-5.el9.x86_64                httpd-core-2.4.57-5.el9.x86_64      
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 Wed 2023-12-20 02:53:27 IST; 20s ago
       Docs: man:httpd.service(8)
   Main PID: 215243 (httpd)
     Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec:   0 B/sec"
      Tasks: 213 (limit: 22877)
     Memory: 29.3M
        CPU: 253ms
     CGroup: /system.slice/httpd.service
             +-215243 /usr/sbin/httpd -DFOREGROUND
             +-215244 /usr/sbin/httpd -DFOREGROUND
             +-215246 /usr/sbin/httpd -DFOREGROUND
             +-215249 /usr/sbin/httpd -DFOREGROUND
             +-215250 /usr/sbin/httpd -DFOREGROUND

Dec 20 02:53:26 Linuxhelp systemd[1]: Starting The Apache HTTP Server...
Dec 20 02:53:27 Linuxhelp httpd[215243]: AH00558: httpd: Could not reliably determine the server's fully qualified doma>
Dec 20 02:53:27 Linuxhelp systemd[1]: Started The Apache HTTP Server.
Dec 20 02:53:27 Linuxhelp httpd[215243]: Server configured, listening on: port 80

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:49 ago on Wednesday 20 December 2023 02:52:40 AM.
Dependencies resolved.
========================================================================================================================
 Package                        Architecture         Version                              Repository               Size
========================================================================================================================
Installing:
 php                            x86_64               8.0.30-1.el9_2                       appstream               7.7 k
 php-fpm                        x86_64               8.0.30-1.el9_2                       appstream               1.6 M
 php-gd                         x86_64               8.0.30-1.el9_2                       appstream                39 k
php-pecl-zip                   x86_64               1.19.2-6.el9                         appstream                54 k
 php-xml                        x86_64               8.0.30-1.el9_2                       appstream               131 k
Installing dependencies:
 libzip                         x86_64               1.7.3-7.el9                          appstream                62 k
php-pdo                        x86_64               8.0.30-1.el9_2                       appstream                81 k
Installing weak dependencies:
 php-cli                        x86_64               8.0.30-1.el9_2                       appstream               3.1 M

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

Total download size: 6.8 M
Installed size: 36 M
Downloading Packages:
(1/13): nginx-filesystem-1.20.1-14.el9_2.1.noarch.rpm                                    22 kB/s | 8.5 kB     00:00    
(2/13): libzip-1.7.3-7.el9.x86_64.rpm                                                   137 kB/s |  62 kB     00:00    
(3/13): php-pecl-zip-1.19.2-6.el9.x86_64.rpm                                            117 kB/s |  54 kB     00:00    
------------------------------------------------------------------------------------------------------------------------
Total                                                                                   3.3 MB/s | 6.8 MB     00:02     
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-xml-8.0.30-1.el9_2.x86_64                                                                 3/13 
  Verifying        : nginx-filesystem-1:1.20.1-14.el9_2.1.noarch                                                   1/13 
  Verifying        : libzip-1.7.3-7.el9.x86_64                                                                     2/13 
  Verifying        : php-pecl-zip-1.19.2-6.el9.x86_64                                                              3/13 
Installed:
  libzip-1.7.3-7.el9.x86_64           nginx-filesystem-1:1.20.1-14.el9_2.1.noarch   php-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
--2023-12-20 02:55:06--  https://getgrav.org/download/core/grav-admin/1.7.43
Resolving getgrav.org (getgrav.org)... 172.67.72.160, 104.26.3.204, 104.26.2.204, ...
Connecting to getgrav.org (getgrav.org)|172.67.72.160|: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]
--2023-12-20 02:55:07--  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
.githubusercontent.com)... 185.199.110.133, 185.199.108.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.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  11.2MB/s    in 1.6s    
2023-12-20 02:55:10 (11.2 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 22:12 1.7.43
-rw-------. 1 root root     1039 Aug 13 22:24 anaconda-ks.cfg
drwxr-xr-x. 2 root root        6 Aug 13 22:33 Desktop
drwxr-xr-x. 2 root root        6 Aug 13 22:33 Documents
drwxr-xr-x. 2 root root        6 Aug 13 22:33 Downloads
drwxr-xr-x. 2 root root        6 Aug 13 22:33 Music
drwxr-xr-x. 2 root root        6 Aug 13 22:33 Pictures
drwxr-xr-x. 2 root root        6 Aug 13 22:33 Public
drwxr-xr-x. 2 root root        6 Aug 13 22:33 Templates
drwxr-xr-x. 2 root root        6 Aug 13 22:33 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/
  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

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 22:12 1.7.43
-rw-------.  1 root root     1039 Aug 13 22:24 anaconda-ks.cfg
drwxr-xr-x.  2 root root        6 Aug 13 22:33 Desktop
drwxr-xr-x.  2 root root        6 Aug 13 22:33 Documents
drwxr-xr-x.  2 root root        6 Aug 13 22:33 Downloads
drwxr-xr-x. 15 root root     4096 Oct  2 22:12 grav-admin
drwxr-xr-x.  2 root root        6 Aug 13 22:33 Music
drwxr-xr-x.  2 root root        6 Aug 13 22:33 Pictures
drwxr-xr-x.  2 root root        6 Aug 13 22:33 Public
drwxr-xr-x.  2 root root        6 Aug 13 22:33 Templates
drwxr-xr-x.  2 root root        6 Aug 13 22:33 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 775 /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.130: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 following command

[root@Linuxhelp ~]# setenforce 0

Step 14: Restart the Apache service to apply all changes.

[root@Linuxhelp ~]# systemctl restart httpd

Step 15: Open the Web browser and search the IP address as shown in the below image Snap 1 Here create a admin account to ensure your GRAV install is secure. Snap 2 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 Rocky Linux 9.3. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

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.

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's the Grav admin interface URL after 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

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

Are there backup recommendations for Grav CMS?

A

Regularly back up your Grav files and configurations. Consider using tools like rsync or tar to create backups, and schedule automatic backups to prevent data loss.

Related Tutorials in How to install Grav CMS on Rocky Linux 9.3

Related Tutorials in How to install Grav CMS on Rocky Linux 9.3

How to install Tiki Wiki CMS Groupware on CentOS 7
How to install Tiki Wiki CMS Groupware on CentOS 7
May 31, 2018
How to Install Pligg - Content Management System
How to Install Pligg - Content Management System
Jul 26, 2016
How to install Xibo CMS in Ubuntu
How to install Xibo CMS in Ubuntu
Oct 6, 2016
How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
Oct 17, 2022
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to Install Tiki Wiki CMS on Ubuntu 19.04
How to Install Tiki Wiki CMS on Ubuntu 19.04
May 28, 2019
How to Install and Configure Mega in Linux
How to Install and Configure Mega in Linux
Jul 19, 2016
How to Install Alfresco Community Edition in Ubuntu
How to Install Alfresco Community Edition in Ubuntu
Nov 22, 2016

Related Forums in How to install Grav CMS on Rocky Linux 9.3

Related Forums in How to install Grav CMS on Rocky Linux 9.3

Linux
jayce class=
shasum command not found
May 5, 2017
Linux
stephan class=
How to list all samba users
Jan 12, 2018
pv command
muhammad class=
pvcreate command not found error
May 9, 2017
Linux
henry class=
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Apr 25, 2017
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Linux
baseer class=
single command to apply setfacl for multiple user at a time
Jan 23, 2018
Linux
beulah class=
What does mean by 0 0 value in fstab file
Jan 2, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018

Related News in How to install Grav CMS on Rocky Linux 9.3

Related News in How to install Grav CMS on Rocky Linux 9.3

Anbox, the Android-to-Linux tool the developers have been waiting for
Anbox, the Android-to-Linux tool the developers have been waiting for
Apr 17, 2017
Linus Torvalds stops signing Linux kernel RC tarballs
Linus Torvalds stops signing Linux kernel RC tarballs
May 17, 2017
Capsule8 Launches Linux-Based Container Security Platform
Capsule8 Launches Linux-Based Container Security Platform
Feb 14, 2017
Symantec updates Management console product
Symantec updates Management console product
Nov 22, 2017
Latest Linux driver release feature seven AMD Vega
Latest Linux driver release feature seven AMD Vega
Mar 23, 2017
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
Apr 9, 2019
Microsoft makes its Azure App service now available on Linux Systems
Microsoft makes its Azure App service now available on Linux Systems
Sep 7, 2017
Docker friendly Alpine Linux gets hardened Node.js
Docker friendly Alpine Linux gets hardened Node.js
Apr 19, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Gibbson ?
How do i run both nginx and apache in same instance on centos

Hi...,

my server is based centos operating system and my webserver is already running on Apache.... i need to run both apache and nginx on same instance ... please help me to implement this concept...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.