mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Clarified installation/enabling procedure. Also moved installation
instructions to the installation section from the requirements section. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@345449 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
2a1213d21c
commit
32d04aee92
1 changed files with 49 additions and 15 deletions
|
@ -7,32 +7,66 @@
|
|||
<section xml:id="mysql-xdevapi.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
For compiling this extension Boost, OpenSSL, and Protobuf
|
||||
libraries are required as dependencies.
|
||||
This extension requires a MySQL 8+ server with the X plugin
|
||||
enabled (default).
|
||||
</para>
|
||||
<para>
|
||||
An example installation on Ubuntu 16.04:
|
||||
Prerequisite libraries for compiling this extension are:
|
||||
Boost, OpenSSL, and Protobuf.
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
$ apt install build-essential libprotobuf-dev libboost-dev openssl protobuf-compiler
|
||||
|
||||
$ add-apt-repository ppa:ondrej/php
|
||||
$ apt install php7.1-cli php7.1-dev php7.1-mysql php7.1-pdo php7.1-xml
|
||||
|
||||
$ pecl install mysql_xdevapi
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This extension requires a MySQL 8+ server with the X plugin enabled (default).
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="mysql-xdevapi.installation">
|
||||
&reftitle.install;
|
||||
|
||||
<para>
|
||||
&pecl.moved;
|
||||
</para>
|
||||
|
||||
<para>
|
||||
An example installation procedure on Ubuntu 18.04 with PHP 7.2:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
// Dependencies
|
||||
$ apt install build-essential libprotobuf-dev libboost-dev openssl protobuf-compiler
|
||||
|
||||
// PHP with the desired extensions; php7.2-dev is required to compile
|
||||
$ apt install php7.2-cli php7.2-dev php7.2-mysql php7.2-pdo php7.2-xml
|
||||
|
||||
// Compile the extension
|
||||
$ pecl install mysql_xdevapi
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
The <literal>pecl install</literal> command does not enable PHP extensions (by default)
|
||||
and enabling PHP extensions can be done in several ways.
|
||||
Another PHP 7.2 on Ubuntu 18.04 example:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
// Create its own ini file
|
||||
$ echo "extension=mysql_xdevapi.so" > /etc/php/7.2/mods-available/mysql_xdevapi.ini
|
||||
|
||||
// Use the 'phpenmod' command (note: it's Debian/Ubuntu specific)
|
||||
$ phpenmod -v 7.2 -s ALL mysql_xdevapi
|
||||
|
||||
// A 'phpenmod' alternative is to manually symlink it
|
||||
// $ ln -s /etc/php/7.2/mods-available/mysql_xdevapi.ini /etc/php/7.2/cli/conf.d/20-mysql_xdevapi.ini
|
||||
|
||||
// Let's see which MySQL extensions are enabled now
|
||||
$ php -m |grep mysql
|
||||
|
||||
mysql_xdevapi
|
||||
mysqli
|
||||
mysqlnd
|
||||
pdo_mysql
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;apc">&url.pecl.package;mysql_xdevapi</link>.
|
||||
|
|
Loading…
Reference in a new issue