×

This article covers a step-by-step procedure of how you can install LAMP stack on the Debian 11 Bullseye server. In fact, LAMP is a popular opensource stack that stands for Linux Apache MySQL/MariaDB and PHP. It’s mostly used by front-end and back-end developers to test and host a website. The stack comprises of 3 components. First, we have  Apache, which is a web server. Then we have Mariadb, which is a fork of MySQL and PHP which is a server-side scripting language. All the components are absolutely free and opensource.


How to Install Apache webserver on your Linux system ?

1. To get started, log into your server instance and update the package lists with the below command:

$ sudo apt update

2. Once your packages are up to date, install the Apache webserver with the below command:

$ sudo apt install apache2 apache2-utils

3. Once installed, verify the status of apache to see if it is running, by executing the command:

$ sudo systemctl status apache2

4. If apache is not running, you can start and enable it on boot using the commands:

$ sudo systemctl start apache2
$ sudo systemctl enable apache2



This article covers steps to install PHP 8.0 in Rocky Linux. PHP is used to develop static or dynamic websites or web applications. Many popular CMS such as WordPress, Magento, and Joomla is written in PHP. Frameworks such as Laravel, Symfony, and CodeIgniter is also using PHP.

To list the available PHP version on your Linux terminal, run the command:

$ sudo dnf module list php

To verify PHP version, simply run the command:

$ php -v 

To install PHP packages and dependencies, run the command:

$ sudo apt install php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath


How to Install PHP 7.4 on Ubuntu ?

Installing PHP 7.4 on Ubuntu 19.04/18.04 is a bit different than 20.04. 1. To get started, update apt and add the required repositories:

$ sudo apt-get update
$ sudo apt -y install software-properties-common
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update

2. And begin the install.

$ sudo apt install php7.4

3. After the install is complete, you can check the version that is installed and in use.

$ php -v



This article covers how to install LAMP stack on Rocky Linux 8.4. You can now proceed to test or host your website and applications. A LAMP stack is a group of open-source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is stored in a MySQL database, and dynamic content is processed by PHP.


How to Install  and configure Apache Web Server ?

1. First, we will start by installing the Apache web server. To complete the installation, use the following command:

$ yum install httpd httpd-tools

2. Once the installation is complete, enable Apache (to start automatically upon system boot), start the web server and verify the status using the commands below:

$ systemctl enable httpd
$ systemctl start httpd
$ systemctl status httpd

3. To make your pages available to public, you will have to edit your firewall rules to allow HTTP and HTTPS requests on your web server by using the following commands:

$ firewall-cmd --permanent --zone=public --add-service=http 
$ firewall-cmd --permanent --zone=public --add-service=https 
$ firewall-cmd --reload
4. Verify that the web server is running and accessible by accessing your server’s IP address:
$ echo "Hello there, Apache webserver is now running" > /var/www/html/index.html

5. And restart tht Web Server to reflect the changes made:

$ systemctl restart httpd

From your browser,

http://IP_address


How to Install PHP on CentOS ?

1. To install PHP on your RHEL 8 use the command below:

$ yum install -y php-mysqlnd php-dom php-simplexml php-xml php-xmlreader php-curl php-exif php-ftp php-gd php-iconv  php-json php-mbstring php-posix php-sockets php-tokenizer

2. Now restart your web server so that Apache knows that it will be serving PHP requests as well:

$ systemctl restart httpd



This article covers the PHP installation on Ubuntu 20.04 system.  Basically, popular Content Management platforms such as WordPress, Drupal, and Magento are based on PHP.


To Install PHP on Ubuntu 20.04:

1. Update your server.

$ apt-get update && apt-get upgrade

2. Install PHP on Ubuntu 20.04, just run the following command.

$ apt-get install php

3. To verify if PHP is installed, run the following command.

php -v


To Install PHP 7.4 modules (extensions):

Run the command below.

apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php

To check all the PHP modules available in Ubuntu, run:

$ apt-cache search --names-only ^php


How to install PHP 8.0 on Ubuntu 20.04 or 18.04 ?

1. First, update your Ubuntu server:

$ apt-get update && apt-get upgrade

2. Add the PHP repository (by Ondřej Surý):

$ apt-get install software-properties-common
$ add-apt-repository ppa:ondrej/php

3. And finally, update your package list:

$ apt-get update

4. Install PHP 8.0 with the following command:

$ apt-get install php8.0

5. To check if PHP 8.0 is installed on your server, run the following command:

$ php -v

6. Install PHP 8.0 modules (extensions)

You may need additional packages and modules depending on your applications. The most commonly used modules can be installed with the following command:

$ apt-get install libapache2-mod-php8.0 php8.0-fpm libapache2-mod-fcgid php8.0-curl php8.0-dev php8.0-gd php8.0-mbstring php8.0-zip php8.0-mysql php8.0-xml


How to change the PHP version you're using ?

If you have multiple PHP versions installed on your Ubuntu server, you can change what version is the default one.

1. To set PHP 7.4 as the default, run:

$ update-alternatives --set php /usr/bin/php7.4

2. To set PHP 8.0 as the default, run:

$ update-alternatives --set php /usr/bin/php8.0

3. You can verify what version of PHP you’re using with the following command:

$ php -v



This article covers steps To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu Linux System. PHP stands for Hypertext Preprocessor, and it’s a script-based server-side programming language. PHP is often used to automate server tasks. It handles tasks like dynamic content, database requests, and processing and displaying data.

A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. 

This term is actually an acronym which represents the Linux operating system, with the Apache web server. 

The site data is stored in a MySQL database, and dynamic content is processed by PHP.


To Install PHP 7.2 with Apache on Ubuntu:

1. Ensure you are using the latest Ubuntu updates by entering the following command into a terminal window:

$ apt-get update && apt-get upgrade

2. To install PHP 7.2, enter the following command:

$ sudo apt-get install php libapache2-mod-php

Confirm the installation by hitting Enter. The system will download and install PHP from the software repositories. This command also installs dependencies and modules for use with Apache.

3. Verify PHP was installed, with the command:

$ php -v



This guide will help you on how to #install the LAMP stack (Linux, Apache, MariaDB, and PHP ) in your #Debian system. 

LAMP stands for Linux, Apache, MySQL, and PHP. Together, they provide a proven set of software for delivering high-performance web applications.

For a web application to work smoothly, it has to include an operating system, a web server, a database, and a programming language. 

A LAMP Stack is a set of open-source software that can be used to create websites and web applications. 

LAMP is an acronym, and these stacks typically consist of the Linux operating system, the Apache HTTP Server, the MySQL relational database management system, and the PHP programming language.

To Install #LAMP stack on Ubuntu:

1. Update your system. sudo apt-get update.

2. Install Mysql. sudo apt-get install mysql-server mysql-client libmysqlclient-dev.

3. Install #Apache server.

4. Install #PHP (php7.0 latest version of PHP).

5. Install #Phpmyadmin (for #database).




More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com