RedyHost customers who run Git deployments in a cPanel hosting, ask us about getting Git available in cPanel.
This page describes how to install Git in a cPanel/WHM server with CloudLinux and make it available to customers inside CageFS. Of course RedyHost cPanel hosting comes with Git preinstalled and available inside the GageFS.
This page should be used by system admins who want to make Git available to their customers in cPanel with CloudLinux/CageFS installed.
First, SSH to the cPanel/WHM server as the root user.
Next, run these commands to install Git:
$ yum install git git-all -y
If you had git installed, just find out it’s installation folder
$ which git $ /usr/bin/git
Now, as you have installed Git, let’s add it to the CageFS so that users could access it
$ vim /etc/cagefs/conf.d/git.cfg
And add this content:
[git] comment=Allow git to work on the server paths=/usr/local/bin, /usr/bin, /usr/libexec/git-core
Next, update CageFS
$ cagefsctl --force-update
Test to see if it works, become a CageFS user.
$ su cagefsuser $ git status
To benefit from (benchmarked) fast cPanel hosting, including free as-is cPanel account migration,