You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

#!/usr/bin/node
import { program } from 'commander'
import chalk from 'chalk'
import { command, execSync, log } from './../helpers/command.js'
try {
log(chalk.green('Mariadb > start install'))
command('apt install mariadb-server')
} catch(error) {
}
/***
await command('curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup')
await command('bash mariadb_repo_setup --mariadb-server-version=10.6')
await command('apt update')
await command('apt install mariadb-server')
await command('mariadb-secure-installation')
await command('cat >> /etc/mysql/my.cnf << EOF' +
[mysqld]
bind-address = 0.0.0.0
ssl-ca=/etc/mysql/ssl/ca-cert.pem
ssl-cert=/etc/mysql/ssl/server-cert.pem
ssl-key=/etc/mysql/ssl/server-key.pem
[client]
ssl-ca=/etc/mysql/ssl/ca-cert.pem
ssl-cert=/etc/mysql/ssl/client-cert.pem
ssl-key=/etc/mysql/ssl/client-key.pem')
await command('chown -R mysql:mysql /etc/mysql/ssl')
await command('chmod 644 /etc/mysql/ssl/*cert*')
await command('chmod 644 /etc/mysql/ssl/*key*')
await command('systemctl restart mariadb')
await command('ufw allow mysql')
*/