The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache Cassandra

Discussion in 'Workarounds and Optimization' started by SweptSquash, Jan 31, 2017.

  1. SweptSquash

    SweptSquash Member

    Joined:
    Apr 16, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    76
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi,

    I'm wondering if anyone has managed to get Apache Cassandra installed and configured with cPanel yet?

    I've managed to find guides on how to install it on CentOS 6 & 7 but none that have cPanel on the system. Meanwhile I did stumble across this feature request for Redis cache with mention of Cassandra. So just wondering if there's information of getting this working with cPanel correctly without causing issues.

    Thanks :)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,278
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I've not seen any user-workarounds on getting this to work on a cPanel server with EasyApache 4, but I encourage you to open a separate feature request for it via:

    Submit A Feature Request

    Information on adding custom Apache modules to EasyApache 4 is documented at:

    ea4.ninja

    However, it might require the help of a system administrator. If you'd like to consult with a system administrator, we do provide a list of companies offering system admin services at:

    System Administration Services | cPanel Forums

    Thank you.
     
  3. SweptSquash

    SweptSquash Member

    Joined:
    Apr 16, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    76
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi,

    So I’ve managed to get Apache Cassandra installed and running with cPanel. Here’s how I managed to get it installed and running, firstly I mainly followed the official DataStax installation instructions.
    docs.datastax.com/en/cassandra/3.0/cassandra/install/installRHEL.html

    Firstly you’ll need to make sure the latest version of Oracle Java 8 or OpenJDK 8 is installed you can check you version by doing:

    Code:
    java --version
    Second you’ll need to the repo for DataStax to /etc/yum.repos.d/datastax.repo

    Code:
     [datastax]
    
    name = DataStax Repo for Apache Cassandra
    
    baseurl = http://rpm.datastax.com/community
    
    enabled = 1
    
    gpgcheck = 0
    Then you can install Cassandra by doing the following command

    Code:
    sudo yum install dsc30 cassandra30-tools
    To start Cassandra

    Code:
    sudo /etc/init.d/cassandra start
    Verify that DataStax Distribution of Apache Cassandra is running

    Code:
     nodetool status
    You should get a response like:

    Code:
     Datacenter: datacenter1
    
    =======================
    
    Status=Up/Down
    
    |/ State=Normal/Leaving/Joining/Moving
    
    --  Address             Load       Tokens  Owns    Host ID                               Rack
    
    UN  127.0.0.147.66 KB   47.66 KB  256     100%    aaa1b7c1-6049-4a08-ad3e-3697a0e30e10  rack1
    Next you’re going to need to install libuv 1.8 or later and DataStax’s DSE-CPP Driver and DataStax Cassandra Driver for the PECL Installation to work correctly. (I’m on CENTOS 6 So the instructions below follow that, other RPMS for CENTOS can be found here downloads.datastax.com/cpp-driver/)

    Code:
    cd /tmp
    
    Wget http://downloads.datastax.com/cpp-driver/centos/6/dependencies/libuv/v1.8.0/libuv-1.8.0-1.el6.x86_64.rpm
    
    Yum localinstall libuv-1.8.0-1.el6.x86_64.rpm
    
    Wget http://downloads.datastax.com/cpp-driver/centos/6/dependencies/libuv/v1.8.0/libuv-devel-1.8.0-1.el6.x86_64.rpm
    
    Yum localinstall libuv-devel-1.8.0-1.el6.x86_64.rpm
    
    Wget http://downloads.datastax.com/cpp-driver/centos/6/dse/v1.1.0/dse-cpp-driver-1.1.0-1.el6.x86_64.rpm
    
    Yum localinstall dse-cpp-driver-1.1.0-1.el6.x86_64.rpm
    
    Wget http://downloads.datastax.com/cpp-driver/centos/6/dse/v1.1.0/dse-cpp-driver-devel-1.1.0-1.el6.x86_64.rpm
    
    Yum localinstall dse-cpp-driver-devel-1.1.0-1.el6.x86_64.rpm
    
    Wget http://downloads.datastax.com/cpp-driver/centos/6/cassandra/v2.5.0/cassandra-cpp-driver-2.5.0-1.el6.x86_64.rpm
    
    Yum localinstall cassandra-cpp-driver-2.5.0-1.el6.x86_64.rpm
    
    Wget http://downloads.datastax.com/cpp-driver/centos/6/cassandra/v2.5.0/cassandra-cpp-driver-devel-2.5.0-1.el6.x86_64.rpm
    
    Yum localinstall cassandra-cpp-driver-devel-2.5.0-1.el6.x86_64.rpm
    You can now go a head and install Cassandra’s PHP Pecl module

    Code:
    /opt/cpanel/ea-php70/root/usr/bin/pecl install https://pecl.php.net/get/cassandra-1.2.2.tgz
    Once you've installed the pecl module you'll need to make sure it has the correct permissions assigned to it and is included in the php configuration. To do this follow these next steps.

    Code:
    chmod 755 /opt/cpanel/ea-php70/root/usr/lib64/php/modules/cassandra.so
    
    vi /opt/cpanel/ea-php70/root/etc/php.d/20-cassandra.ini
    Press I on your keyboard then copy and paste below

    Code:
    ; Enable Cassandra extension module
    extension=cassandra.so
    Then hit ESC and type :wq and hit enter. Now you're done.

    Please feel free to improve on my process and leave feedback :) Thanks.
     
    #3 SweptSquash, Feb 4, 2017
    Last edited by a moderator: Feb 4, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,278
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see you were able to get it working. Thank you for sharing the steps you took.
     
Loading...

Share This Page