linux:apps:php-update
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| linux:apps:php-update [2026/08/23 13:08] – oscar | linux:apps:php-update [2026/08/23 13:13] (current) – oscar | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| === www.conf === | === www.conf === | ||
| Save the old: / | Save the old: / | ||
| + | |||
| + | ==== Install Sury Repository ==== | ||
| + | < | ||
| + | cd /tmp | ||
| + | wget -q https:// | ||
| + | apt-get install ./ | ||
| + | . / | ||
| + | cat << EOF > / | ||
| + | Types: deb deb-src | ||
| + | URIs: https:// | ||
| + | Suites: $VERSION_CODENAME | ||
| + | Components: main | ||
| + | Signed-By: / | ||
| + | EOF | ||
| + | apt-get update | ||
| + | apt-cache policy php | ||
| + | </ | ||
| + | |||
| + | ==== Install php and packages ==== | ||
| + | < | ||
| + | apt install php8.4 php8.4-cli php8.4-cgi php8.4-fpm | ||
| + | </ | ||
| + | |||
| + | Install custom packages: | ||
| + | < | ||
| + | apt install php8.4-apcu php8.4-bcmath php8.4-bz2 php8.4-cli php8.4-common php8.4-curl | ||
| + | apt install php8.4-fpm php8.4-gd php8.4-gmp php8.4-igbinary php8.4-imagick | ||
| + | apt install php8.4-intl php8.4-mbstring php8.4-memcached php8.4-msgpack | ||
| + | apt install php8.4-mysql php8.4-opcache php8.4-readline php8.4-xml php8.4-zip | ||
| + | </ | ||
| + | |||
| + | ==== Update configuration ==== | ||
| + | Update the / | ||
| + | |||
| + | Needed for NextCloud: | ||
| + | / | ||
| + | |||
| + | env[HOSTNAME] = $HOSTNAME | ||
| + | env[PATH] = / | ||
| + | env[TMP] = /tmp | ||
| + | env[TMPDIR] = /tmp | ||
| + | env[TEMP] = /tmp | ||
| + | |||
| + | |||
| + | Configuring the Default PHP Version | ||
| + | |||
| + | After installing additional PHP versions, if you want to set the OS default PHP version back to the one for your Debian release, run these commands: | ||
| + | |||
| + | update-alternatives --config php | ||
| + | update-alternatives --config php-cgi | ||
| + | |||
| + | Update php in | ||
| + | | ||
| + | |||
| + | / | ||
| + | / | ||
| + | |||
| + | |||
| + | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| ==== Links ==== | ==== Links ==== | ||
| [[https:// | [[https:// | ||
| + | |||
linux/apps/php-update.1787490494.txt.gz · Last modified: by oscar
