代码拉取完成,页面将自动刷新
#! /bin/bash
chmod 600 storage/ssh/bridge.key
# 启动生产mysql桥接
if [ "$1" = "mysql" ]; then
echo "MYSQL桥接中..."
ssh -i storage/ssh/bridge.key -4 -N -L 3306:rm-2vcue429kp17i9zou.mysql.cn-chengdu.rds.aliyuncs.com:3306 root@47.108.139.81
echo "桥接结束,如需继续请重新启动"
fi
# 启动生产redis桥接
if [ "$1" = "redis" ]; then
echo "REDIS桥接中..."
ssh -i storage/ssh/bridge.key -4 -N -L 6379:r-2vcupio3ahyhj2k6gq.redis.cn-chengdu.rds.aliyuncs.com:6379 root@47.108.139.81
echo "桥接结束,如需继续请重新启动"
fi
# 启动生产mongoDB桥接
if [ "$1" = "mongo" ]; then
echo "MONGODB桥接中..."
ssh -i storage/ssh/bridge.key -4 -N -L 27017:10.0.0.10:27017 root@47.108.139.81
echo "桥接结束,如需继续请重新启动"
fi
# 启动生产rabbitMQ桥接
if [ "$1" = "rabbit" ]; then
echo "RABBITMQ桥接中..."
ssh -i storage/ssh/bridge.key -4 -N -L 5672:10.0.0.10:5672 root@47.108.139.81
echo "桥接结束,如需继续请重新启动"
fi
if [ "$1" = "" ]; then
echo "============================================================="
echo "| 仅限逼不得以紧急调试生产BUG时使用,平时绝对不能使用! |"
echo "============================================================="
echo "| 桥接生产mysql连接到本地: |"
echo "| ./bridge.sh mysql |"
echo "|-----------------------------------------------------------|"
echo "| 桥接生产redis连接到本地: |"
echo "| ./bridge.sh redis |"
echo "|-----------------------------------------------------------|"
echo "| 桥接生产mongo连接到本地 |"
echo "| ./bridge.sh mongo |"
echo "|-----------------------------------------------------------|"
echo "| 桥接生产rabbit连接到本地 |"
echo "| ./bridge.sh rabbit |"
echo "============================================================="
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。