Install LAMP- Apache, PHP 7.4 with Apache Handler on Debian 12

Well, it’s not perfectly a LAMP stack as MySQL and PHPMYadmin are not covered here. But for someone who needs a backward compatible php edition to work on a modern/latest os built.

Step1: Add PHP repository

We’ll use a bash script to add the repository-

#!/bin/sh
# To add this repository please do:

if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi

${SUDO} apt-get update
${SUDO} apt-get -y install lsb-release ca-certificates curl
${SUDO} curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
${SUDO} dpkg -i /tmp/debsuryorg-archive-keyring.deb
${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
${SUDO} apt-get update

Step-2: Install PHP Modules

Install a few dependencies required by this tutorial with the below-mentioned command:

sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https

Install PHP 7.4:

sudo apt install php7.4

if you want to add multiple extensions then include them in braces, I am going to install “php-mbstring, php-mysql, php-xml, and php-curl” by running the below-mentioned command:

sudo apt install php7.4-mysql php7.4-mbstring php7.4-xml php7.4-curl

Src:

How To Install PHP (8.3, 8.2, 7.4) on Ubuntu 22.04


https://packages.sury.org/php/README.txt

Share

Setup Apache, FastCGI and PHP 7.4 on Ubuntu 20

Prerequisites

Update the installed packages.

apt update

Install the Ondřej PHP repository.

apt install software-properties-commonsudo
add-apt-repository ppa:ondrej/php
apt update

Check that the repositories are correctly installed.

grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*

Step 1 – Install Apache

apt install apache2

Read more

Share

Add PHP 7.4 support on Virtualmin GPL on CentOS 7 Distribution

Install Remi Release repo and clear cache

yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm && yum clean all

Install PHP packages version 7.4 and/or 8.0

yum -y install php74-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd,opcache,bcmath,imagick,mbstring}
yum -y install php80-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd,opcache,bcmath,imagick,mbstring}

Configuring Individual Virtual Servers

You can configure the PHP version being used for a specific Virtual Server by selecting Server Configuration -> PHP Options.

The first line there specifies what PHP version will be used by default.

If you wish, you can specify a different PHP version to be used for a specific directory.

Src:
https://forum.virtualmin.com/t/php-7-4-not-showing-as-option-under-virtualmin/104088
https://stackoverflow.com/questions/64370480/linux-add-php-7-4-to-webmin-virtualmin
https://www.virtualmin.com/documentation/web/multiplephp/#Installing_PHP_74_andor_80_on_CentOS_7

 

Share

Install LAMP with PHP 7.4 on FastCGI/CGI configuration on CentOS 7

Step 1 – Setup Yum Repository

In the first step install all the required yum repositories in your system used in the remaining tutorial for various installations. You are adding REMI, EPEL, Webtatic & MySQL community server repositories in your system.

CentOS / RHEL 7

yum install epel-release
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm

Step 2 – Install PHP 7.4

Now install php 7 packages from webtatic rpm repository using following command.

yum --enablerepo=remi-php74 install php

Now install required php modules. Use following command to list available modules in yum repositories.

yum --enablerepo=remi-php74 search php

Now check all listed modules in above command and install required modules like below.

yum --enablerepo=remi-php74 install php-mysql php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

For additonal php function to install use the command syntax below-

yum --enablerepo=remi-php74 install <your-php-funciton>

Read more

Share

Install PHP 7.4 / 7.3 / 7.2 / 7.1 on Debian 10 / Debian 9

Add PHP Repository

SURY, a third-party repository which offers PHP 7.4 / 7.3 / 7.2 / 7.1 for Debian operating system.

By default, Debian 10 ships PHP v7.3. So, you can either install PHP v7.3 from Debian repository or SURY repository. Skip this section if you want to install PHP 7.3 from the Debian repository. However, if you want to install PHP 7.4 / 7.2 / 7.1 on Debian 10, you must set up SURY repository.

Update the repository cache.

sudo apt update
sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https

Import the public using the below commands.

wget https://packages.sury.org/php/apt.gpg
sudo apt-key add apt.gpg

Add the SURY repository to your system.

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list

Update the repository index.

Read more

Share

Install LAMP on CentOS 7 with PHP 5.4/7.0/7.1/7.2/7.3/7.4

Preliminary Note

In this tutorial, I use the hostname server1.example.com with the IP p 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

I will add the EPEL repo here to install latest phpMyAdmin as follows:

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
yum -y install epel-release

To edit files on the shell, I’ll install the nano editor. If you prefer vi for file editing, then skip this step.

yum -y install nano

Installing MySQL / MariaDB

MariaDB is a MySQL fork of the original MySQL developer Monty Widenius. MariaDB is compatible with MySQL and I’ve chosen to use MariaDB here instead of MySQL. Run this command to install MariaDB with yum:

yum -y install mariadb-server mariadb

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

Read more

Share