Provide dedicated guide to Install Redis & Memcached for HestiaCP

I have mostly used everything but I have failed to install redis and memcached for hestiacp… at the last I have used chatGPT to do for it, But the result is also zero…

Kindly help on this to provide dedicated with step by step guide for this…

Thanks in advance

Kindly provide…help on it.

Why do you want to install both Redis & Memcached ?

You can follow this tutorial for redis installation.

1 Like

This guide is not working…for me…

I have installed redis object cache. Working fine.

The easiest way to install Redis. Run these commands.

apt update

apt install redis-server

apt install php-redis

systemctl enable redis-server

Then install Redis Object Cache wordpress plugin.

To verify the configuration, you can check the status of the Redis Object Cache plugin in WordPress. If it shows as connected and working, then you can proceed with modifying the Redis configuration settings as follows:

  1. Edit the Redis configuration file using the command:

vi /etc/redis/redis.conf

  1. Set the maximum memory size by adding the following line:

maxmemory 256M

  1. Set the memory policy by adding the following line:

maxmemory-policy allkeys-lru

  1. Save the changes and exit the editor.
    Restart the Redis server to apply the new configuration:

systemctl restart redis-server

After restarting the Redis server, you can verify that the changes have taken effect by checking the Redis logs or using Redis commands to inspect the configuration. If everything is configured correctly, your Redis caching should continue to work smoothly with the updated settings.

nothing works…
no way
this guide not working…

I have been used your provided sulotion which does not work…

and also use this guide

Please help on this topic …Big appeal…

Thanks in advance

apt install redis-server
apt install php-redis
systemctl enable redis-server

And it should work fine

1 Like

Ok Installed but in cache plugin, it is showing disabled, Now?

we’re bad at guessing, so please provide at least more informations. What are you trying to run? What does not work? If youbwant to use hestia, please accept that we expect a decent knowledge of sysadmin knowledge.

Ok, Thanks for your interest…
this the status of my Redis & Memcached Installation:

sudo systemctl status redis
				root@hcp:~# sudo systemctl status redis
				● redis-server.service - Advanced key-value store
					 Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor >
					 Active: active (running) since Mon 2024-06-03 23:21:43 IST; 12h ago
				   Main PID: 644 (redis-server)
					 Status: "Ready to accept connections"
					  Tasks: 6 (limit: 28684)
					 Memory: 6.1M
						CPU: 40.256s
					 CGroup: /system.slice/redis-server.service
							 └─644 "/usr/bin/redis-server" "" "" "" "" "" "" ""

				Jun 03 23:21:41 systemd[1]: Starting Advanced key-value store>
				Jun 03 23:21:43 systemd[1]: Started Advanced key-value store.
root@hcp:~# redis-cli ping
root@hcp:~# sudo systemctl status memcached
				● memcached.service - memcached daemon
					 Loaded: loaded (/lib/systemd/system/memcached.service; enabled; vendor pre>
					 Active: active (running) since Mon 2024-06-03 23:21:41 IST; 12h ago
					   Docs: man:memcached(1)
				   Main PID: 635 (memcached)
					  Tasks: 10 (limit: 28684)
					 Memory: 5.8M
						CPU: 3.739s
					 CGroup: /system.slice/memcached.service
							 └─635 /usr/bin/memcached -m 64 -p 11211 -u memcache -l ->

				Jun 03 23:21:41 systemd[1]: Started memcached daemon.
root@hcp:~# echo "stats settings" | nc localhost 11211
				STAT maxbytes 67108864
				STAT maxconns 1024
				STAT tcpport 11211
				STAT udpport 0
				STAT inter
				STAT verbosity 0
				STAT oldest 0
				STAT evictions on
				STAT domain_socket NULL
				STAT umask 700
				STAT shutdown_command no
				STAT growth_factor 1.25
				STAT chunk_size 48
				STAT num_threads 4
				STAT num_threads_per_udp 4
				STAT stat_key_prefix :
				STAT detail_enabled no
				STAT reqs_per_event 20
				STAT cas_enabled yes
				STAT tcp_backlog 1024
				STAT binding_protocol auto-negotiate
				STAT auth_enabled_sasl no
				STAT auth_enabled_ascii no
				STAT item_size_max 1048576
				STAT maxconns_fast yes
				STAT hashpower_init 0
				STAT slab_reassign yes
				STAT slab_automove 1
				STAT slab_automove_ratio 0.80
				STAT slab_automove_window 30
				STAT slab_chunk_max 524288
				STAT lru_crawler yes
				STAT lru_crawler_sleep 100
				STAT lru_crawler_tocrawl 0
				STAT tail_repair_time 0
				STAT flush_enabled yes
				STAT dump_enabled yes
				STAT hash_algorithm murmur3
				STAT lru_maintainer_thread yes
				STAT lru_segmented yes
				STAT hot_lru_pct 20
				STAT warm_lru_pct 40
				STAT hot_max_factor 0.20
				STAT warm_max_factor 2.00
				STAT temp_lru no
				STAT temporary_ttl 61
				STAT idle_timeout 0
				STAT watcher_logbuf_size 262144
				STAT worker_logbuf_size 65536
				STAT read_buf_mem_limit 0
				STAT track_sizes no
				STAT inline_ascii_response no
				STAT ext_item_size 512
				STAT ext_item_age 4294967295
				STAT ext_low_ttl 0
				STAT ext_recache_rate 2000
				STAT ext_wbuf_size 4194304
				STAT ext_compact_under 0
				STAT ext_drop_under 0
				STAT ext_max_frag 0.80
				STAT slab_automove_freeratio 0.010
				STAT ext_drop_unread no
				STAT ssl_enabled no
				STAT ssl_chain_cert (null)
				STAT ssl_key (null)
				STAT ssl_verify_mode 0
				STAT ssl_keyformat 1
				STAT ssl_ciphers NULL
				STAT ssl_ca_cert NULL
				STAT ssl_wbuf_size 16384
				STAT ssl_session_cache no
				STAT ssl_min_version tlsv1.2
				STAT num_napi_ids (null)
				STAT memory_file (null)

But in the wordpress site, The liteSpeed Cache Plugin is showing these as disabled [this is the problem].

So, Kindly guide me to resolve it.
Thanks in advance

What is the php version your site is using? Did you click button Save Changes to apply redis conf?

Thanks for your interest to provide me support.

Site is using default 8.2 php (fpm) version…

But sir, here redis & memcached is showing disabled and I have also save this settings in LiteSpeed cache plugin’s object cache settings page. But it is not working and still showing disabled.

Was I supposed to save it some where else?

Thanks in advance

If you are using php 8.2 you must install the right redis package (php-redis package installs the package for php 8.3 version).

apt install php8.2-redis
systemctl restart php8.2-fpm

And if you use redis you shouldn’t use memcache, you should use only one of them.

1 Like

Lots of Thanks, Sir, The Disabled showing problem for redis is resolved.

But Memcached is still show as disabled.

Kindly guide me also for memcached.

Thanks is advance

1 Like

You are welcome.

As I said in my previous post, you don’t need to use both, if you are using Redis there is no need to use memcached. Also, you can’t use both at the same time using that plugin.

1 Like

Thank for your response.
Yes, I could not use both together.

But the problem is still remains that I have already installed memcached (you can see it in my previous posts). And this is not showing as enabled into cache plugins.

So, I want to solve this problem too.

Kindly guide me about this.

Thank in advance

If you won’t use memcached, there is no need to install and/or enable it.

Anyway, install the extension:

apt install php8.2-memcached
1 Like