Herr Bischoff


FreeBSD 13: PHP Default Install Like Debian 11

Occasionally I need to install PHP on FreeBSD servers I manage. FreeBSD splits the modules in a sane manner, close to the source distribution. This however conflicts with many installation instructions for software that all too often exclusively expects Linux as a host system. The following is a copy-paste one-liner to achieve the same on FreeBSD that apt install php7.4 on Debian 11 does.

Also, bonus lines for PHP 8.0 and 8.1, which are not part of Debian 11.

pkg install php74 php74-calendar php74-ctype php74-exif php74-ffi php74-fileinfo php74-filter php74-ftp php74-gettext php74-iconv php74-json php74-opcache php74-openssl php74-pcntl php74-pdo php74-pear-pdepend_staticReflection php74-phar php74-posix php74-readline php74-session php74-shmop php74-sockets php74-sodium php74-sysvmsg php74-sysvsem php74-sysvshm php74-tokenizer php74-xml php74-zlib
pkg install php80 php80-calendar php80-ctype php80-exif php80-ffi php80-fileinfo php80-filter php80-ftp php80-gettext php80-iconv php80-opcache php80-openssl php80-pcntl php80-pdo php80-pear-pdepend_staticReflection php80-phar php80-posix php80-readline php80-session php80-shmop php80-sockets php80-sodium php80-sysvmsg php80-sysvsem php80-sysvshm php80-tokenizer php80-xml php80-zlib
pkg install php81 php81-calendar php81-ctype php81-exif php81-ffi php81-fileinfo php81-filter php81-ftp php81-gettext php81-iconv php81-opcache php81-pcntl php81-pdo php81-pear-pdepend_staticReflection php81-phar php81-posix php81-readline php81-session php81-shmop php81-sockets php81-sodium php81-sysvmsg php81-sysvsem php81-sysvshm php81-tokenizer php81-xml php81-zlib