Merge "Allow skip the database server installation"
This commit is contained in:
commit
6d55b2a439
@ -12,6 +12,7 @@ _XTRACE_DB_MYSQL=$(set +o | grep xtrace)
|
||||
set +o xtrace
|
||||
|
||||
MYSQL_DRIVER=${MYSQL_DRIVER:-PyMySQL}
|
||||
INSTALL_DATABASE_SERVER_PACKAGES=$(trueorfalse True INSTALL_DATABASE_SERVER_PACKAGES)
|
||||
|
||||
register_database mysql
|
||||
|
||||
@ -175,18 +176,20 @@ EOF
|
||||
chmod 0600 $HOME/.my.cnf
|
||||
fi
|
||||
# Install mysql-server
|
||||
if is_oraclelinux; then
|
||||
install_package mysql-community-server
|
||||
elif is_fedora; then
|
||||
install_package mariadb-server mariadb-devel mariadb
|
||||
sudo systemctl enable $MYSQL_SERVICE_NAME
|
||||
elif is_suse; then
|
||||
install_package mariadb-server
|
||||
sudo systemctl enable $MYSQL_SERVICE_NAME
|
||||
elif is_ubuntu; then
|
||||
install_package $MYSQL_SERVICE_NAME-server
|
||||
else
|
||||
exit_distro_not_supported "mysql installation"
|
||||
if [[ "$INSTALL_DATABASE_SERVER_PACKAGES" == "True" ]]; then
|
||||
if is_oraclelinux; then
|
||||
install_package mysql-community-server
|
||||
elif is_fedora; then
|
||||
install_package mariadb-server mariadb-devel mariadb
|
||||
sudo systemctl enable $MYSQL_SERVICE_NAME
|
||||
elif is_suse; then
|
||||
install_package mariadb-server
|
||||
sudo systemctl enable $MYSQL_SERVICE_NAME
|
||||
elif is_ubuntu; then
|
||||
install_package $MYSQL_SERVICE_NAME-server
|
||||
else
|
||||
exit_distro_not_supported "mysql installation"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ set +o xtrace
|
||||
|
||||
|
||||
MAX_DB_CONNECTIONS=${MAX_DB_CONNECTIONS:-200}
|
||||
|
||||
INSTALL_DATABASE_SERVER_PACKAGES=$(trueorfalse True INSTALL_DATABASE_SERVER_PACKAGES)
|
||||
|
||||
register_database postgresql
|
||||
|
||||
@ -104,15 +104,17 @@ EOF
|
||||
else
|
||||
sed -i "s/:root:\w\+/:root:$DATABASE_PASSWORD/" $pgpass
|
||||
fi
|
||||
if is_ubuntu; then
|
||||
install_package postgresql
|
||||
elif is_fedora || is_suse; then
|
||||
install_package postgresql-server
|
||||
if is_fedora; then
|
||||
sudo systemctl enable postgresql
|
||||
if [[ "$INSTALL_DATABASE_SERVER_PACKAGES" == "True" ]]; then
|
||||
if is_ubuntu; then
|
||||
install_package postgresql
|
||||
elif is_fedora || is_suse; then
|
||||
install_package postgresql-server
|
||||
if is_fedora; then
|
||||
sudo systemctl enable postgresql
|
||||
fi
|
||||
else
|
||||
exit_distro_not_supported "postgresql installation"
|
||||
fi
|
||||
else
|
||||
exit_distro_not_supported "postgresql installation"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user