It basically ensures that you are getting the php package from an authentic source. The gpg key is a resource of the gnupg2 we installed earlier. This downloads the gpg key for php and stores them in the /etc/apt//php.gpg file. You can run lsb_release -cs as a separate command in your terminal to know the short codename for the Linux distro you are using. This command basically adds the Sury php repo for your lsb_release to your machine’s apt sources list. In other words, they ensure secure access to the php repo.Īfter installing those 3 tools, run this command: echo "deb $(lsb_release -cs) main" | tee /etc/apt//sury-php.list All 3 packages are tools that help ensure you are connecting to the actual repo, not a MITM. The second command installs: apt-transport-https, gnupg2, and ca-certificates. To install PHP, run the following commands: sudo apt update -y sudo apt install apt-transport-https gnupg2 -y One thing to note here is that, when you are using Laravel 9 (the latest Laravel version), you need a PHP version of at least 8.0. PHP installation is not as straightforward as Apache installation, but it is not complicated either. If the command shows that apache2 is not running, run this command: sudo systemctl start apache2 Installing PHP ![]() -y - this option basically answers yes to any prompt that may come up during the installations.Īfter the installation is complete, run the following command to confirm the status of the Apache serve: sudo systemctl status apache2.apt install apache2 installs apache2 on your machine.apt upgrade installs updated versions of any outdated package on your machine.This command basically ensures your machine’s package sources list are up to date. You will come across the command apt update or apt-get update multiple times in this article. Installing Apache on your Debian 11 is pretty straightforward, enter the following commands: sudo apt update & sudo apt upgrade & sudo apt install apache2 -y I give some insight to every command listed, so you should get a deeper understanding. ![]() In this article, I talk about how I installed MySQL, PHP, Apache, and Composer on Debian 11. ![]() How to Install Apache, PHP, Composer, and MySQL on Debian 11 (Deploying Laravel App)
0 Comments
Leave a Reply. |