我将Vertica安装在Ubuntu虚拟机中,我希望在启动过程中启动特定的数据库,而不是必须登录,打开admintools并从那里启动。在Linux上启动期间启动Vertica数据库
那么,有没有一个命令行可以让我在没有用户交互的情况下启动它? 我应该在哪个运行级别添加? 另外,我使用特定的用户来运行Vertica相关的所有内容,这是否需要在启动脚本中考虑到?
我将Vertica安装在Ubuntu虚拟机中,我希望在启动过程中启动特定的数据库,而不是必须登录,打开admintools并从那里启动。在Linux上启动期间启动Vertica数据库
那么,有没有一个命令行可以让我在没有用户交互的情况下启动它? 我应该在哪个运行级别添加? 另外,我使用特定的用户来运行Vertica相关的所有内容,这是否需要在启动脚本中考虑到?
为什么不直接设置重新启动策略(在开机重启)在ADMINTOOLS “设置重新启动策略” 你有3个选项: 决不 ksafe 始终 - 选择这一个开始启动。
就是这样!
ADMINTOOLS -t start_db
[[email protected] ~]$ admintools -t start_db --help
Usage: start_db [options]
Options:
-h, --help show this help message and exit
-d DB, --database=DB Name of database to be started
-p DBPASSWORD, --password=DBPASSWORD
Database password in single quotes
-i, --noprompts do not stop and wait for user input(default false)
-F, --force force the database to start at an epoch before data
consistency problems were detected.
好的,我在su命令里添加了/etc/rc.local。有点难看,因为我可以在登录屏幕上看到输出,但这样做会。 – Bani
我不会推荐这种方法,因为它*只*在数据库启动并且K安全时有帮助。最好的方法是将'admintools -t start_db ...'附加到启动。 – Kermit
有效的方法。 –