【Memcache】初始化cache脚本

#!/bin/bash

########## 1. 基础工作 start ##########

tmux_conf=/root/.tmux.conf

chk_service_super=`systemctl status supervisord.service | grep inactive`
if [[ -n $chk_service_super ]]
then
    echo "supervisord is inactive..."
else
    sudo service supervisord stop
fi

chk_service_hhvm=`systemctl status hhvm | grep inactive`
if [[ -n $chk_service_hhvm ]]
then
    echo "hhvm is inactive..."
else
    sudo service hhvm stop
fi

mkdir -p /data/logs
mkdir -p /data/backup
mkdir -p /data/components/
mkdir -p /data/scripts
mkdir -p /data/softs
mkdir -p /data/logs/access
mkdir -p /data/logs/general
mkdir -p /data/logs/logic
mkdir -p /data/logs/error/supervisor
chmod -R 777 /data/logs/*
chmod -R 777 /data/components/
# 常用类库
sudo yum -y install gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
# 常用软件
sudo yum -y install net-tools unzip vim lrzsz subversion tmux

# tmux配置
cat > $tmux_conf <

你可能感兴趣的:(memcached)