Announcement

Collapse
No announcement yet.

Redis installation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redis installation

    I realize there are instructions here, to setup/integrate redis into a CloudLinux system:
    https://(https://docs.cloudlinux.com...-hostinglimits

    ...but, it appears dated. for example, the references to the source files are inconsistent:
    https://](https://docs.cloudlinux.co...glimits.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:
    `[root@saturn mod_hostinglimits-1.0-36]# cmake -DREDIS:BOOL=TRUE .
    -- Version 2.4...
    -- apache 2.4 detected...
    -- Cant find Apache Portable Runtime
    -- Cant 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:
    `[root@saturn 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 ive set this up before, and i *do not* remember the process being this complicated. itd be really, really nice if setting Redis up was easier for all.

    any help or suggestions?](http://repo.cloudlinux.com/cloudlinux/sources/da/mod_hostinglimits.tar.gz)

  • #2
    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.

    Comment


    • #3
      I realize its been a quick minute since Ive revisited this post... but shortly after my initial post, I realized that Redis-Server isnt ever installed within/onto the CL OS environment. So, after realizing that (because it doesnt really state in the doc), Ive installed Redis-Server... BUT, Im still not sure how to properly deamonize the sock for use by users within Cage/LVE.

      Code:
      # 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
      Ive tried several different methods... and have not been able to figure out where/how to properly set that access.

      Itd 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://[https://help.bigscoots.com/...-php-extension](https://help.bigscoots.com/cpanel/cpanel-easyapache-4-installing-redis-and-redis-php-extension)

      Comment


      • #4
        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.

        Comment


        • #5
          for some reason, i still cannot correctly connect to the socket. its identified by the user account, and found, but isnt properly connecting.

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

          Code:
          echo -e "[redis unix socket]
          comment=Redis Server
          paths=/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.

          Comment


          • #6
            Hello,
            Yes, there is no more support for using Redis with mod_hostinglimits of most recent versions: https://[https://docs.cloudlinux.com...-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...s/360013936659 guide on my test machine:

            Code:
            [root@192-168-245-77 ~]# cagefsctl --list-enabled|grep cltest3
            
            cltest3
            
            [root@192-168-245-77 ~]# su - cltest3 -s /bin/bash
            
            Last login: Tue Jun  2 18:13:09 UTC 2020 on pts/0
            
            [cltest3@192-168-245-77 ~]$ redis-cli ping
            
            PONG
            Additionally, there is a way to enable redis for PHP Selector alt-php alternatives:

            Code:
            [root@192-168-245-77 ~]# selectorctl -u cltest3 -e redis -v 7.1
            
            [root@192-168-245-77 ~]# su - cltest3 -s /bin/bash
            
            Last login: Tue Jun  2 18:13:09 UTC 2020 on pts/0
            
            [cltest3@192-168-245-77 ~]$ php -m|grep redis
            
            redis
            Thank you.](https://docs.cloudlinux.com/deprecated/#redis-support-for-hostinglimits)

            Comment

            Working...
            X