yum - 没有可用的 httpd 包(新的 VPS)

jer*_*iuh 4 linux yum vps apache-httpd

所以我有一个新的 VPS,它只有骨架。根本不是我所期望的,我可能已经超出了我的深度,但我正在努力让基本要素运行起来。主人是瑞典人,非常无助。

uname -a 输出:

Linux myhostname.com 2.6.32-431.el6.i686 #1 SMP Fri Nov 22 00:26:36 UTC 2013 i686 i686 i386 GNU/Linux

所以我试图找到并启动Apache。 apachectl start未知。 lsof -nPi | grep ":80 (LISTEN)"没有输出。没有对httpdapache2in的引用/etc/init.d/

所以我开始尝试像这样安装 Apache:

$ yum install httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.sunet.se
 * extras: ftp.sunet.se
 * updates: ftp.sunet.se
Setting up Install Process
No package httpd available.
Error: Nothing to do
Run Code Online (Sandbox Code Playgroud)

rpm -qa | grep httpd没有输出,所以我检查/etc/yum.confhttpd在排除行中看到:

exclude=bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*
Run Code Online (Sandbox Code Playgroud)

我不知道该怎么做。我很确定 Apache 不存在,PHP 也不存在。MySQL 运行良好。

问题

  • 由于主机忽略我的电子邮件,httpd从忽略列表中删除会有什么危害?
  • 另外,如果yum.conf没有列出存储库,我是否需要添加它们?

slm*_*slm 8

对于初学者httpd*,我会从该排除列表中删除yum.conf。此外,每个 repo 通常不列在yum.conf目录中/etc/yum.repo.d,而是在目录中。在该文件的末尾经常有这样的评论:

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
Run Code Online (Sandbox Code Playgroud)

例子

$ ls /etc/yum.repos.d/
fedora.repo                             home:pstavirs:ostinato.repo             rpmfusion-free-updates.repo             rpmfusion-nonfree-updates.repo
fedora-updates.repo                     home:tpokorra:mono.repo                 rpmfusion-free-updates-testing.repo     rpmfusion-nonfree-updates-testing.repo
fedora-updates-testing.repo             rpmfusion-free-rawhide.repo             rpmfusion-nonfree-rawhide.repo          rpm-sphere.repo
google-chrome.repo                      rpmfusion-free.repo                     rpmfusion-nonfree.repo                  virtualbox.repo
Run Code Online (Sandbox Code Playgroud)

而不是编辑yum.conf你可以运行yum一个并告诉它像这样覆盖排除,--disableexcludes=[all|main|repoid].

   --disableexcludes=[all|main|repoid]
        Disable the excludes defined in your config files. Takes one of 
        three options:
          all == disable all excludes
          main == disable excludes defined in [main] in yum.conf
          repoid == disable excludes defined for that repo
Run Code Online (Sandbox Code Playgroud)

例子

$ sudo yum --disableexcludes=all install httpd
Run Code Online (Sandbox Code Playgroud)