Install PHP 7.3 and LAMP (Apache, MySQL, PHP) packages.
Install Apache 2 server
sudo apt install apache2
Install MySQL Server
sudo apt install mysql-server
Change Mysql root password
mysql -u root
#mysql>
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
Install PHP 7.3 on Debian
1. Update system
sudo apt update
sudo apt upgrade -y
2. Add PHP 7.3 PPA repository
sudo apt install lsb-release apt-transport-https ca-certificates
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
3: Install PHP 7.3 on Debian Linux
sudo apt update
sudo apt install php7.3
4. Install Apache Module for PHP
sudo apt install libapache2-mod-php7.3
5. Install PHP 7.3 Extensions
sudo apt install php7.3-<entension-name>
Example 1.
sudo apt install php7.3-cli php7.3-fpm php7.3-json php7.3-pdo php7.3-mysql php7.3-zip php7.3-gd php7.3-mbstring php7.3-curl php7.3-xml php7.3-bcmath php7.3-json
Example 2.
sudo apt install php7.3-cgi php7.3-cli php7.3-curl php7.3-imap php7.3-gd php7.3-mysql php7.3-pgsql php7.3-sqlite3 php7.3-mbstring php7.3-json php7.3-bz2 php7.3-xmlrpc php7.3-gmp php7.3-xsl php7.3-soap php7.3-xml php7.3-zip php7.3-dba
Check version installed
php -v
Confirm one
apt policy php7.3-cli
Reset apache server
sudo /etc/init.d/apache2 restart
Notes:
You can update mysql server data from 5.x to 7/8 using 'mysql_upgrade
'
Comments