我正在做一个安装MariaDB的脚本,我想设置一个root密码。 我在脚本里有以下内容:
DEBIAN_FRONTEND=noninteractive echo mariadb-server-10.0 mariadb-server-10.0/root_password password tmpsetup | debconf-set-selections echo mariadb-server-10.0 mariadb-server-10.0/root_password_again password tmpsetup | debconf-set-selections apt-get install -y mariadb-server
这似乎并不奏效,因为我无法使用“tmpsetup”密码login到root帐户。 我究竟做错了什么?
请尝试,而不是
DEBIAN_FRONTEND=noninteractive echo mariadb-server-10.0 mariadb-server/root_password password tmpsetup | debconf-set-selections echo mariadb-server-10.0 mariadb-server/root_password_again password tmpsetup | debconf-set-selections apt-get install -y mariadb-server
这种方式的变化将被应用于mariadb服务器元软件包,而不仅仅是特定的版本。