Skip to content

Instantly share code, notes, and snippets.

@jewishmoses
Last active October 2, 2022 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jewishmoses/142d5fd97cd43c2062cc3f5f41801057 to your computer and use it in GitHub Desktop.
Save jewishmoses/142d5fd97cd43c2062cc3f5f41801057 to your computer and use it in GitHub Desktop.
Install phpredis
#!/usr/bin/env bash
set -e
VERSION=5.3.4 # Check if there is a new version and update..
wget https://github.com/phpredis/phpredis/archive/refs/tags/$VERSION.zip
unzip $VERSION.zip
sudo mv phpredis-$VERSION/ /etc/
cd /etc/phpredis-$VERSION/
sudo apt install php-dev -y
phpize
./configure
make && make install
sudo su
VERSION=5.3.4
sudo echo extension=/etc/phpredis-$VERSION/modules/redis.so > /etc/php/8.0/mods-available/redis.ini
sudo ln -s /etc/php/8.0/mods-available/redis.ini /etc/php/8.0/fpm/conf.d/redis.ini
sudo ln -s /etc/php/8.0/mods-available/redis.ini /etc/php/8.0/cli/conf.d/redis.ini
exit
sudo service php8.0-fpm restart
rm $VERSION.zip install-phpredis.sh
@jewishmoses
Copy link
Author

jewishmoses commented Jun 4, 2021

wget https://gist.github.com/jewishmoses/142d5fd97cd43c2062cc3f5f41801057/raw/install-phpredis.sh
chmod +x install-phpredis.sh
./install-phpredis.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment