install/unix/debian.xml
f8682cd86a71640bf8771186d1d40881c7a0295e
...
...
@@ -17,31 +17,31 @@
17
17
<para>
18
18
While the instructions for building PHP on Unix apply to Debian as well,
19
19
this manual page contains specific information for other options, such as
20
-
using either the <literal>apt-get</literal> or <literal>aptitude</literal>
20
+
using either the <literal>apt</literal> or <literal>aptitude</literal>
21
21
commands. This manual page uses these two commands interchangeably.
22
22
</para>
23
23
<sect2 xml:id="install.unix.debian.apt">
24
24
<title>Using APT</title>
25
25
<simpara>
26
26
First, note that other related packages may be desired like
27
-
<literal>libapache2-mod-php5</literal> to integrate with Apache 2, and
27
+
<literal>libapache-mod-php</literal> to integrate with Apache 2, and
28
28
<literal>php-pear</literal> for PEAR.
29
29
</simpara>
30
30
<simpara>
31
31
Second, before installing a package, it's wise to ensure the package list
32
32
is up to date. Typically, this is done by running the command
33
-
<command>apt-get update</command>.
33
+
<command>apt update</command>.
34
34
</simpara>
35
35
<example xml:id="install.unix.debian.apt.example">
36
36
<title>Debian Install Example with Apache 2</title>
37
37
<programlisting role="shell">
38
38
<![CDATA[
39
-
# apt-get install php5-common libapache2-mod-php5 php5-cli
39
+
# apt install php-common libapache2-mod-php php-cli
40
40
]]>
41
41
</programlisting>
42
42
</example>
43
43
<simpara>
44
-
APT will automatically install the PHP 5 module for Apache 2 and all of its
44
+
APT will automatically install the PHP module for Apache 2 and all of its
45
45
dependencies, and then activate it. Apache should be restarted in order for
46
46
the changes take place. For example:
47
47
</simpara>
...
...
@@ -63,22 +63,22 @@
63
63
<link linkend="book.mysql">MySQL</link>,
64
64
<link linkend="book.curl">cURL</link>,
65
65
<link linkend="book.image">GD</link>,
66
-
etc. These may also be installed via the <literal>apt-get</literal> command.
66
+
etc. These may also be installed via the <literal>apt</literal> command.
67
67
</simpara>
68
68
<example xml:id="install.unix.debian.config.example">
69
-
<title>Methods for listing additional PHP 5 packages</title>
69
+
<title>Methods for listing additional PHP packages</title>
70
70
<programlisting role="shell">
71
71
<![CDATA[
72
-
# apt-cache search php5
73
-
# aptitude search php5
74
-
# aptitude search php5 |grep -i mysql
72
+
# apt-cache search php
73
+
# apt search php | grep -i mysql
74
+
# aptitude search php
75
75
]]>
76
76
</programlisting>
77
77
</example>
78
78
<simpara>
79
79
The examples will show a lot of packages including several PHP specific ones
80
-
like php5-cgi, php5-cli and php5-dev. Determine which are needed
81
-
and install them like any other with either <literal>apt-get</literal>
80
+
like php-cgi, php-cli and php-dev. Determine which are needed
81
+
and install them like any other with either <literal>apt</literal>
82
82
or <literal>aptitude</literal>. And because Debian performs
83
83
dependency checks, it'll prompt for those so for example to install
84
84
MySQL and cURL:
...
...
@@ -87,15 +87,15 @@
87
87
<title>Install PHP with MySQL, cURL</title>
88
88
<programlisting role="shell">
89
89
<![CDATA[
90
-
# apt-get install php5-mysql php5-curl
90
+
# apt install php-mysql php-curl
91
91
]]>
92
92
</programlisting>
93
93
</example>
94
94
<simpara>
95
95
APT will automatically add the appropriate lines to the
96
96
different &php.ini; related files like
97
-
<filename>/etc/php5/apache2/php.ini</filename>,
98
-
<filename>/etc/php5/conf.d/pdo.ini</filename>, etc. and depending on
97
+
<filename>/etc/php/7.4/php.ini</filename>,
98
+
<filename>/etc/php/7.4/conf.d/*.ini</filename>, etc. and depending on
99
99
the extension will add entries similar to <literal>extension=foo.so</literal>.
100
100
However, restarting the web server (like Apache) is required before these
101
101
changes take affect.
...
...
@@ -122,7 +122,7 @@
122
122
<listitem>
123
123
<simpara>
124
124
There are two basic commands for installing packages on Debian (and other
125
-
linux variants): <literal>apt-get</literal> and <literal>aptitude</literal>.
125
+
linux variants): <literal>apt</literal> and <literal>aptitude</literal>.
126
126
However, explaining the subtle differences between these commands goes
127
127
beyond the scope of this manual.
128
128
</simpara>
129
129