Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] for Redis 7.0 installation script #61

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions hack/redis_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ if [ `uname -s` == "Linux" ]; then
exit 1
fi

echo "Purge existing version of Redis ......"
sudo apt-get purge redis -y
sudo apt-get purge redis-server -y
sudo apt-get purge redis-tools -y

echo "Install Redis 7.0.0 ......"
sudo apt-get install redis-tools=$REDIS_VERSION
sudo apt-get install redis-server=$REDIS_VERSION
sudo apt-get install redis=$REDIS_VERSION
echo "End to install on Ubuntu ......"

Expand Down Expand Up @@ -79,7 +87,29 @@ elif [ `uname -s` == "Darwin" ]; then
brew --version

echo ""
brew install redis=7.0
echo "Uninstall existing version of Redis ......"

brew uninstall redis

echo "Remove three files ......"
REDIS_SENTINEL=/usr/local/etc/redis-sentinel.conf
REDIS_CONF_MacOS=/usr/local/etc/redis.conf
REDIS_CONF_E=/usr/local/etc/redis.conf-e

echo "Remove $REDIS_SENTINEL ......"
rm -rf $REDIS_SENTINEL if [ -f $REDIS_SENTINEL ]

echo "Remove $REDIS_CONF_MacOS ......"
rm -rf $REDIS_CONF_MacOS if [ -f $REDIS_CONF_MacOS ]

echo "Remove $REDIS_CONF_E ......"
rm -rf $REDIS_CONF_E if [ -f $REDIS_CONF_E ]

echo "It is done to remove three files ......"
echo ""

echo "Install Redis 7.0 ......"
brew install [email protected]
brew services start redis
brew services info redis --json

Expand All @@ -88,7 +118,6 @@ elif [ `uname -s` == "Darwin" ]; then
echo ""
echo "2. Enable and Run Redis ......"
echo "==============================="
REDIS_CONF_MacOS=/usr/local/etc/redis.conf
sed -i -e "s/^# supervised auto$/supervised systemd/g" $REDIS_CONF_MacOS
egrep -v "(^#|^$)" $REDIS_CONF_MacOS |grep "supervised "

Expand Down