简体   繁体   中英

Installing MYSQL and PHP with Apache in Ubuntu

I found this part of bash command on a forum and confused as to why there are two parts in it.

sudo apt-get install php5 libapache2-mod-php5 -y

What is libapache2-mod-php5? If thats PHP why is php5 separately used in the expression?

Thanks for any help.

I only need help understanding the bash expression.

php5 :

This package is a metapackage that, when installed, guarantees that you have at least one of the four server-side versions of the PHP5 interpreter installed. Removing this package won't remove PHP5 from your system, however it may remove other packages that depend on this one.

libapache2-mod-php5 :

This package provides the PHP5 module for the Apache 2 webserver (as found in the apache2-mpm-prefork package). Please note that this package ONLY works with Apache's prefork MPM, as it is not compiled thread-safe. The following extensions are built in: bcmath bz2 calendar Core ctype date dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml mbstring mhash openssl pcre Phar posix Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib.

Noting in that command line indicates any reason to require the php5 meta package. It just forces you to install libapache2-mod-php5 (which you are), or one of the alternatives.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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