From 70266e23ce49dca8c4f2fb1afc98e2edb5625940 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 6 Jan 2022 07:16:58 +0100 Subject: [PATCH] install script cert bot, database setup --- deployment/bare_metal/install.sh | 62 +++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/deployment/bare_metal/install.sh b/deployment/bare_metal/install.sh index ae41145a5..e342fa546 100755 --- a/deployment/bare_metal/install.sh +++ b/deployment/bare_metal/install.sh @@ -5,13 +5,64 @@ # Install mariadb sudo apt-get install -y mariadb-server -#TODO sudo mysql_secure_installation +sudo mysql_secure_installation +# Enter current password for root (enter for none): enter +# Switch to unix_socket authentication [Y/n] Y +# Change the root password? [Y/n] n +# Remove anonymous users? [Y/n] Y +# Disallow root login remotely? [Y/n] Y +# Remove test database and access to it? [Y/n] Y +# Reload privilege tables now? [Y/n] Y + +# create db user +DB_USER=gradido +DB_PASSWORD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo); +# create table +#create database gradido_community +# DEFAULT CHARACTER SET utf8mb4 +# DEFAULT COLLATE utf8mb4_unicode_ci; +# GRANT ALL PRIVILEGES ON gradido_community.* TO '$DB_USER'@'localhost'; +sudo mysql < Enter email address (used for urgent renewal and security notices) > support@gradido.net +> Please read the Terms of Service at > Y +> Would you be willing, once your first certificate is successfully issued, to > N +> No names were found in your configuration files. Please enter in your domain > stage1.gradido.net \ No newline at end of file