Browse Source

07env-install-centos.sh

master
lizw 3 years ago
parent
commit
65a2a4a330
  1. 16
      00base/07env-install-centos.sh

16
00base/07env-install-centos.sh

@ -568,27 +568,15 @@ function init:redis() {
cd ${BASE_DIR}/redis
tar -zxvf ${REDIS_FILE_NAME}
cd $redis_path
echo 'ttt-@@@@@@@@@@@@@111'
yum -y install gcc
echo 'ttt-@@@@@@@@@@@@@222'
yum -y install centos-release-scl
echo 'ttt-@@@@@@@@@@@@@333'
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
echo 'ttt-@@@@@@@@@@@@@444'
echo 'ttt-777'
echo 'source /opt/rh/devtoolset-9/enable' >> /etc/profile
echo 'ttt-888'
source /etc/profile
echo 'ttt-999'
gcc -v
echo 'ttt-000'
mkdir -p $redis_install_path
echo 'ttt-111'
cd $redis_path
echo 'ttt-222'
make install PREFIX=$redis_install_path
echo 'ttt-333'
# 写文件start.sh文件
cat << EOF > $redis_install_path/redis.conf
# bind 127.0.0.1
@ -665,7 +653,6 @@ aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes
EOF
echo 'ttt-444'
cat << EOF > $redis_install_path/start.sh
#!/bin/bash
#set -x
@ -694,11 +681,8 @@ else
echo 'redis已停止!'
fi
EOF
echo 'ttt-555'
chmod +x $redis_install_path/start.sh
echo 'ttt-666'
chmod +x $redis_install_path/kill.sh
echo 'ttt-777'
fi
"
check::exit_code "$?" "redis" "$host 安装redis环境" "exit"

Loading…
Cancel
Save