debconf-set-selections mysql_docker 静默安装mysql
1.功能作用
在debconf database中插入默認值
2.位置
/usr/bin/debconf-set-selections
3.格式用法
debconf-set-selections [-vcu] [file]
4.主要參數
1
2
3
-v,--verbose顯示運行過程信息
-c,--checkonly只檢查輸入文件的格式
-u,--unseen在預置參數時,不設置‘seen‘標識
5.應用實例
1、命令行輸入設置參數
sudo debconf-set-selections <<< ‘mysql-server-5.5 mysql-server/root_password password your_password‘
sudo debconf-set-selections <<< ‘mysql-server-5.5 mysql-server/root_password_again password your_password‘
sudo apt-get -y install mysql-server
2、先輸入文件,再一次性添入設置參數
echo "mysql-server-5.5 mysql-server/root_password password $MYSQL_ROOT_PASS" > /tmp/mysql.preseed
echo "mysql-server-5.5 mysql-server/root_password_again password $MYSQL_ROOT_PASS" >> /tmp/mysql.preseed
cat /tmp/mysql.preseed | sudo debconf-set-selections
rm /tmp/mysql.preseed
sudo apt-get install -y mysql-server
3、使用echo方式輸入設置參數
echo ‘mysql-server-5.5 mysql-server/root_password password your_password‘ | sudo debconf-set-selections
echo ‘mysql-server-5.5 mysql-server/root_password_again password your_password‘ | sudo debconf-set-selections
sudo apt-get install -y mysql-server
4、直接從文件中讀取設置參數
sudo debconf-set-selections mysql-passwd
sudo apt-get install -y mysql-server
5.docker 中靜默安裝mysql
總結
以上是生活随笔為你收集整理的debconf-set-selections mysql_docker 静默安装mysql的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: swift怎么调用Java,Swift完
- 下一篇: promise的状态值_什么是Promi