AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-177889

Rolf's questions

Martin Hope
Rolf
Asked: 2017-04-03 14:09:48 +0800 CST

为什么“apt-get autoremove sendmail”会留下依赖关系?

  • 4

我注意到安装 sendmail,然后卸载它,使用 apt-get 会留下许多不需要的文件。

sudo apt-get install sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  liblockfile-bin liblockfile1 make procmail sendmail-base sendmail-bin
  sendmail-cf sensible-mda
Suggested packages:
  make-doc sendmail-doc rmail logcheck resolvconf sasl2-bin
Recommended packages:
  default-mta mail-transport-agent fetchmail
The following NEW packages will be installed:
      liblockfile-bin liblockfile1 make procmail sendmail sendmail-base
      sendmail-bin sendmail-cf sensible-mda
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 2256 kB of archives.
After this operation, 5263 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

所以我们安装了 sendmail - 9 个新包和 5.2MB。
几分钟后,我改变了主意,想卸载它。没问题,apt-get 让我满意,对吧?我清除(删除包和包配置文件):

sudo apt-get purge sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  procmail sensible-mda
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  sendmail*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 219 kB disk space will be freed.
Do you want to continue? [Y/n] y

然后autoremove(删除自动安装的包依赖)

sudo apt-get autoremove sendmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'sendmail' is not installed, so not removed
The following packages will be REMOVED:
  procmail sensible-mda
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 550 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 24702 files and directories currently installed.)
Removing sensible-mda (8.14.4-8+deb8u1) ...
Removing procmail (3.22-24) ...
Processing triggers for man-db (2.7.0.2-5) ...

即 219 + 550 = 769KB 已恢复!我刚刚释放了 4.something MB 的空间吗?为了什么?

仔细查看输出后,似乎 apt-get 仅删除了之前自动安装的 3 个软件包。例如,软件包 sendmail-base 仍然存在:

sudo apt-get remove sendmail-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  sendmail-base sendmail-bin
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 2464 kB disk space will be freed.
Do you want to continue? [Y/n]

所以我浪费了一些空间。但是为什么还安装了这些自动安装的依赖呢?

debian
  • 1 个回答
  • 691 Views
Martin Hope
Rolf
Asked: 2013-06-15 11:17:26 +0800 CST

为共享主机 (WAMP) 保护 mod_php 的技术?[复制]

  • -1
这个问题在这里已经有了答案:
为什么不使用 WAMP 堆栈? (5 个答案)
7 年前关闭。

我已经设置了一个用于生产的网络服务器。操作系统是 Windows Server,它运行 Apache 2.0 和 PHP 5.3 作为 apache 模块(还有 MySQL ......)。它用于托管属于不同客户的多个虚拟主机(Apache vhosts)。

此时PHP是以系统用户身份运行的。将来可能会授予客户 FTP 访问权限,因此 - 默认情况下 - 每个客户都可以通过 PHP 访问整个系统。这显然是不能接受的。

我知道我可以在 PHP 中设置 open_basedir,但我不确定它是否包含和足够可靠以被视为一个解决方案 - 它是否限制对所有 PHP 函数的访问,例如 include...?PHP 流怎么样?

我也知道 IIS 提供了解决该问题的方法,但我更愿意保留 Apache。

我最想设置的是一个可以满足以下要求(主要)的解决方案:

  • 保持优雅并以某种方式自动。我正在手动管理服务器 - 我希望每个虚拟主机的设置都涉及尽可能少的设置和配置编辑。
  • 允许例外。大多数托管网站都是我自己开发的,我想将它们全部链接到一个库文件夹,因此应该允许对该文件夹进行只读访问,尽管它位于虚拟主机的根目录之外。

那么,有哪些可用选项(如果有)?我已经做了一些研究,似乎该领域的大部分工作都是在 Linux 系统上完成的。

php
  • 2 个回答
  • 1134 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve