debian查看bind版本_关于debian:如何在使用apt-get安装软件包之前检查版本

我正在考虑安装上个月在我的Debian PC上发布的hylafax +版本5.5.4。

我检查了dpkg -l | grep"hylafax",发现当前版本为5.5.3。 然后,我检查了apt-cache search hylafax,发现软件包可用,但是看不到任何版本号。

如何在apt-get中找到可用的软件包版本?

在Unix和Linux堆栈交换上的相同问题:unix.stackexchange.com/questions/6284/

好的,我找到了。

apt-cache policy将显示版本详细信息。

它还显示了当前安装的版本以及可以安装的版本。

例如,apt-cache policy hylafax+

不能相信apt install中没有显示此内容,以便您有机会在说出Y之前复习版本。

apt-cache policy

$ apt-cache policy redis-server

redis-server:

Installed: (none)

Candidate: 2:2.8.4-2

Version table:

2:2.8.4-2 0

500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

apt-get install -s

$ apt-get install -s redis-server

NOTE: This is only a simulation!

apt-get needs root privileges for real execution.

Keep also in mind that locking is deactivated,

so don't depend on the relevance to the real current situation!

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

libjemalloc1 redis-tools

The following NEW packages will be installed:

libjemalloc1 redis-server redis-tools

0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.

Inst libjemalloc1 (3.5.1-2 Ubuntu:14.04/trusty [amd64])

Inst redis-tools (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])

Inst redis-server (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])

Conf libjemalloc1 (3.5.1-2 Ubuntu:14.04/trusty [amd64])

Conf redis-tools (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])

Conf redis-server (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])

apt-cache show

$ apt-cache show redis-server

Package: redis-server

Priority: optional

Section: universe/misc

Installed-Size: 744

Maintainer: Ubuntu Developers

Original-Maintainer: Chris Lamb

Architecture: amd64

Source: redis

Version: 2:2.8.4-2

Depends: libc6 (>= 2.14), libjemalloc1 (>= 2.1.1), redis-tools (= 2:2.8.4-2), adduser

Filename: pool/universe/r/redis/redis-server_2.8.4-2_amd64.deb

Size: 267446

MD5sum: 066f3ce93331b876b691df69d11b7e36

SHA1: f7ffbf228cc10aa6ff23ecc16f8c744928d7782e

SHA256: 2d273574f134dc0d8d10d41b5eab54114dfcf8b716bad4e6d04ad8452fe1627d

Description-en: Persistent key-value database with network interface

Redis is a key-value database in a similar vein to memcache but the dataset

is non-volatile. Redis additionally provides native support for atomically

manipulating and querying data structures such as lists and sets.

.

The dataset is stored entirely in memory and periodically flushed to disk.

Description-md5: 9160ed1405585ab844f8750a9305d33f

Homepage: http://redis.io/

Bugs: https://bugs.launchpad.net/ubuntu/+filebug

Origin: Ubunt

dpkg -l

$ dpkg -l nginx

Desired=Unknown/Install/Remove/Purge/Hold

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)

||/ Name                                     Version                   Architecture              Description

+++-========================================-=========================-=========================-=====================================================================================

ii  nginx                                    1.6.2-1~trusty            amd64                     high performance web server

请注意,dpkg -l仅列出已安装的软件包。 提前查看版本没有用。

apt policy

简而言之

Linux Mint,Debian 9,Ubuntu 16.04和更低版本:

简短信息:

apt policy

详细信息(带有说明和取决于):

apt show

以下内容可能会很好地起作用:

aptitude versions ^hylafax+

在aptitude中查看更多(8)

在debian上:

apt list --upgradable

给出包含软件包的列表,要升级的版本以及软件包的实际版本。

结果:

base-files/stable 8+deb8u8 amd64 [upgradable from: 8+deb8u7]

bind9-host/stable 1:9.9.5.dfsg-9+deb8u11 amd64 [upgradable from: 1:9.9.5.dfsg-9+deb8u9]

ca-certificates/stable 20141019+deb8u3 all [upgradable from: 20141019+deb8u2]

certbot/jessie-backports 0.10.2-1~bpo8+1 all [upgradable from: 0.8.1-2~bpo8+1]

dnsutils/stable 1:9.9.5.dfsg-9+deb8u11 amd64 [upgradable from: 1:9.9.5.dfsg-9+deb8u9]

好答案! 提供所有软件包的概述,不需要其他软件包(例如apt-show-versions)。

另外,apt-show-versions软件包(单独安装)将分析dpkg有关已安装内容的信息,并告诉您软件包是否为最新版本。

例..

$ sudo apt-show-versions --regex chrome

google-chrome-stable/stable upgradeable from 32.0.1700.102-1 to 35.0.1916.114-1

xserver-xorg-video-openchrome/quantal-security uptodate 1:0.3.1-0ubuntu1.12.10.1

$

另外,根据手册页:

apt-cache showpkg

也可以用于:

...display information about the packages listed on the command line. Remaining arguments are package

names. The available versions and reverse dependencies of each package listed are listed, as well as forward

dependencies for each version. Forward (normal) dependencies are those packages upon which the package in

question depends; reverse dependencies are those packages that depend upon the package in question. Thus,

forward dependencies must be satisfied for a package, but reverse dependencies need not be.

例如:

apt-cache policy conky

conky:

Installed: (none)

Candidate: 1.10.3-1

Version table:

1.10.3-1 500

500 http://us.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages

500 http://us.archive.ubuntu.com/ubuntu yakkety/universe i386 Packages

正如在其他地方发布的那样,它也适用:

<5233>

您还可以简单地执行常规apt-get update,然后按照手册进行:

apt-get -V upgrade

-V Show verbose version numbers

它将向您显示当前软件包,而将以类似于下面的格式升级的软件包:

~# sudo apt-get -V upgrade

Reading package lists... Done

Building dependency tree

Reading state information... Done

Calculating upgrade... Done

The following packages will be upgraded:

curl (7.38.0-4+deb8u14 => 7.38.0-4+deb8u15)

php5 (5.6.40+dfsg-0+deb8u2 => 5.6.40+dfsg-0+deb8u3)

2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Need to get 12.0 MB of archives.

After this operation, 567 kB of additional disk space will be used.

Do you want to continue? [Y/n]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 首先,需要下载bind软件包,并将其解压缩到本地目录中。然后,使用mount命令将该目录挂载到系统中的一个目录下,例如/mnt/bind。具体命令如下: 1. 下载bind软件包: wget https://www.isc.org/downloads/file/bind-9-16-15/?version=tar-gz -O bind-9.16.15.tar.gz 2. 解压缩软件包: tar -zxvf bind-9.16.15.tar.gz 3. 创建挂载目录: mkdir /mnt/bind 4. 挂载软件包: mount -o loop bind-9.16.15.tar.gz /mnt/bind 5. 进入挂载目录: cd /mnt/bind 6. 安装软件包: ./configure make make install 7. 卸载挂载目录: umount /mnt/bind 完成以上步骤后,即可成功安装bind软件包。 ### 回答2: 在Linux系统安装bind软件包并挂载是一个相对简单的过程。以下是一种可能的步骤: 1. 首先,确保系统已连接到互联网并具备管理员权限。 2. 打开终端窗口,并执行以下命令以更新软件包列表: ``` sudo apt update ``` 3. 确认更新完成后,执行以下命令安装bind软件包: ``` sudo apt install bind9 ``` 这会自动安装bind DNS服务软件包。 4. 安装完成后,可以执行以下命令查看bind服务的状态,并确保其已启动: ``` systemctl status bind9 ``` 如果bind服务已成功启动,您将看到一条类似于"Active: active (running)"的消息。 5. 现在,您可以开始配置bind服务器。打开bind的主配置文件`named.conf`,该文件通常位于`/etc/bind/`目录下。 ``` sudo nano /etc/bind/named.conf ``` 6. 根据您的需求进行配置,这可能涉及指定本地域名解析的文件、更改监听地址等。 7. 如果需要添加自定义域名解析记录,您可以在`/etc/bind/`目录下创建一个新的区域文件,并添加相关记录。 8. 完成配置后,可以重新启动bind服务,以使更改生效: ``` sudo systemctl restart bind9 ``` 您还可以使用以下命令启动、停止和重启bind服务: ``` sudo systemctl start bind9 sudo systemctl stop bind9 sudo systemctl restart bind9 ``` 通过遵循上述步骤,您应该能够成功安装和挂载bind软件包,并配置bind DNS服务器以满足您的需求。请记住始终备份配置文件,以防止意外数据丢失。 ### 回答3: 在Linux上安装BIND软件包并挂载的过程如下: 1. 首先,确保您具有管理员权限或root访问权限。如果没有,可以使用sudo命令提升权限。 2. 打开终端,并使用适用于您的Linux发行版的软件包管理器,例如apt-getDebian或Ubuntu)或yum(CentOS或Red Hat),来安装BIND软件包。例如,在Debian或Ubuntu上,可以使用以下命令:sudo apt-get install bind9。 3. 安装过程可能需要下载一些依赖项,并在提示时输入确认、密码等信息。 4. 安装完成后,您可以使用systemctl命令来启动和停止BIND服务。例如,在Debian或Ubuntu上,可以使用以下命令来启动BIND服务:sudo systemctl start bind9。 5. 为了使BIND服务系统启动时自动启动,您可以使用以下命令:sudo systemctl enable bind9。 6. 现在,您可以修改BIND配置文件以适应您的需求。配置文件通常位于/etc/bind/named.conf(Debian或Ubuntu)或/etc/named.conf(CentOS或Red Hat)。您可以使用任何文本编辑器打开文件进行编辑。 7. 在配置文件中,您可以定义域名解析区域、添加主机记录和其他相关设置。添加您所需的所有配置后,请保存文件并关闭编辑器。 8. 当您完成配置文件的修改后,您需要重新加载BIND服务以使更改生效。在终端中,可以使用以下命令来重新加载BIND服务:sudo systemctl reload bind9。 现在,您已经成功安装并挂载了BIND软件包。您可以在Linux系统使用BIND来提供域名解析服务。请注意,由于BIND的配置相对复杂,建议在进行任何更改之前先熟悉相关文档或寻求专业建议。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值