How to Install SourceGuardian on a cPanel/WHM server

How to Install SourceGuardian on a cPanel server

Sourceguardian is used on Linux Servers to encode, encrypt and compile PHP scripts.

How to check whether sourceguardian is already installed on your linux server ?
Type the below command to check whether sourceguardian is installed on your server.

Command : php -m | grep -i SourceGuardian
 

root@server [~]# php -m | grep -i SourceGuardian
root@server [~]# —-> Source guardian is not Installed on this Linux server

root@server [~]# php -m | grep -i SourceGuardian
SourceGuardian —-> Source guardian is Installed on this Linux server.

 
You can use the below cPanel script to install SourceGuardian on your linux server. The below method takes only few seconds to install sourceguardian on your cPanel Server.

1. Log into cPanel Server via SSH as root

2. Run the script ‘/scripts/phpextensionmgr install SourceGuardian’ to install SourceGuardian

3. Create a phpinfo file under your domain to check whether it is installed correctly

Command to Install SourceGuardian on cPanel Server : /scripts/phpextensionmgr install SourceGuardian
 

=======
root@server [~]# /scripts/phpextensionmgr install SourceGuardian
Updating digest list
Fetching http://httpupdate.cpanel.net/cpanelsync/easy/targz.yaml.asc (connected:0)…….(request attempt 1/12)…Using dns cache file /root/.HttpRequest/httpupdate.cpanel.net……searching for mirrors (mirror search attempt 1/3)……loaded mirror speeds from cache……mirror search success……connecting to 69.72.212.10…@69.72.212.10……connected……receiving……request success……Done
Fetching http://httpupdate.cpanel.net/cpanelsync/easy/targz.yaml (connected:0)…….(request attempt 1/12)……connecting to 69.72.212.10…@69.72.212.10……connected……receiving……request success……Done
info [phpextensionmgr] Successfully verified signature for cpanel (key types: release).
Downloading tarball for SourceGuardian
Fetching http://httpupdate.cpanel.net/cpanelsync/easy/targz/Cpanel/Easy/SourceGuardian.pm.tar.gz.linux-generic-64 (connected:0)…….(request attempt 1/12)……connecting to 69.72.212.10…@69.72.212.10……connected……receiving……request success……Done
Installing SourceGuardian
Determining PHP version for /usr/local/bin/php
Determining PHP extension dir from /usr/local/bin/php-config
Installing and activating SourceGuardian Loader binaries
======

 

How to Install SourceGuardian on cPanel WHM Server

How to Install SourceGuardian on cPanel WHM Server


 
SourceGuardian is now installed on the above cPanel Server. Type the command ‘php -m | grep -i SourceGuardian’ to make sure it is installed.

Create a phpinfo file under the domain to check whether sourceguardian is enabled on the server. Check the below screenshot.
 

How to Install SourceGuardian cPanel Server

How to Install SourceGuardian cPanel Server

Method 2 :

You can also Install SourceGuardian using cPanel easyapache script.

1. Log into cPanel server via SSH as ‘root’

3. Run easyapache /scripts/easyapache in screen

3. Run the command ‘php -m | grep -i SourceGuardian’ to check whether ‘SourceGuardian’ is installed

Command to run easyapache : /scripts/easyapache

Select ‘Exhaustive Option’, under ‘other modules’ you can see ‘SourceGuardian Loader for PHP’. Select the sourceguardian module and then recompile PHP on the server.
 

Install Sourceguardian Easyapache

Install Sourceguardian Easyapache


 
You can also run easyapache from WHM. Login to WHM and click on “EasyApache” under “software”.
 
Run Easyapache from WHM to Enable Sourceguardian