linux:apps:php-update
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:apps:php-update [2026/08/23 13:06] – created oscar | linux:apps:php-update [2026/08/23 13:13] (current) – oscar | ||
|---|---|---|---|
| Line 30: | Line 30: | ||
| </ | </ | ||
| === php.ini === | === php.ini === | ||
| - | Save the old /// | + | Save the old: / |
| - | // | + | === www.conf === |
| - | Save the old /// | + | Save the old: /etc/php/8.2/ |
| + | |||
| + | ==== 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 | ||
| + | |||
| + | Needed for NextCloud: | ||
| + | /etc/php/8.4/ | ||
| + | |||
| + | env[HOSTNAME] = $HOSTNAME | ||
| + | env[PATH] = /usr/local/ | ||
| + | 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.1787490413.txt.gz · Last modified: by oscar
