标签: apt

BIND9 在哪里保存它的缓存?

在 Ubuntu 12.04 上,我通过apt-get install.

我以一种非常简单的方式配置服务器,它在名称解析中工作。现在我很想阅读(如果可能的话)它的缓存。

阅读rndc联机帮助页我尝试使用该rndc flush view命令,但它说

rndc: `flush` 失败: 未找到

而如果我简单地运行rndc flush它就可以了。

那么,首先,在哪里可以找到 BIND9 缓存文件?

然后,为什么会rndc flush view失败?

bind rndc apt ubuntu-12.04

6
推荐指数
1
解决办法
3万
查看次数

无人值守升级不升级(或什么都不做)

到目前为止,我一直试图使软件包在 Debian GNU/Linux (7.0) 下运行无人值守升级,但没有成功。

我遵循的步骤:

它应该每天运行,但到时间它什么也没做。我检查了/var/log/unattended-upgrades/ 的日志和/var/log/apt/history.log 的apt 历史日志,但自安装以来没有发生任何事情。

我缺少启用它的任何步骤吗?在阅读了/usr/share/doc/unattended-upgrades/README下的文档后,我认为以上是您必须遵循的唯一内容才能使其运行。

linux debian upgrade apt

6
推荐指数
1
解决办法
2918
查看次数

如何将参数传递给木偶模块?

配置木偶模块的最佳实践是什么?我有傀儡2.7.11。我觉得这种方式很乱,看起来像使用全局变量。

node default {
   $always_apt_update = true
   include apt
}
Run Code Online (Sandbox Code Playgroud)

我应该创建从原始配置继承大部分配置的类吗?文档似乎有太多版本,我不确定哪一个适用于我。

更新:

当我尝试这个时:

  class { 'apt': 
    always_update => 'true',
  } 
Run Code Online (Sandbox Code Playgroud)

我收到一个错误:

Error 400 on SERVER: Invalid parameter always_update at /etc/puppet/manifests/nodes.pp:32
Run Code Online (Sandbox Code Playgroud)

linux debian configuration-management puppet apt

6
推荐指数
1
解决办法
3万
查看次数

Ubuntu apt-get 更新与升级

我有一个带有 Ubuntu Server 12.04 的 VPS,我希望我的服务器具有最大的稳定性,其主要目的是网络服务器。

Update和 和有什么区别Upgrade?我无法理解差异。据我所知Upgrade,升级某些软件产品的软件包版本,如果这个升级的软件有一些 API 更改,并且我的代码可能与该更新不兼容,我会遇到问题。但由于与使用dist-upgrade大多数时间的大版本更改相比,这只是小版本更改,因此这些升级将与我的代码兼容。我理解正确吗?

第二个小问题是否sudo apt-get update与我运行sudo aptitude并安装所有安全更新相同?我喜欢aptitude,它类似于 Windows 更新,这就是我选择 Ubuntu Server 的原因。

ubuntu aptitude update apt

6
推荐指数
1
解决办法
5751
查看次数

停止 apt-get 升级

我试图只升级一个包,所以我输入了 sudo apt-get upgrade packagename。(现在我知道我应该为此使用 apt-get install。)现在 apt-get 正在升级我整个系统中的所有内容。我现在用 shutdown -h 停止了它(嘿,它起作用了),因为 Cc 似乎不太好用。

然而 apt-get 有内存,现在我不能用 apt-get 做任何事情,比如安装,除非它尝试继续完整的系统升级。如何让 apt-get 中止升级?


当我按照 Itai Ganot 建议的已接受答案中的说明进行操作时,会发生以下情况:

$ sudo apt-get autoclean
[sudo] password for dsw: 
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
dsw@dsw-VirtualBox:~$ cd /var/cache/apt/archives/partial
dsw@dsw-VirtualBox:/var/cache/apt/archives/partial$ ls
dsw@dsw-VirtualBox:/var/cache/apt/archives/partial$ ls -a
.  ..
Run Code Online (Sandbox Code Playgroud)

按照消息中的说明进行操作:

sudo dpkg --configure -a
Run Code Online (Sandbox Code Playgroud)

最终停止。所以上述方法似乎最终会停止 apt-get 更新。

ubuntu apt

6
推荐指数
1
解决办法
3万
查看次数

更喜欢本地镜像而不更改 /etc/apt/sources.list?

我们在http://ubuntu.wikimedia.org/ubuntu/ ( https://mirrors.wikimedia.org/debian/ ) 上有 Ubuntu (Debian) 的本地镜像。我想将客户端配置为更喜欢从这些镜像下载/仅下载软件包,而不是http://nova.clouds.archive.ubuntu.com/ubuntu/ ( http://httpredir.debian.org/debian/ )。我可以通过替换 中的 URL 来成功完成此操作/etc/apt/sources.list,但是我有兴趣在进行更改的情况下执行此操作/etc/apt/sources.list,以便自定义很明显并且可以轻松恢复。

我创建的/etc/apt/sources.list.d/wikimedia-mirror.list内容为:

deb http://ubuntu.wikimedia.org/ubuntu/ trusty main universe
deb-src http://ubuntu.wikimedia.org/ubuntu/ trusty main universe
Run Code Online (Sandbox Code Playgroud)

/etc/apt/preferences.d/wikimedia-mirror.pref

Package: *
Pin: origin "ubuntu.wikimedia.org"
Pin-Priority: 501
Run Code Online (Sandbox Code Playgroud)

之后apt-get update,这将导致镜像中的包的优先级为 501,但apt-get仍会从原始源下载这些包:

scfc@toolsbeta-t68121-trusty:~$ apt-cache policy zsh-doc
zsh-doc:
  Installed: (none)
  Candidate: 5.0.2-3ubuntu6
  Version table:
     5.0.5-4ubuntu1~ubuntu14.04.1 0
        100 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
     5.0.2-3ubuntu6 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        501 http://ubuntu.wikimedia.org/ubuntu/ trusty/main amd64 …
Run Code Online (Sandbox Code Playgroud)

apt

6
推荐指数
0
解决办法
817
查看次数

apt升级非常大,我如何查看单个包的大小?

当我通常登录服务器并执行apt upgrade更新时,通常最多需要几百MB。我刚刚登录到我的一台仅安装了 virtualmin 的 vps,apt upgrade报告它需要 16.8GB,这比我的可用空间还要多。

这似乎不对。我如何才能看到哪些包需要这么多空间?

ubuntu apt ubuntu-16.04

6
推荐指数
1
解决办法
3050
查看次数

apt-get 安装匹配通配符的软件包

我正在运行 Debian 8 Jessie,尝试从 shell 脚本安装 PHP 命令行解释器。

这是我所做的:

sudo apt-get install php-cli
Run Code Online (Sandbox Code Playgroud)

它告诉我没有php-cli。我确实发现有php5-cli。但是,为了使我的脚本更加健壮,例如在最近的 ubuntu 服务器产品上运行时php7,我不想指定php5-cli.

我用谷歌搜索答案,但我得到的只是让我困惑:

xrfang@P-qapub:~$ sudo apt-get install --names-only "php*-cli"
E: Command line option --names-only is not understood
xrfang@P-qapub:~$ sudo apt-cache search --names-only php-cli
php-google-api-php-client - Google APIs client library for PHP
xrfang@P-qapub:~$ apt-cache search --names-only "php\d+-cli$"
xrfang@P-qapub:~$ apt-cache search --names-only "php\d-cli$"
xrfang@P-qapub:~$ apt-cache search --names-only "php\\d-cli$"
xrfang@P-qapub:~$ apt-cache search --names-only "php5-cli$"
php5-cli - command-line interpreter for …
Run Code Online (Sandbox Code Playgroud)

regex apt

6
推荐指数
1
解决办法
1万
查看次数

在 nginx 1.15.8 中安装 more_set_headers

Ubuntu 16 Server -load_module modules/ngx_http_headers_more_filter_module.so无法从全新安装中解决问题。

root@ /etc/nginx # nginx -V
nginx version: nginx/1.15.8
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
built with OpenSSL 1.0.2g  1 Mar 2016
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 …
Run Code Online (Sandbox Code Playgroud)

ubuntu nginx source apt ubuntu-16.04

6
推荐指数
1
解决办法
2万
查看次数

如何在多台 Windows 机器上自动更新非 Microsoft 软件?

我们有一台 Windows Server 2003 机器。我们还有 30 台运行 Vista Home Basic 的机器以及一系列免费软件:Firefox、Gimp、Inkscape 等。有没有办法自动更新这些软件?我正在寻找适用apt于 Windows 的Aptitude ( ) 模拟软件。有windows-get,但它没有“升级”功能,只有“安装”。

windows update apt

5
推荐指数
1
解决办法
931
查看次数