mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
22 lines
677 B
PHP
22 lines
677 B
PHP
<p>
|
|
On the command line, run the following commands:
|
|
</p>
|
|
<pre><code class="language-bash line-numbers">
|
|
# Add the packages.sury.org/php repository.
|
|
sudo apt update
|
|
sudo apt install -y lsb-release ca-certificates curl
|
|
sudo curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
|
sudo dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
|
sudo tee /etc/apt/sources.list.d/php.sources <<EOF
|
|
Types: deb
|
|
URIs: https://packages.sury.org/php/
|
|
Suites: $(lsb_release -sc)
|
|
Components: main
|
|
Signed-By: /usr/share/keyrings/debsuryorg-archive-keyring.gpg
|
|
EOF
|
|
sudo apt update
|
|
|
|
# Install PHP.
|
|
sudo apt install -y php<?= $version; ?>
|
|
</code></pre>
|