Heim  >  Artikel  >  Backend-Entwicklung  >  linux - 编译安装php5.6时,./configure时,参数--mysql是干嘛的,一定要吗

linux - 编译安装php5.6时,./configure时,参数--mysql是干嘛的,一定要吗

WBOY
WBOYOriginal
2016-08-04 09:21:311061Durchsuche

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --enable-pcntl --enable-mysqlnd --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-zip --enable-ftp --enable-soap --enable-xml --enable-mbstring --disable-rpath --disable-debug --disable-fileinfo --with-mysql --with-mysqli --with-pdo-mysql --with-pcre-regex --with-iconv --with-zlib --with-mcrypt --with-gd --with-openssl --with-mhash --with-xmlrpc --with-curl --with-imap-ssl

这是命令,网上说这个参数是mysql的安装目录,难道一定要先装mysql吗

回复内容:

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --enable-pcntl --enable-mysqlnd --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-zip --enable-ftp --enable-soap --enable-xml --enable-mbstring --disable-rpath --disable-debug --disable-fileinfo --with-mysql --with-mysqli --with-pdo-mysql --with-pcre-regex --with-iconv --with-zlib --with-mcrypt --with-gd --with-openssl --with-mhash --with-xmlrpc --with-curl --with-imap-ssl

这是命令,网上说这个参数是mysql的安装目录,难道一定要先装mysql吗

该参数是一个已经不推荐的参数,应当抛弃,后续版本将会移除该编译选项。

请使用 --with-pdo --with-pdo-mysql --with-mysqlnd 替代。

哦,再补充,这个参数是用于提供 MySQL 数据库操作的扩展,没有这些就无法连接 MySQL 数据库,鉴于你问出这种问题,一般都是需要用来做网站的,肯定要开启。

不需要安装 MySQL ,但需要安装 MySQL 的库!编译需要依赖其头文件和一些链接库。

可以选择不安装,但是如果需要使用mysql链接的时候则需后续配置

如何你不考虑是用mysql可以不安装,先安装php,在配置mysql会比较麻烦

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