#!/usr/bin/env bash
#make install redis
network(){
ping -c1 www.baidu.com &>/dev/null
if [ $? -ne 0 ];then
echo "network is error...."
exit
fi
}
test(){
[ $? -ne 0 ] && echo "excution error....";exit
}
install_gcc(){
yum -y install gcc glibc glibc-kernheaders glibc-common glibc-devel make
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
# scl enable devtoolset-9 bash
source /opt/rh/devtoolset-9/enable
echo "source /opt/rh/devtoolset-9/enable" >>/root/.bashrc
}
install_redis(){
wget http://download.redis.io/releases/redis-6.0.8.tar.gz
tar -zxvf redis-6.0.8.tar.gz -C /usr/local
cd /usr/local/redis-6.0.8
make && make all
}
network
install_gcc
install_redis
test
redis 单节点安装
最新推荐文章于 2025-03-17 20:34:17 发布