LetHostTalk
How to Install LAMP Stack Linux on Ubuntu 24.04 — LetsHostTalk - Web Hosting Forum
HostNamaste.com

How to Install LAMP Stack Linux on Ubuntu 24.04

MivocloudMivocloud Member, Provider
The LAMP Stack (Linux, Apache, MySQL/MariaDB, and PHP) is a bundle of open-source technologies for building websites and web applications. Each component of LAMP Stack is free, and you can install it for both development and production environments.

So here i will give u commands to install it, also you can watch video on youtube channel.

Commands Used:
sudo apt update sudo apt upgrade -y
sudo apt install apache2
sudo systemctl is-enabled apache2
sudo systemctl status apache2
sudo ufw allow 'Apache Full'
sudo ufw status
sudo apt install mariadb-server
sudo systemctl is-enabled mariadb
sudo systemctl status mariadb
sudo mariadb-secure-installation
sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-json php-intl php-bcmath php-opcache php-apcu php-mbstring php-fileinfo php-xml php-soap php-tokenizer php-zip

sudo nano /etc/php/8.3/apache2/php.ini
sudo systemctl restart apache2
echo "?php phpinfo(); ?" /var/www/html/info.php
mkdir -p /var/www/mysite/public_html
echo "Welcome to mysite.com" /var/www/mysite/public_html/index.html
sudo chown -R www-data:www-data /var/www/mysite

sudo nano /etc/apache2/sites-available/mysite.conf

VirtualHost *:80

ServerAdmin [email protected]

ServerName mysite.com
ServerAlias www.mysite.com

DocumentRoot /var/www/mysite/public_html

ErrorLog ${APACHE_LOG_DIR}/mysite-error.log

CustomLog ${APACHE_LOG_DIR}/mysite-access.log combined

/VirtualHost

sudo a2ensite mysite.conf
sudo apachectl configtest
sudo systemctl restart apache2

█ Anatolie C. - Sales Officer
█ MivoCloud owns its Data Centers in Moldova and Romania.
█ Enterprise Class Cloud Hosting Services. Reseller KVM SSD VPS.
█ USA (Oregon), Moldova, Romania, Russia (Moscow)
Sign In or Register to comment.
                                                               KVM VPS