Installing PHP 8.2 Offline on Ubuntu 20.04: Dependencies
Introduction
PHP (Hypertext Preprocessor) is a popular server-side scripting language used for web development. As of the time of writing, PHP 8.2 is the latest stable version. This article focuses on installing PHP 8.2 offline on an Ubuntu 20.04 (Focal Fossa) system by downloading the required dependencies.
Downloading PHP 8.2 Dependencies
Before installing PHP 8.2, it is essential to download its dependencies. We found a comprehensive guide on OSTechNix that provides the necessary commands to download the dependencies.
The following commands download the PHP 8.2 dependencies:
sudo apt-get update
sudo apt-get install -y dirmngr gnupg apt-transport-https lsb-release ca-certificates wget
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt-get update
Explanation of the Commands
The commands perform the following actions:
sudo apt-get update: This command updates the package lists for upgrades and new package installations.sudo apt-get install -y dirmngr gnupg apt-transport-https lsb-release ca-certificates wget: This command installs the required packages for downloading and installing PHP 8.2.wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -: This command adds the PHP package repository key to the system.echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list: This command adds the PHP package repository to the system.sudo apt-get update: This command updates the package lists again to include the newly added PHP package repository.
Conclusion
Downloading the PHP 8.2 dependencies is an essential step in installing PHP 8.2 offline on an Ubuntu 20.04 system. By following the commands provided in this article, you can download the necessary dependencies and proceed with the installation.
References
- Type: Online resources