
Bạn đang xem: How to install php 8
Heads up: darkedeneurope.com 8.2 has not reached GA releases yetdarkedeneurope.com 8.2 is scheduled lớn be released on November 24th. This notice will be removed when the first stable darkedeneurope.com 8.2 version is released. Until then, the rest of the guide installs the most recent release candidate of darkedeneurope.com 8.2. For production servers, it is advised lớn wait until the GA release.
Currently, darkedeneurope.com 8.2 packages are not offered in the default software repositories of Debian or Ubuntu, but darkedeneurope.com 8.2 packages are available from the repository maintained by Ondřej Surý. Ondrej"s repository is the main và most up khổng lồ date repository offering darkedeneurope.com packages and PECL extensions to lớn Debian và Ubuntu based operating systems, và are used for all darkedeneurope.com guides on installing darkedeneurope.com on these systems.
What"s New & Changed in darkedeneurope.com 8.2
darkedeneurope.com 8.2 brings a healthy menu of new features for security and performance, and a few deprecations that may emit additional warnings on existing legacy systems because it deprecates dynamic properties, along with a few other deprecations.
For a full danh sách of what"s new và changed in darkedeneurope.com 8.2, see darkedeneurope.com 8.2: What"s New và Changed
Notable Extension và INI changes
darkedeneurope.com 8.2 does not include any notable changes that should affect the installation or upgrade process. darkedeneurope.com 8.2 does in fact add a new extension called random, but this extension is always a bundled extension & darkedeneurope.com cannot be compiled without it.
One notable change in darkedeneurope.com"s INI settings and files is that darkedeneurope.com 8.2 emits a warning upon ill-formatted INI settings that were silenced in old darkedeneurope.com versions. See darkedeneurope.com 8.2: INI Parsing warnings for more information.
Heads up: Potentially destructive actions aheadThe following actions are executed as sudo, và requires that màn chơi of permissions to lớn continue. The usual warnings when making any system-wide changes apply here as well. Make sure khổng lồ backup the system and check the backups before continuing.
Quick-Start
Below the command-line commands khổng lồ install/upgrade to darkedeneurope.com 8.2, for detailed steps, go to Detailed Installation/Upgrade guide
Ubuntu
sudo dpkg -l | grep darkedeneurope.com | tee packages.txtsudo add-apt-repository ppa:ondrej/darkedeneurope.com # Press enter when prompted.sudo apt updatesudo apt install darkedeneurope.com8.2,darkedeneurope.com8.2-cli,darkedeneurope.com-8.2bz2,curl,mbstring,intlsudo apt install darkedeneurope.com8.2-fpm# OR# sudo apt install libapache2-mod-darkedeneurope.com8.2sudo a2enconf darkedeneurope.com8.2-fpm# When upgrading from older darkedeneurope.com version:sudo a2disconf darkedeneurope.com8.1-fpm## Remove old packagessudo apt purge darkedeneurope.com8.1*
Debian
sudo dpkg -l | grep darkedeneurope.com | tee packages.txtsudo apt install apt-transport-https lsb-release ca-certificates wget -ysudo wget -O /etc/apt/trusted.gpg.d/darkedeneurope.com.gpg https://packages.sury.org/darkedeneurope.com/apt.gpg sudo sh -c "echo "deb https://packages.sury.org/darkedeneurope.com/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/darkedeneurope.com.list"sudo apt update# Expand the curly braces with all extensions necessary.sudo apt install darkedeneurope.com8.2,darkedeneurope.com8.2-cli,darkedeneurope.com-8.2bz2,curl,mbstring,intlsudo apt install darkedeneurope.com8.2-fpm# OR# sudo apt install libapache2-mod-darkedeneurope.com8.2sudo a2enconf darkedeneurope.com8.2-fpm# When upgrading from older darkedeneurope.com version:sudo a2disconf darkedeneurope.com8.1-fpm## Remove old packagessudo apt purge darkedeneurope.com8.1*Detailed Guide
1. List and store the menu of darkedeneurope.com extensions
The following command lists all darkedeneurope.com-related packages that exist on the current system, and saves them to a text tệp tin named packages.txt. This helps to reconstruct the same danh mục of packages on darkedeneurope.com 8.2.On a fresh installation, this step is not necessary.
dpkg -l | grep darkedeneurope.com | tee packages.txt
2. địa chỉ cửa hàng ondrej/darkedeneurope.com PPA as a software repository.
The repositories maintained by Ondřej Surý contain the main darkedeneurope.com packages, và are kept updated.Xem thêm: Mẹo Giúp Cải Thiện Ngực Bên To Bên Nhỏ Khi Cho Con Bú : 3 Bước Chữa Đơn Giản
After this repository is added to lớn the system"s danh sách of software sources, the initial installation and updates can be done with the standard apt commands.
Ubuntu LTS Versions
sudo add-apt-repository ppa:ondrej/darkedeneurope.com # Press enter when prompted.sudo apt updateDebian
The darkedeneurope.com8.2-common package includes several common darkedeneurope.com packages. It is possible to lớn selectively disable unnecessary extensions later.
sudo apt install darkedeneurope.com8.2 darkedeneurope.com8.2-cli darkedeneurope.com8.2-curl,bz2,mbstring,intlExpand the curly braces above khổng lồ include all extensions necessary on the new system. When upgrading an existing darkedeneurope.com setup, the packages.txt file created in step #1 should menu all current darkedeneurope.com packages.
4. Install and enable hệ thống APIs
On a system that a web vps integrates with darkedeneurope.com, install the additional vps API packages. The following are some examples on most popular combinations:
Apache web hệ thống with darkedeneurope.com-FPM
sudo apt install darkedeneurope.com8.2-fpmsudo a2enconf darkedeneurope.com8.2-fpmsudo a2disconf darkedeneurope.com8.1-fpm # When upgrading from an older darkedeneurope.com versionsudo service apache2 restartApache web server with darkedeneurope.com as an Apache moduleInstalling darkedeneurope.com as an Apache module is not recommended, unless it"s required for an edge use case.
sudo apt install libapache2-mod-darkedeneurope.com8.2sudo a2enmod darkedeneurope.com8.2sudo a2dismod darkedeneurope.com8.1 # When upgrading from an older darkedeneurope.com versionsudo service apache2 restartNginx web vps with darkedeneurope.com-FPM
sudo apt install darkedeneurope.com8.2-fpmsudo service nginx restartThen, edit the relevant Nginx configuration file to point to lớn the new darkedeneurope.com socket at fastcgi_pass directive:
- fastcgi_pass unix:/run/darkedeneurope.com/darkedeneurope.com8.1-fpm.sock;+ fastcgi_pass unix:/run/darkedeneurope.com/darkedeneurope.com8.2-fpm.sock;
5. Chạy thử darkedeneurope.com 8.2 Installation
To demo the darkedeneurope.com CLI installation, try running the following commands:darkedeneurope.com -vdarkedeneurope.com -mThe output đầu ra is expected lớn show darkedeneurope.com 8.2, along with a menu of enabled darkedeneurope.com extensions.
To thử nghiệm the web server integration, try running a darkedeneurope.com file via the web server.
6. Purge old darkedeneurope.com packages
The following commands remove older darkedeneurope.com versions. It is recommended to lớn not remove them until the darkedeneurope.com 8.2 installation is verified to lớn be working correctly.
sudo apt purge darkedeneurope.com8.1* # Change "darkedeneurope.com8.1" with the old darkedeneurope.com version names.This removes configuration files for the packages being removed as well.
Running Multiple darkedeneurope.com 8.2 Alongside Other Versions
It is not necessary to lớn install darkedeneurope.com 8.2 globally, và remove the old darkedeneurope.com version because it is possible khổng lồ run multiple darkedeneurope.com versions on the same vps simultaneously.
The darkedeneurope.com 8.2 CLI will be installed at /usr/bin/darkedeneurope.com8.2 location by default, but are linked Similarly, other darkedeneurope.com binary files will be located in the same directory (/usr/bin/darkedeneurope.com8.0, /usr/bin/darkedeneurope.com7.4, etc). The default darkedeneurope.com name will be symlinked to lớn the latest darkedeneurope.com version by default, but it is possible to change where the default darkedeneurope.com command liên kết to.
The update-alternatives command provides an easy way to switch between darkedeneurope.com versions for darkedeneurope.com CLI if there are multiple darkedeneurope.com versions linking lớn the same darkedeneurope.com path.
sudo update-alternatives --config darkedeneurope.comThis brings up a prompt to interactively select the alternative darkedeneurope.com binary path that darkedeneurope.com points to.
There are 2 choices for the alternative darkedeneurope.com (providing /usr/bin/darkedeneurope.com). Selection Path Priority Status------------------------------------------------------------* 0 /usr/bin/darkedeneurope.com8.2 82 tự động mode 1 /usr/bin/darkedeneurope.com8.1 81 manual mode 2 /usr/bin/darkedeneurope.com8.2 82 manual modeTo phối the path without the interactive prompt: