Heim  >  Artikel  >  Backend-Entwicklung  >  linux - yum安装php的时候自动安装Apache的问题

linux - yum安装php的时候自动安装Apache的问题

WBOY
WBOYOriginal
2016-07-06 13:52:051552Durchsuche

各位大神,我在网上看yum配置lamp的教程时发现安装Apache和php是分别安装的,但是我发现yum安装php的时候会自动安装Apache呀,那么这样不就又重复安装Apache了吗?可不可以不单独安装Apache啊,反正安装php的时候会安装Apache,那么这样会不会有什么问题呢?我是小白,大神勿喷哦!(系统是centos7)

下面是yum安装php的依赖软件(其中就有httpd):
Dependencies Resolved

<code>======================================================================================================================================================
 Package                            Arch                          Version                                        Repository                      Size
======================================================================================================================================================
Installing:
 php                                x86_64                        5.4.16-36.1.el7_2.1                            updates                        1.4 M
Installing for dependencies:
 apr                                x86_64                        1.4.8-3.el7                                    base                           103 k
 apr-util                           x86_64                        1.5.2-6.el7                                    base                            92 k
 httpd                              x86_64                        2.4.6-40.el7.centos.1                          updates                        2.7 M
 httpd-tools                        x86_64                        2.4.6-40.el7.centos.1                          updates                         82 k
 libzip                             x86_64                        0.10.1-8.el7                                   base                            48 k
 mailcap                            noarch                        2.1.41-2.el7                                   base                            31 k
 php-cli                            x86_64                        5.4.16-36.1.el7_2.1                            updates                        2.7 M
 php-common                         x86_64                        5.4.16-36.1.el7_2.1                            updates                        563 k

Transaction Summary
======================================================================================================================================================
Install  1 Package (+8 Dependent packages)

Total download size: 7.7 M
Installed size: 27 M
Is this ok [y/d/N]: y
</code>

回复内容:

各位大神,我在网上看yum配置lamp的教程时发现安装Apache和php是分别安装的,但是我发现yum安装php的时候会自动安装Apache呀,那么这样不就又重复安装Apache了吗?可不可以不单独安装Apache啊,反正安装php的时候会安装Apache,那么这样会不会有什么问题呢?我是小白,大神勿喷哦!(系统是centos7)

下面是yum安装php的依赖软件(其中就有httpd):
Dependencies Resolved

<code>======================================================================================================================================================
 Package                            Arch                          Version                                        Repository                      Size
======================================================================================================================================================
Installing:
 php                                x86_64                        5.4.16-36.1.el7_2.1                            updates                        1.4 M
Installing for dependencies:
 apr                                x86_64                        1.4.8-3.el7                                    base                           103 k
 apr-util                           x86_64                        1.5.2-6.el7                                    base                            92 k
 httpd                              x86_64                        2.4.6-40.el7.centos.1                          updates                        2.7 M
 httpd-tools                        x86_64                        2.4.6-40.el7.centos.1                          updates                         82 k
 libzip                             x86_64                        0.10.1-8.el7                                   base                            48 k
 mailcap                            noarch                        2.1.41-2.el7                                   base                            31 k
 php-cli                            x86_64                        5.4.16-36.1.el7_2.1                            updates                        2.7 M
 php-common                         x86_64                        5.4.16-36.1.el7_2.1                            updates                        563 k

Transaction Summary
======================================================================================================================================================
Install  1 Package (+8 Dependent packages)

Total download size: 7.7 M
Installed size: 27 M
Is this ok [y/d/N]: y
</code>

如果你都用yum来安装,yum会检查项目之间的关系,不会重复安装相同的软件的。

可以先安装apache
yum install httpd

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn