Redis installation
Forum
  1. Forums
  2. General
  3. General Discussion
  1. Shannon Plaquet
  2. 15.01.2020
  3.  Subscribe via email
I realize there are instructions here, to setup/integrate redis into a CloudLinux system:
https://docs.cloudlinux.com/cloudlinux_os_components/#redis-support-for-hostinglimits

...but, it appears dated. for example, the references to the source files are inconsistent:
http://repo.cloudlinux.com/cloudlinux/sources/da/mod_hostinglimits.tar.gz
http://repo.cloudlinux.com/cloudlinux/sources/mod_hostinglimits.tar.gz

whenever you download the file linked to the above URL, it downloads ver-1.0-36. when looking through the repo list, it shows a ver-1.0-37 as being available.

secondly, i cannot seem to find a way to work around these errors:
`[[email protected] mod_hostinglimits-1.0-36]# cmake -DREDIS:BOOL=TRUE .
-- Version 2.4...
-- apache 2.4 detected...
-- Can't find Apache Portable Runtime
-- Can't find Apache Portable Runtime Utils
-- Found Apache Bin Directory: /usr/sbin, /usr/lib64/apache2/modules/
-- Found Apache2: /usr/include/apache2
-- Apache binary /usr/sbin/httpd
-- USE MUTEX WORKER, EVENT FOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
APRUTIL_INCLUDE_DIR
used as include directory in directory /root/mod_hostinglimits-1.0-36
APR_INCLUDE_DIR
used as include directory in directory /root/mod_hostinglimits-1.0-36
APR_LIBRARY
linked by target "mod_hostinglimits" in directory /root/mod_hostinglimits-1.0-36
REDIS_INCLUDES_DIR
used as include directory in directory /root/mod_hostinglimits-1.0-36
REDIS_LIB_DIR
linked by target "mod_hostinglimits" in directory /root/mod_hostinglimits-1.0-36

-- Configuring incomplete, errors occurred!
See also "/root/mod_hostinglimits-1.0-36/CMakeFiles/CMakeOutput.log".`

and with 1.0-37:
`[[email protected] mod_hostinglimits-1.0-37]# cmake -DREDIS:BOOL=TRUE .
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Version 2.4...
-- apache 2.4 detected...
-- Found Apache Portable Runtime: /opt/cpanel/ea-apr16/include/apr-1, /opt/cpanel/ea-apr16/lib64/libapr-1.so
-- Found Apache Portable Runtime Utils: /opt/cpanel/ea-apr16/include/apr-1, /opt/cpanel/ea-apr16/lib64/libaprutil-1.so
-- Found Apache Bin Directory: /usr/sbin, /usr/lib64/apache2/modules/
-- Found Apache2: /usr/include/apache2
-- Apache binary /usr/sbin/httpd
-- USE MUTEX WORKER, EVENT FOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
REDIS_INCLUDES_DIR
used as include directory in directory /root/mod_hostinglimits-1.0-37
REDIS_LIB_DIR
linked by target "mod_hostinglimits" in directory /root/mod_hostinglimits-1.0-37

-- Configuring incomplete, errors occurred!
See also "/root/mod_hostinglimits-1.0-37/CMakeFiles/CMakeOutput.log".
`

the kicker is that *i know* that i've set this up before, and i *do not* remember the process being this complicated. it'd be really, really nice if setting Redis up was easier for all.

any help or suggestions?
Rate this post:
  1. 16.01.2020 10:01:14
  2. # 1
Sergey Khristich Accepted Answer
Posts: 375
Joined: 20.05.2019
0
Votes
Undo
Hello Shannon,
To help you with this question we need a little bit more information, please create a ticket here https://cloudlinux.zendesk.com/hc/en-us/requests/new and technical experts will help you asap.
If you have any other questions, feel free to ask here. Thank you for contacting us.
Marketing Manager
  1. 30.05.2020 15:05:09
  2. # 2
Shannon Plaquet Accepted Answer
Posts: 12
Joined: 05.06.2017
0
Votes
Undo
I realize it's been a quick minute since I've revisited this post... but shortly after my initial post, I realized that Redis-Server isn't ever installed within/onto the CL OS environment. So, after realizing that (because it doesn't really state in the doc), I've installed Redis-Server... BUT, I'm still not sure how to properly deamonize the sock for use by users within Cage/LVE.


# create a unix domain socket to listen on
unixsocket /var/run/redis/redis.sock
# set permissions for the socket
unixsocketperm 775
#requirepass passwordtouse
bind 127.0.0.1
daemonize yes
stop-writes-on-bgsave-error no
rdbcompression yes
# maximum memory allowed for redis
maxmemory 50M
# how redis will evice old objects - least recently used
maxmemory-policy allkeys-lru


I've tried several different methods... and have not been able to figure out where/how to properly set that access.

It'd be brilliant if the CL team could put together a doc in the knowledgebase for this install ?

###

I found a great article for setting it up in a typical cPanel environment... but no Alt-PHP coverage included.
https://help.bigscoots.com/cpanel/cpanel-easyapache-4-installing-redis-and-redis-php-extension
  1. 01.06.2020 14:06:17
  2. # 3
Sergey Khristich Accepted Answer
Posts: 375
Joined: 20.05.2019
0
Votes
Undo
Hello Shannon,
Thank you for reaching out! If you need the socket in the cell, you need to add:
/var/run/redis/ in /etc/cagefs/cagefs.mp
After that execute:
cagefsctl -M
Let me know if you have any questions. Thank you for contacting us.
Marketing Manager
  1. 02.06.2020 15:06:41
  2. # 4
Shannon Plaquet Accepted Answer
Posts: 12
Joined: 05.06.2017
0
Votes
Undo
for some reason, i still cannot correctly connect to the socket. it's identified by the user account, and found, but isn't properly connecting.

i have also added this w/ a --force-update:

echo -e "[redis unix socket]\ncomment=Redis Server\npaths=/var/run/redis" > /etc/cagefs/conf.d/redis-cache.cfg


what could i be missing?

...and sadly, I only now noticed this update:
Warning!

Starting from mod_hostinglimits version 1.0-30 Redis is not supported.
  1. 02.06.2020 18:06:45
  2. # 5
Kate Grechishkina Accepted Answer
Posts: 39
Joined: 13.04.2019
0
Votes
Undo
Hello,
Yes, there is no more support for using Redis with mod_hostinglimits of most recent versions: https://docs.cloudlinux.com/deprecated/#redis-support-for-hostinglimits

> for some reason, I still cannot correctly connect to the socket
Can you give more details as to how you are trying to connect?

I just used https://cloudlinux.zendesk.com/hc/en-us/articles/360013936659 guide on my test machine:

[[email protected] ~]# cagefsctl --list-enabled|grep cltest3
cltest3
[[email protected] ~]# su - cltest3 -s /bin/bash
Last login: Tue Jun 2 18:13:09 UTC 2020 on pts/0
[[email protected] ~]$ redis-cli ping
PONG


Additionally, there is a way to enable redis for PHP Selector alt-php alternatives:


[[email protected] ~]# selectorctl -u cltest3 -e redis -v 7.1
[[email protected] ~]# su - cltest3 -s /bin/bash
Last login: Tue Jun 2 18:13:09 UTC 2020 on pts/0
[[email protected] ~]$ php -m|grep redis
redis


Thank you.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.