mysql 和 redis 在 .bashrc 设置检测是否启动 ,没有的话,启动它
if ps -ef|grep "redis"|egrep -v grep >/dev/null
then
echo redis is running!
else
service redis start
fi
if ps -ef|grep "mysql"|egrep -v grep >/dev/null
then
echo mysql is running!
else
service mysql start
fi