Home  >  Article  >  Backend Development  >  linux - Problem with automatically installing Apache when yum installs php

linux - Problem with automatically installing Apache when yum installs php

WBOY
WBOYOriginal
2016-07-06 13:52:051588browse

Dear masters, when I was watching the tutorial on yum configuring lamp online, I found that Apache and php are installed separately. However, I found that yum will automatically install Apache when installing php. So wouldn’t this mean that Apache is installed again? ? Is it possible not to install Apache separately? Anyway, Apache will be installed when installing php, so will there be any problems with this? I'm a novice, please don't criticize me! (The system is centos7)

The following are the dependent software for yum to install php (including 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>

Reply content:

Dear masters, when I was watching the tutorial on yum configuring lamp online, I found that Apache and php are installed separately. However, I found that yum will automatically install Apache when installing php. So wouldn’t this mean that Apache is installed again? ? Is it possible not to install Apache separately? Anyway, Apache will be installed when installing php, so will there be any problems with this? I'm a novice, please don't criticize me! (The system is centos7)

The following are the dependent software for yum to install php (including 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>

If you use yum to install them all, yum will check the relationship between the projects and will not install the same software repeatedly.

You can install apache first
yum install httpd

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn