1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Improve download instructions

This commit is contained in:
Shivam Mathur
2025-07-31 03:06:33 +05:30
committed by Derick Rethans
parent 26b9f84ddf
commit 22f1767110
12 changed files with 41 additions and 10 deletions

View File

@@ -2,11 +2,11 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
sudo apt-get update
sudo apt-get install -y lsb-release ca-certificates apt-transport-https 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 sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyring.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" &gt; /etc/apt/sources.list.d/php.list'
sudo apt-get update
# Add the packages.sury.org/php repository.
sudo apt update
sudo apt install -y curl
curl -sSL https://packages.sury.org/php/README.txt | sudo bash -x
# Install PHP.
sudo apt-get install -y php<?= $version; ?>
</code></pre>

View File

@@ -2,6 +2,9 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Update the package lists.
sudo apt update
# Install PHP.
sudo apt install -y php
</code></pre>

View File

@@ -2,9 +2,12 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Add the Remi's RPM repository.
sudo dnf install -y dnf-plugins-core
sudo dnf install -y https://rpms.remirepo.net/fedora/remi-release-$(rpm -E %fedora).rpm
sudo dnf module reset php -y
sudo dnf module enable php:remi-<?= $version; ?> -y
# Install PHP.
sudo dnf install -y php
</code></pre>

View File

@@ -2,5 +2,6 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Install PHP.
sudo dnf install -y php
</code></pre>

View File

@@ -2,9 +2,12 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Add the ondrej/php repository.
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y
sudo apt update
# Install PHP.
sudo apt install -y php<?= $version; ?>
</code></pre>

View File

@@ -2,6 +2,9 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Update the package lists.
sudo apt update
# Install PHP.
sudo apt install -y php
</code></pre>

View File

@@ -2,8 +2,11 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
brew tap shivammathur/php
brew install php@<?= $version; ?>
# Download and install Homebrew.
curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
# Install and link PHP.
brew install shivammathur/php/php@<?= $version; ?>
brew link --force --overwrite php@<?= $version; ?>
</code></pre>

View File

@@ -2,6 +2,10 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Download and install Homebrew.
curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
# Install and link PHP.
brew install php@<?= $version; ?>
brew link --force --overwrite php@<?= $version; ?>

View File

@@ -2,5 +2,6 @@
On the command line, run the following commands:
</p>
<pre><code class="language-bash line-numbers">
# Please refer to https://guide.macports.org/chunked/installing.macports.html for installing MacPorts.
sudo port install php<?= $versionNoDot; ?>
</code></pre>

View File

@@ -2,5 +2,9 @@
On the command line, run the following commands:
</p>
<pre><code class="language-powershell line-numbers">
# Download and install Chocolatey.
powershell -c "irm https://community.chocolatey.org/install.ps1|iex"
# Download and install PHP.
choco install php --version=<?= $version; ?> -y
</code></pre>

View File

@@ -2,5 +2,6 @@
On the command line, run the following commands:
</p>
<pre><code class="language-powershell line-numbers">
# Download and install PHP.
powershell -c "& ([ScriptBlock]::Create((irm 'https://php.net/install/windows.ps1'))) -Version <?= $version; ?>"
</code></pre>

View File

@@ -2,5 +2,10 @@
On the command line, run the following commands:
</p>
<pre><code class="language-powershell line-numbers">
scoop install php@<?= $version; ?>
# Download and install Scoop.
powershell -c "irm https://get.scoop.sh | iex"
# Download and install PHP.
scoop bucket add versions
scoop install php<?= $versionNoDot; ?>
</code></pre>