はじめに
Debian7にPHPを標準インストール
OS自体がEOLなので/etc/apt/sources.listを書き換えています。
親記事:PHP, PHP-FPMの各種インストール方法とEOLまとめ
LOG
インストール
# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"
# echo deb http://archive.debian.org/debian wheezy main > /etc/apt/sources.list
# echo deb http://archive.debian.org/debian-security wheezy/updates main >> /etc/apt/sources.list
# apt-get -o Acquire::Check-Valid-Until=false update
# apt-get update;apt-get install php5
... 略
各種確認
# which php
/usr/bin/php
# php -v
PHP 5.4.45-0+deb7u14 (cli) (built: May 9 2018 16:47:00)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
# php -i | grep php.ini
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
# dpkg -p php5
Package: php5
Priority: optional
Section: php
Installed-Size: 21
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: all
Version: 5.4.45-0+deb7u14
Depends: libapache2-mod-php5 (>= 5.4.45-0+deb7u14) | libapache2-mod-php5filter (>= 5.4.45-0+deb7u14) | php5-cgi (>= 5.4.45-0+deb7u14) | php5-fpm (>= 5.4.45-0+deb7u14), php5-common (>= 5.4.45-0+deb7u14)
Size: 1028
Description: server-side, HTML-embedded scripting language (metapackage)
This package is a metapackage that, when installed, guarantees that you
have at least one of the four server-side versions of the PHP5 interpreter
installed. Removing this package won't remove PHP5 from your system, however
it may remove other packages that depend on this one.
.
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
open source general-purpose scripting language that is especially suited
for web development and can be embedded into HTML.
Homepage: http://www.php.net/