小编shi*_*ish的帖子

两台主机在 /etc/hosts 中可以有相同的 IP 地址吗?

两台主机是否可以共享相同的 IP 地址而不会发生冲突。这就是我的 /etc/hosts 的样子:-

$ cat /etc/hosts
127.0.0.1   localhost
127.0.1.1   debian
127.0.1.1       mini
Run Code Online (Sandbox Code Playgroud)

现在可以看到 mini 和 debian 共享相同的 IP 地址。

现在 debian 是我的主机名。

$ hostname
debian
Run Code Online (Sandbox Code Playgroud)

而 mini 是一个 apache 站点的虚拟主机。

/etc/apache2/sites-available$ head minidebconfindia.conf 
<VirtualHost mini:80>
ServerAdmin webmaster@localhost
Run Code Online (Sandbox Code Playgroud)

这是在 Apache 2.4 中。我只是不确定这是否好。我的一个朋友在 Apache 2.2 上有相同的设置(使用不同的主机名)并且可以正常工作。

期待知道这是否有效还是我应该做任何更改?

networking dns hostname hosts

5
推荐指数
2
解决办法
4670
查看次数

Apache 2.4 不会重新加载,我的配置有问题吗?

我试图让一个VirtualHost用 Apache 2.2 编写的文件在 Apache 2.4 中工作,虽然我对它做了一些更改,但它没有通过 Apache configtest. 这个想法是在本地测试站点。这是在 Apache 2.2 中显然有效的原始文件:

<VirtualHost local.in2014.mini.debconf.org:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/in2014.mini/website/

    <Directory />
        Options +FollowSymLinks +Includes
        AllowOverride None
    </Directory>

    <Directory /var/www/in2014.mini/website/>
        Options +Indexes +FollowSymLinks +MultiViews +Includes
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

这些是我为更改为 Apache 2.4 所做的更改:

$ cat /etc/apache2/sites-enabled/minidebconfindia.conf
<VirtualHost mini:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/html/in2014.mini/website

    <Directory />
        Options FollowSymLinks +Includes
        Require all granted
    </Directory>

    <Directory /var/www/html/in2014.mini/website/>
        Options Indexes FollowSymLinks MultiViews +Includes
        Require all granted
    </Directory>
</VirtualHost> …
Run Code Online (Sandbox Code Playgroud)

debian apache-httpd

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

有没有办法在 Debian 中使用 cli 找到自己的动态公共 IP 地址?

对网络最简单/最简单的理解是

一种。当您连接到 ISP 时,ISP 仅在该连接期间提供动态地址(如临时电话号码),下次连接时,您将再次拥有不同的动态 IP 地址。

湾 您使用浏览器访问具有静态 IP 地址的不同站点(例如永久号码或/和机构的永久地址)。

现在有没有办法获得自己的 IP 地址,而不是去像 whatismyipaddress.com 这样的网络服务。

连接如下:-

ISP - 调制解调器/路由器 - 系统

编辑 - 调制解调器/路由器是 D-Link DSL-2750U ADSL 路由器/调制解调器。http://www.dlink.co.in/products/?pid=452

我确实在日志文件中看到了如何跟踪我的公共 IP 地址?但这也使用了外部网络服务,如果我们可以不用访问外部 URL/IP 地址,那就更好/更好了。

networking bash ip debian dynamic-dns

5
推荐指数
2
解决办法
3930
查看次数

当使用 mpv 的媒体文件中有多个音轨时,如何选择一个音轨?

我有包含多个音轨的媒体文件(视频 + 音频)。下面分享一个例子——

 $ mediainfo somefile.mkv

General
Unique ID                                : xxxxxxxxxxxxxxxxxxxxxxxx
Complete name                            : somefile.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 1.35 GiB
Duration                                 : 2h 26mn
Overall bit rate                         : 1 314 Kbps
Movie name                               : somefile
Encoded date                             : UTC 2016-09-04 00:00:15
Writing application                      : mkvmerge v8.8.0 ('Wind at my back') 64bit
Writing library                          : libebml v1.3.3 + libmatroska v1.4.4
Cover                                    : Yes
Attachments                              : Cover.jpg

Video
ID                                       : 1 …
Run Code Online (Sandbox Code Playgroud)

shell audio mpv

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

如何为 graphviz 图形节点添加颜色?

这是我目前拥有的图表的代码:

graph Budget {
    Country_Budget -- Profit_and_Loss_Account  [type=s];
    Country_Budget -- Balance_Sheet [type=s];
     Profit_and_Loss_Account -- Income [type=s];
     Profit_and_Loss_Account -- Expenditure [type=s];
     Income -- Revenue_Income [type=s];
     Income -- Capital_Income [type=s];
     Expenditure -- Revenue_Expenditure [type=s];
     Expenditure -- Capital_Expenditure [type=s]; 
     Balance_Sheet -- Assets [type=s]; 
     Balance_Sheet -- Liabilities [type=s];
}
Run Code Online (Sandbox Code Playgroud)

这是使用dotty工具时的渲染 -

国家预算草图

虽然它提供了细节和结构,但有人知道如何让它更加丰富多彩吗?

在 Debian 上运行 graphviz 2.38.0-16。

colors debian graph graphviz

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

所有英特尔 GPU 都只使用软件渲染 (Mesa) 吗?

我在看:-

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.7
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 11.0.7
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: …
Run Code Online (Sandbox Code Playgroud)

debian graphics intel

4
推荐指数
1
解决办法
3447
查看次数

在编辑器列表中放置一个新的/图形编辑器

我已经提出了一个查询之前,然后希望把leafpad编辑器列表中,但无法。

[$] sudo update-alternatives --set editor /usr/bin/leafpad                                                                       
update-alternatives: error: alternative /usr/bin/leafpad for editor not registered; not setting
Run Code Online (Sandbox Code Playgroud)

看一看,看到了这份清单——

??[$] sudo update-alternatives --config editor

There are 8 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /usr/bin/le          60        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/emacs24     0         manual mode
  4            /usr/bin/le          60        manual mode
  5            /usr/bin/ne          20        manual mode
  6            /usr/bin/nedit       40        manual mode
  7            /usr/bin/vim.basic   30        manual …
Run Code Online (Sandbox Code Playgroud)

editors debian dpkg

4
推荐指数
1
解决办法
1057
查看次数

是否有 CLI 工具可以解析/读取并显示 Torrent 文件中的元数据?

我下载了一个 torrent 文件http://cdimage.debian.org/cdimage/stretch_di_rc1/amd64/bt-cd/debian-stretch-DI-rc1-amd64-netinst.iso.torrent

现在我想解析/阅读它,以便我可以找出诸如 -

一种。使用哪个软件来创建 torrent 文件?

湾 iso镜像的大小、大小和片数

C。iso 图像的跟踪器数量。

所有这些都是元数据。

我想我正在寻找媒体文件的 mediainfo 是什么 -

[$] mediainfo Big_Buck_Bunny_small.ogv                                                                                              
General
ID                                       : 30719 (0x77FF)
Complete name                            : Big_Buck_Bunny_small.ogv
Format                                   : Ogg
File size                                : 2.65 MiB
Duration                                 : 1 min 19 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 280 kb/s
Writing application                      : ffmpeg2theora-0.25
SOURCE_OSHASH                            : cc9e38e85baf7573

Video
ID                                       : 20319 (0x4F5F)
Format                                   : Theora
Duration                                 : 1 min 19 s
Bit rate                                 : …
Run Code Online (Sandbox Code Playgroud)

linux debian bittorrent

4
推荐指数
2
解决办法
1462
查看次数

如何在 Debian 中查看本地/下载的 .deb 文件的元数据

虽然可以使用下载 .deb 包,apt download $package.deb但似乎没有任何方法可以查看该文件的元数据。我的意思是元数据类似于 -

[$] aptitude show dgit                                                                                                             
Package: dgit                            
Version: 3.10
State: not installed
Priority: optional
Section: devel
Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
Architecture: all
Uncompressed Size: 309 k
Depends: perl, libwww-perl, libdpkg-perl, git-core, devscripts, dpkg-dev, git-buildpackage, liblist-moreutils-perl, coreutils (>= 8.23-1~) | realpath, libdigest-sha-perl, dput, curl, apt, libjson-perl, ca-certificates, libtext-iconv-perl, libtext-glob-perl
Recommends: ssh-client
Suggests: sbuild
Description: git interoperability with the Debian archive
 dgit (with the associated infrastructure) makes it possible to treat the Debian archive as …
Run Code Online (Sandbox Code Playgroud)

debian

4
推荐指数
2
解决办法
2330
查看次数

为什么不推荐使用 bind9-host 中的主机?什么时候?

我在看 bind9-host

shirish@debian:"04 Jan 2020 15:48:02" ~$ aptitude show bind9-host=1:9.11.5.P4+dfsg-5.1+b1
Package: bind9-host                      
Version: 1:9.11.5.P4+dfsg-5.1+b1
State: installed
Automatically installed: no
Priority: standard
Section: net
Maintainer: Debian DNS Team <team+dns@tracker.debian.org>
Architecture: amd64
Uncompressed Size: 369 k
Compressed Size: 271 k
Filename: pool/main/b/bind9/bind9-host_9.11.5.P4+dfsg-5.1+b1_amd64.deb
Checksum-FileSize: 271156
MD5Sum: 8cd326a23a51acdb773df5b7dce76060
SHA256: 977287c7212e9d3e671b85fdd04734b4908fe86d4b3581e47fb86d8b27cfdb3b
Archive: testing
Depends: libbind9-161 (= 1:9.11.5.P4+dfsg-5.1+b1), libdns1104 (= 1:9.11.5.P4+dfsg-5.1+b1), libisc1100 (= 1:9.11.5.P4+dfsg-5.1+b1), libisccfg163 (= 1:9.11.5.P4+dfsg-5.1+b1), liblwres161 (= 1:9.11.5.P4+dfsg-5.1+b1),      libc6 (>= 2.14), libcap2 (>= 1:2.10), libcom-err2 (>= 1.43.9), libfstrm0 (>= 0.2.0), libgeoip1, libgssapi-krb5-2 (>= 1.6.dfsg.2), …
Run Code Online (Sandbox Code Playgroud)

debian hostname bind9

4
推荐指数
1
解决办法
727
查看次数