How to Install Redis

** PRO-PACK FEATURE **

Redis functions as a simple database/cache for Users. This can be useful for offloading some of the stress from your database into memory, if you have the memory available to support it.

Installing Redis

To install redis:

cd /usr/local/directadmin/custombuild
./build set redis yes
./build redis
1
2
3

To enable for your users

All Reseller/User packages and reseller.conf/user.conf files will have redis=OFF by default.

The Admin account reseller.conf will have redis=ON by default.

All accounts that need redis must have it enabled like so:

  1. Enable redis in the packages and re-save as needed
  2. Enable redis in the accounts and save as needed.

CMD_REDIS JSON

Checking the status for a user

To check the current status for the current User, use a GET request with no options. The return should look similar to this:

{
	"enabled": "0",
	"global": "1"
}
1
2
3
4
  • "enabled" refers to redis=ON in the user.conf
  • "global" is the service check to ensure it's installed on the system

Enabling Redis for a user

Submit a POST request with the following:

action=enable
1

Disabling Redis for a user

Submit a POST request with the following:

action=disable
1

API usage

CMD_API_REDIS does exist and will always be use JSON mode for output.

Relative Skin changes

The following files were modified:

  • /usr/local/directadmin/data/skins/enhanced/admin/create_customized_reseller.html
  • /usr/local/directadmin/data/skins/enhanced/admin/modify_reseller.html
  • /usr/local/directadmin/data/skins/enhanced/admin/show_reseller_package.html
  • /usr/local/directadmin/data/skins/enhanced/lang/en/lf_standard.html
  • /usr/local/directadmin/data/skins/enhanced/reseller/create_customized_user.html
  • /usr/local/directadmin/data/skins/enhanced/reseller/modify_user.html
  • /usr/local/directadmin/data/skins/enhanced/reseller/show_user_package.html

to support the relative global tokens including:

  • RESELLERREDIS=ON
  • USERREDIS=ON
  • HAVE_REDIS=ON (which is enabled in license and installed on system)

POST values for packages/reseller/user include redis=ON or redis=OFF, and omission altogether implies OFF.

Last Updated: 11/22/2021, 12:12:37 AM