我想在带有 Ubuntu 16.04 映像的docker环境中安装certbot:
例如:
docker run -it ubuntu:16.04 /bin/bash
Run Code Online (Sandbox Code Playgroud)
当我在容器内时,安装 certbot 的最直接方法不起作用,因为它需要用户干预:
apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y -u ppa:certbot/certbot && \
apt-get install -y certbot
Run Code Online (Sandbox Code Playgroud)
问题是tzdata
,这个交互式对话框停止了:
Extracting templates from packages: 100%
Preconfiguring packages ...
Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they …
Run Code Online (Sandbox Code Playgroud) 曾尝试向第 3 方询问Juju和 Puppet/Chef之间的主要区别。3rd方对Juju不太熟悉,说不上来。他们干脆说其他人势均力敌,想要超越他们的领先优势是很难的。
那些最接近 Juju 的人是否愿意强调这个软件的优势,为什么它会在配置管理领域超过 Puppet/Chef?
由于我在 docker 容器中托管了一个 WordPress 站点,并且我希望这些容器始终在启动时启动,因此需要手动完成。
有没有办法通过脚本向用户的 cron 添加行?
我通常使用crontab -e
,但我想使用 shell 脚本自动执行此任务。
我正在使用结构进行一些系统管理自动化,我希望能够监控需要在给定机器上升级的软件包的数量。这和我第一次登录机器时看到的信息是一样的,即这部分:
35 packages can be updated.
22 updates are security updates.
Run Code Online (Sandbox Code Playgroud)
是否有一个我可以运行(最好没有sudo
)的命令来提供该信息?
我看过 apt-python 绑定,但它们似乎具有很高的学习曲线,而且它们似乎也发生了很多变化——我想要一些至少可以追溯到 lucid 而不需要的东西在不同的 Ubuntu 版本上做不同的事情。
我有一个脚本可以扫描目录并对其中的文件进行一些维护。另一个进程在目录中创建文件(每天 10 - 30 个文件)。
该脚本通过每日 cron 作业调用。我需要的是在事件上触发脚本(每次在目录中创建一个新文件时)。我更喜欢这个而不是增加 cron 工作的频率。
我怎样才能做到这一点?有没有要安装的命令或程序?
在此先感谢您的帮助。
在安装/插入或卸载/拔出 USB 设备后,如何自动运行脚本?
安装 Google Chrome 会导致添加第三方软件源,可以从中检索 Google Chrome 升级:
$ cat /etc/apt/sources.list.d/google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/chrome/deb/ stable main
$ head -n 9 /var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_Release
Origin: Google, Inc.
Label: Google
Suite: stable
Codename: stable
Version: 1.0
Date: Tue, 04 Oct 2011 00:57:43 +0000
Architectures: i386 amd64
Components: main
Description: Google chrome-linux repository.
$ grep '^Package: ' /var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-amd64_Packages
Package: google-chrome-beta
Package: google-chrome-stable
Package: google-chrome-unstable
Run Code Online (Sandbox Code Playgroud)
如何从此存储库启用无人值守升级?