debconf-utils-交互式安装时预配置
debconf-utils是一个可以在Ubuntu下预先配置要安装程序的小工具,它可以避免在安装一个DEB程序时的弹窗输入问题,这可能在编写一键部署脚本的时候非常有用。
以下我们用安装MySQL-APT源作为示例。
1、安装debconf-utils
root@ubuntu:~# apt-get -y install debconf-utils
2、更新APT源
root@ubuntu:~# apt-get update
3、先手动安装一遍MySQL-APT源
此时有弹窗!根据弹窗和自己的需求输入并安装一遍。
root@ubuntu:~# wget https://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb
root@ubuntu:~# dpkg -i mysql-apt-config_0.8.13-1_all.deb
4、查询想要预先配置的DEB程序的相关配置信息
通过已安装的DEB程序,获取到想要静默安装预配置信息。
root@ubuntu:~# debconf-get-selections |grep 'mysql-apt-config'
mysql-apt-config mysql-apt-config/select-tools select Enabled
mysql-apt-config mysql-apt-config/select-server select mysql-5.7
mysql-apt-config mysql-apt-config/repo-url string http://repo.mysql.com/apt
mysql-apt-config mysql-apt-config/preview-component string
mysql-apt-config mysql-apt-config/repo-codename select xenial
mysql-apt-config mysql-apt-config/tools-component string mysql-tools
mysql-apt-config mysql-apt-config/select-preview select Disabled
mysql-apt-config mysql-apt-config/select-product select Ok
mysql-apt-config mysql-apt-config/repo-distro select ubuntu
mysql-apt-config mysql-apt-config/unsupported-platform select abort
mysql-apt-config mysql-apt-config/dmr-warning note
5、然后卸载已安装的DEB包
卸载刚刚需要通过图形化弹窗安装程序。
root@ubuntu:~# apt-get -y remove mysql-apt-config
6、重新安装DEB包,预配置软件
根据上面获取到预配置信息,预配置软件。
root@ubuntu:~# debconf-set-selections << EOF
mysql-apt-config mysql-apt-config/select-tools select Enabled
mysql-apt-config mysql-apt-config/select-server select mysql-5.7
mysql-apt-config mysql-apt-config/repo-url string http://repo.mysql.com/apt
mysql-apt-config mysql-apt-config/preview-component string
mysql-apt-config mysql-apt-config/repo-codename select xenial
mysql-apt-config mysql-apt-config/tools-component string mysql-tools
mysql-apt-config mysql-apt-config/select-preview select Disabled
mysql-apt-config mysql-apt-config/select-product select Ok
mysql-apt-config mysql-apt-config/repo-distro select ubuntu
mysql-apt-config mysql-apt-config/unsupported-platform select abort
mysql-apt-config mysql-apt-config/dmr-warning note
EOF
6、关闭交互式的静默安装DEB包
你会发现没有弹窗提示了!
root@ubuntu:~# DEBIAN_FRONTEND=noninteractive apt-get -y install ./mysql-apt-config_0.8.13-1_all.deb
debconf-utils-交互式安装时预配置的更多相关文章
- centos最小化安装时网络配置
查看网卡: ip addr 修改网络配置文件 vi /etc/sysconfig/network-scripts/ifcfg-enp33 BOOTPROTO=dhcp ONBOOT=yes 重启网络服 ...
- 年终福利,PHP7+Apache2.4+MySQL5.6 源码编译安装,环境配置,搭建你自己的LAMP环境
PHP7 都出来了,你还在玩PHP5吗? MySQL5.6 早都出来了,你还在玩MySql5.2吗? Apache2.4 早都出来了,你还在玩Apache2.2吗? 笔者不才,愿意亲自搭建环境,供搭建 ...
- mate-desktop安装在其他目录时一些配置信息
1.mate-desktop安装在其他目录时一些配置信息 2.BIN目录下添加相应的mate-session_gtk2/3 3.首先配置如下环境变量 #!/bin/sh if [[ "${E ...
- saltstack配置安装的一些关键步骤及安装时各种报错的分析
以下其他仅做参考,官方网址才是安装重点:http://docs.saltstack.cn/topics/installation/rhel.html 与安装相关的一些文档或资料: 一.linux服务器 ...
- 安装时后的idea,项目不能运行,pom.xml文件不能下载到本地仓库,maven配置是正确的
安装时后的idea,项目不能运行,pom.xml文件不能下载到本地仓库,maven配置是正确的 项目上传到svn后,同事下载项目后,没有识别出来mavn中的pom.xml文件,导致idea不能自动下载 ...
- Android Studio的安装及第一次启动时的配置
Android Studio的安装及第一次启动时的配置 一.下载Android Studio 百度搜索“Android Studio" 点击中文社区进入,选择最新版本下载. 下载后双击安装包 ...
- apache安装时的一些术语
apache源码安装时,需要的哪些必须依赖模块? 主要需要apr, apr-util, pcre模块 其中 apr模块时必须的. 如何卸载 源码安装的软件? 在源码 的 解压目录下, 使用 make ...
- 【菜鸟玩Linux开发】Redis安装和自启动配置
Redis是一个C实现的基于内存.可持久化的键值对数据库,在分布式服务中常作为缓存服务.本篇将介绍在CentOS下如何从零开始安装到配置启动服务. 一. 安装Redis Redis的安装其实相当简单, ...
- Yeoman入门之安装及环境配置
Yeoman入门之安装及环境配置 http://blog.csdn.net/panlingfan/article/details/27345037 http://www.nodejs.orgYEOMA ...
随机推荐
- css 迷惑的position
迷惑的position 小加发现实际开发中position使用频率很高,但很多人却对position不是很了解,导致开发中出现各种问题,现在让我门一起来看看这个迷惑的position吧~ static ...
- Python中使用正则表达式获取两个字符中间部分
问题背景:当我们爬取网页信息时,对于一些标签的提取是没有意义的,所以需要提取标签中间的信息. 解决办法:用到了re包下的函数 方法1:用到了research()方法和group()方法 方法2:用到了 ...
- ubantu系统之安装notepadqq
Ubuntu下的安装方法: sudo add-apt-repository ppa:notepadqq-team/notepadqq sudo apt-get update s ...
- Linux安装JDK报错
报错内容: tar (child): jdk-8u141-linux-x64.tar.gz: Cannot open: No such file or directory tar (child): E ...
- java中方法重载是什么, 实际中到底有什么意义, 用处?请举例
7.3 方法重载(overload) 当几个方法有相同的方法名,但参数个数不同或参数类型不同时,就涉及方法重载 方法重载有什么意义呢?在公司里编程,有时候一个方法名,要用到很多次,而且每次跟每次的参 ...
- SourceMonitor的安装
SourceMonitor 本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧! 中文名 SourceMonitor 软件大小 1743KB 软件语言 英文 软件类别 国外软件 ...
- uni-app中 未收藏和已收藏功能展示
效果图如下: 未收藏: 已收藏: 代码实现: 1 <view class="jichu"> 2 <view class="name">x ...
- numpy教程05---ndarray的高级操作
欢迎关注公众号[Python开发实战], 获取更多内容! 工具-numpy numpy是使用Python进行数据科学的基础库.numpy以一个强大的N维数组对象为中心,它还包含有用的线性代数,傅里叶变 ...
- 一些有用的工具,iftop,iotop,htop,glances
一些有用的工具: yum install glances -y资源监控工具GLANCESglances 可以为 Unix 和 Linux 性能专家提供监视和分析性能数据的功能,其中包括:CPU 使用率 ...
- 1903021116—吉琛—Java第七周作业—客户类测试
项目 内容 课程班级博客链接 19信计班 这个作业要求链接 第七周作业链接 博客名称 学号-姓名-Java第七周作业-客户类测试 要求 每道题要有题目,代码(使用插入代码,不会插入代码的自己查资料解决 ...