简体   繁体   English

从“ yum install httpd”和“ source”安装apache有什么区别?

[英]What is the difference between installing apache from “yum install httpd” and “source”?

1) What is the difference between installing apache from "yum install httpd" and "source" ? 1)从“ yum install httpd”和“ source”安装apache有什么区别? 2) Why both installation methods create different path for httpd.conf file? 2)为什么两种安装方法都会为httpd.conf文件创建不同的路径? 3) Are we doing source installations for specific requirements? 3)我们是否针对特定要求进行源代码安装?

Installation from Source: 从源安装:

tar xvfz httpd-2.2.17.tar.gz --> ./configure --enable-ssl --enable-so --> make --> make install tar xvfz httpd-2.2.17.tar.gz-> ./configure --enable-ssl --enable-so-> make-> make install

Installation using YUM: 使用YUM安装:

yum instll httpd 百胜httpd

Please help me. 请帮我。

Thanks in advance -Shishir 在此先感谢-Shishir

1) What is the differnce between installing apache from "yum install httpd" and "source" ? 1)从“ yum install httpd”和“ source”安装apache有什么区别?

Installing distributor-provided package (eg. by yum ) means installing precompiled, almost-ready-to-use binary version of application, whereas installation by source means building application from source, which involves compiling program source code into binary code. 安装发行商提供的软件包(例如,通过yum )意味着安装预编译的,几乎立即可用的二进制版本的应用程序,而按源安装意味着从源代码构建应用程序,这涉及将程序源代码编译成二进制代码。

Most notable differences are: 最明显的区别是:

  1. Building from source provides more flexibility - often applications can be configured to be built with different features. 从源代码构建提供了更大的灵活性-通常可以将应用程序配置为具有不同的功能。 For example, you can decide whether you want to build Apache with support for SSL and whether you want to include support for PHP scripting and so on. 例如,您可以决定是否要使用对SSL的支持来构建Apache,以及是否要包括对PHP脚本的支持等等。 On the other hand, binary packages are sometimes split into several packages, for example Apache modules (such as mod_php ) can be installed as separate modules. 另一方面,二进制软件包有时会拆分为多个软件包,例如,可以将Apache模块(例如mod_php )安装为单独的模块。

  2. Installing from source is usually much more time consuming while installing binary package involves mainly copying files and running installation scripts. 从源代码安装通常会花费更多时间,而安装二进制软件包主要涉及复制文件和运行安装脚本。

  3. Most often, latest versions of applications are provided in source form only - there is time gap before application is packaged and made available in repositories. 大多数情况下,最新版本的应用程序仅以源代码形式提供-在打包应用程序并将其在存储库中可用之前,存在时间间隔。 On the other hand, application installed from repository will be automatically updated by package manager, while applications installed from source will have to be updated manually. 另一方面,从存储库安装的应用程序将由程序包管理器自动更新,而从源安装的应用程序将必须手动更新。

  4. Installing binary packages need only package manager, whareas installing from source required working toolchain, mostly make , compilers (eg. gcc ) and development version of third-party libraries. 安装二进制软件包只需要软件包管理器,从源代码安装所需的工作工具链,主要是make ,编译器(例如gcc )和第三方库的开发版本。

  5. Package manager handles dependencies for you. 包管理器为您处理依赖关系。 For example, Apache needs libapr , Apache Portable Runtime. 例如,Apache需要libapr ,即Apache可移植运行时。 When you install Apache using package manager, it installs libapr automatically for you. 使用软件包管理器安装Apache时,它将自动为您安装libapr When you build from source, you have to install libapr first. 从源代码构建时,必须首先安装libapr

2) Why both installation methods create different path for httpd.conf file? 2)为什么两种安装方法都会为httpd.conf文件创建不同的路径?

Because different distributions have different guidelines for filesystem layout. 因为不同的发行版具有不同的文件系统布局准则。 RedHat packages follow RedHat guidelines, Debian packages follow Debian guidelines. RedHat软件包遵循RedHat准则,Debian软件包遵循Debian准则。

Source packages follow some "generic" guidelines. 源代码包遵循一些“通用”准则。

3) Are we doing source installations for specific requirements? 3)我们是否针对特定要求进行源代码安装?

That may be one reason for doing so. 这可能是这样做的原因之一。 See point 1. 见第1点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM