dbdeployer 快速部署mysql
$ curl -s https://raw.githubusercontent.com/datacharmer/dbdeployer/master/scripts/dbdeployer-install.sh | bash
$ yun install base_completion
$ dbdeployer init
SANDBOX_BINARY /root/opt/mysql SANDBOX_HOME /root/sandboxes -------------------------------------------------------------------------------- Directory /root/opt/mysql ($SANDBOX_BINARY) already exists This directory is the destination for expanded tarballs -------------------------------------------------------------------------------- Directory /root/sandboxes ($SANDBOX_HOME) already exists This directory is the destination for deployed sandboxes -------------------------------------------------------------------------------- # dbdeployer defaults enable-bash-completion --run-it --remote Error: none of bash completion scripts found ([/etc/bash_completion /usr/local/etc/bash_completion /etc/profile.d/bash_completion.sh]) Usage: dbdeployer init [flags] Flags: --dry-run Show operations but don't run them -h, --help help for init --skip-all-downloads Do not download any file (skip both MySQL tarball and shell completion file) --skip-shell-completion Do not download shell completion file --skip-tarball-download Do not download MySQL tarball Global Flags: --config string configuration file (default /root/.dbdeployer/config.json) --sandbox-binary string Binary repository (default /root/opt/mysql) --sandbox-home string Sandbox deployment directory (default /root/sandboxes) --shell-path string Path to Bash, used for generated scripts (default /usr/bin/bash) --skip-library-check Skip check for needed libraries (may cause nasty errors) none of bash completion scripts found ([/etc/bash_completion /usr/local/etc/bash_completion /etc/profile.d/bash_completion.sh])
$ dbdeployer defaults update sandbox-binary /home/opt/mysql
$ dbdeployer defaults update sandbox-home /home/sandbox
$ dbdeployer deploy single 8.0.27 --port=8027
Database installed in /home/sandboxes/msb_8_0_27
run 'dbdeployer usage single' for basic instructions'
.. sandbox server started
# cd /home/sandboxes/msb_8_0_27/
# ./use
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.27 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql [localhost:8027] {msandbox} ((none)) >
https://github.com/datacharmer/dbdeployer/wiki/installation