среда, 14 августа 2024 г.

How to Install LAMP+PHP 5.6 Stack on Ubuntu 24.04 LTS

 sudo apt update

sudo apt install apache2 -y

sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'


sudo add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.globo.tech/repo/10.11/ubuntu jammy main'

sudo apt update

sudo apt install mariadb-server mariadb-client -y

sudo mysql_secure_installation

sudo add-apt-repository ppa:ondrej/php

sudo apt update

sudo apt install php5.6 -y

sudo apt install php5.6-{mbstring,mysql,zip} -y


Optional


sudo nano /etc/apache2/sites-available/domain.com.conf


<VirtualHost *:80>

    ServerAdmin webmaster@localhost

    ServerName domain.com

    ServerAlias www.domain.com

    DocumentRoot /var/www/domain.com

    ErrorLog ${APACHE_LOG_DIR}/error.log

    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>


sudo a2ensite domain.com.conf

sudo a2dissite 000-default.conf

sudo apache2ctl configtest

sudo systemctl restart apache2


Комментариев нет:

Отправить комментарий