Last active
October 2, 2022 04:50
-
-
Save jewishmoses/142d5fd97cd43c2062cc3f5f41801057 to your computer and use it in GitHub Desktop.
Install phpredis
This file contains 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
#!/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 |
Author
jewishmoses
commented
Jun 4, 2021
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment