apache - Installing PHP driver for Cassandra -
i create server on linode , installed ubuntu 15.10 , in console, enter command install php
apt-get update apt-get install -y php5 sudo apt-get install php5-dev
then, installed software: boost, openssl, libtool и cmake
sudo apt-get install libboost-all-dev sudo apt-get install openssl apt-get install cmake sudo apt-get install automake libtool curl curl -ssl https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | sudo tar zxfv - -c /usr/local/src cd /usr/local/src/libuv-1.4.2 sudo sh autogen.sh sudo ./configure sudo make sudo make install sudo rm -rf /usr/local/src/libuv-1.4.2 && cd ~/ sudo ldconfig sudo apt-get install libssl-dev
and then, installed cassnadra use datastax documentation
echo "deb http://debian.datastax.com/community stable main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list curl -l http://debian.datastax.com/debian/repo_key | sudo apt-key add - sudo apt-get update sudo apt-get install dsc20=2.0.11-1 cassandra=2.0.11
i checked cassnadra
sudo service cassandra status
and it:
● cassandra.service - lsb: distributed storage system structured data loaded: loaded (/etc/init.d/cassandra) active: active (running) since mon 2016-02-08 09:12:59 est; 21s ago docs: man:systemd-sysv-generator(8) cgroup: /system.slice/cassandra.service └─27880 java -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -xx:+cmsclassunloadingenabled -xx:+usethreadpriorities -xx:threa... feb 08 09:12:59 ubuntu systemd[1]: starting lsb: distributed storage system structured data... feb 08 09:12:59 ubuntu systemd[1]: started lsb: distributed storage system structured data.
i check status of cluster , cqlsh:
sudo nodetool status
and get:
datacenter: datacenter1 ======================= status=up/down |/ state=normal/leaving/joining/moving -- address load tokens owns (effective) host id rack un 127.0.0.1 41.32 kb 256 100.0% 2eaa4bd9-136d-4c2a-a65e-7444eb9d8824 rack1
and:
connected test cluster @ localhost:9160. [cqlsh 4.1.1 | cassandra 2.0.11 | cql spec 3.1.1 | thrift protocol 19.39.0] use help.
everything working! try install php driver cassandra use this:
git clone https://github.com/datastax/cpp-driver.git cd cpp-driver cmake . && make && make install ln -s libcql.so.0.7.0 /usr/lib/libcql.so.0 ln -s /usr/lib/libcql.so.0 /usr/lib/libcql.so git clone https://github.com/aparkhomenko/php-cassandra.git cd php-cassandra phpize && ./configure && make
but error
checking specified location of cql library... yes, shared checking cql in default path... not found configure: error: please reinstall cassandra distribution
where mistake?
i think problem installing cassandra's driver c/c++:
git clone https://github.com/datastax/cpp-driver.git
instead, have use php one:
git clone https://github.com/datastax/php-driver.git cd php-driver git submodule update --init cd ext ./install.sh
then, add extension in php.ini. apache2:
echo -e "; datastax php driver\nextension=cassandra.so" >> /etc/php5/cli/php.ini echo -e "; datastax php driver\nextension=cassandra.so" >> /etc/php5/apache2/php.ini /etc/init.d/apache2 reload
everything did prior ok.
source: https://github.com/datastax/php-driver/blob/master/ext/readme.md
Comments
Post a Comment