如何自动化dpkg / apt-get? [英] How can I automate dpkg/apt-get?

查看:166
本文介绍了如何自动化dpkg / apt-get?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个自动下载新服务器软件包的脚本。但是,有些事情,如'mysql-server'无法自动安装,因为您需要首先在ncurses接口中配置它们。我浏览了手册页,找不到任何适当的内容。



我不在乎我是否必须稍后上传/编辑conf文件 - 我只需要安装相应的软件包。



除了抓取压缩包和自己构建之外,任何人都知道该怎么办?



更新$ / $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $







DEBIAN_FRONTEND = 'noninteractive'apt-get install -yq mysql-server

然而,期望看起来像sun-java6-jdk所需要的东西;尚未评估它

解决方案

对于通过debconf提出问题的软件包(这是显示ncurses显示),您可以预先回答问题。对于sun-java,可以按照 http:/ /www.davidpashley.com/blog/debian/java-license


I'm trying to create a script that automatically downloads packages for new servers. However, some things like 'mysql-server' can not installed automatically cause you need to configure them in the ncurses interface first. I've looked through the man pages and can't find anything appropriate.

I don't care if I have to upload/edit a conf file later -- I just need the appropriate packages installed.

Anyone know what to do besides grabbing tarballs and building them myself?

UPDATE found out that for things like mysql-server you can just do:

DEBIAN_FRONTEND='noninteractive' apt-get install -yq mysql-server

however expect looks like something I'll need for sun-java6-jdk; haven't evaluated it yet

解决方案

For packages that ask questions through debconf (which is what puts up the ncurses display), you can pre-answer the questions. For sun-java, the questions can be pre-answered by following the instructions at http://www.davidpashley.com/blog/debian/java-license

这篇关于如何自动化dpkg / apt-get?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆