File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -402,6 +402,10 @@ function quiet_install_mariadb() {
402402# 交互式安装Redis #
403403# ###################################
404404function interactive_install_redis() {
405+ if [ " $USE_EXTERNAL_REDIS " == " true" ]; then
406+ LOG_INFO " Use external redis, host: $REDIS_HOST , port: $REDIS_PORT "
407+ return 0
408+ fi
405409 ret=$( check_redis )
406410 if [ " $ret " == " true" ]; then
407411 return 0
@@ -448,6 +452,10 @@ function interactive_install_mariadb() {
448452 esac
449453 fi
450454
455+ if [ " $USE_EXTERNAL_MYSQL " == " true" ]; then
456+ LOG_INFO " Use external mysql, host: $MYSQL_HOST , port: $MYSQL_PORT "
457+ return 0
458+ fi
451459 ret=$( check_mysqld )
452460 if [ " $ret " == " true" ]; then
453461 return 0
Original file line number Diff line number Diff line change 11#! /bin/bash
22# -*-*-*- 需要关注的配置内容 -*-*-*-
33# 数据库配置,默认MySQL端口号为3306
4+ export USE_EXTERNAL_MYSQL=${USE_EXTERNAL_MYSQL:- false}
45export MYSQL_HOST=${MYSQL_HOST:- 127.0.0.1}
56export MYSQL_PORT=${MYSQL_PORT:- 3306}
67export MYSQL_USER=${MYSQL_USER:- tca}
78export MYSQL_PASSWORD=${MYSQL_PASSWORD:- " TCA!@#2021" }
89
910# Redis配置,默认Redis端口号为6379
11+ export USE_EXTERNAL_REDIS=${USE_EXTERNAL_REDIS:- false}
1012export REDIS_HOST=${REDIS_HOST:- 127.0.0.1}
1113export REDIS_PORT=${REDIS_PORT:- 6379}
1214export REDIS_PASSWD=${REDIS_PASSWD:- " tca2022" }
You can’t perform that action at this time.
0 commit comments