Redis简单安装脚本
#!/bin/bash
# 检查系统类型
if [ -f /etc/os-release ]; then
. /etc/os-release
OS_NAME=$NAME
OS_VERSION=$VERSION_ID
else
echo "无法识别操作系统"
exit 1
fi
echo "当前操作系统: $OS_NAME $OS_VERSION"
# 根据操作系统选择安装命令
if [[ "$OS_NAME" == "Ubuntu" ]];...