在Debian 12上安装PHP 8.2(使用操作系统默认方法)

首先
初めに
起初

在Debian 12上默认安装了PHP
原文链接:PHP、PHP-FPM的安装方法和EOL总结

日志(Note: This translation may refer to a written record or diary entry)

安装

# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

# apt update;apt install -y php
... 略

各种确认 –

# which php
/usr/bin/php

# php -v
PHP 8.2.7 (cli) (built: Jun  9 2023 19:37:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies

# php -i | grep php.ini
Configuration File (php.ini) Path => /etc/php/8.2/cli
Loaded Configuration File => /etc/php/8.2/cli/php.ini

# apt show php
Package: php
Version: 2:8.2+93
Priority: optional
Section: php
Source: php-defaults (93)
Maintainer: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
Installed-Size: 10.2 kB
Depends: php8.2
Download-Size: 3628 B
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian bookworm/main amd64 Packages
Description: server-side, HTML-embedded scripting language (default)
广告
将在 10 秒后关闭
bannerAds