Created
February 12, 2023 21:10
-
-
Save Milz0/f891668a8b47d88baf13374cd6bd29e5 to your computer and use it in GitHub Desktop.
Cassandra PHP-Driver PHP 7.4 Ubuntu 22.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install software-properties-common -y | |
sudo add-apt-repository ppa:ondrej/php -y | |
wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1.6_amd64.deb | |
sudo dpkg -i multiarch-support_2.27-3ubuntu1.6_amd64.deb | |
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list | |
sudo apt update | |
sudo apt install libssl1.1 -y | |
sudo rm /etc/apt/sources.list.d/focal-security.list | |
sudo apt install build-essential git cmake libgmp-dev zlib1g-dev libpcre3-dev php7.4-dev apache2 libapache2-mod-php7.4 libuv1-dev -y | |
wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.16.0/cassandra-cpp-driver-dbg_2.16.0-1_amd64.deb | |
wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.16.0/cassandra-cpp-driver-dev_2.16.0-1_amd64.deb | |
wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.16.0/cassandra-cpp-driver_2.16.0-1_amd64.deb | |
sudo dpkg -i cassandra-cpp* | |
git clone https://github.com/datastax/php-driver.git | |
cd php-driver && pushd ext && phpize && popd && mkdir build && pushd build && ../ext/configure && make && sudo make install && popd | |
sudo sed -i '938i\extension=cassandra.so' /etc/php/7.4/apache2/php.ini | |
sudo systemctl restart apache2 | |
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php | |
sudo apt install default-jdk -y | |
wget -q -O - https://www.apache.org/dist/cassandra/KEYS | sudo tee /etc/apt/trusted.gpg.d/cassandra.asc | |
echo "deb http://www.apache.org/dist/cassandra/debian 41x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list | |
sudo apt update | |
sudo apt install cassandra -y | |
sudo systemctl enable cassandra | |
sudo systemctl start cassandra | |
php -c /etc/php/7.4/apache2/php.ini -i | grep cassandra |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment