There was a problem loading the comments.

How to install LAMP

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
  • 27/01/2023 1:00 PM

What is LAMP?

L = operating system, Linux
A = web server, Apache
M = database server, MySQL
P = programming language, PHP

 

1. First of all, make sure that your server already has CentOS 7 installed

- Once you login to the CentOS 7 please make sure the version is up to date

yum update

 

2. Install Apache

- You can easily install Apache by using the yum package by typing the command below

sudo yum install httpd -y

 

- Once installed, make sure the apache is activate by typing the command below

sudo systemctl start httpd.service

 

- To verify it you may type your IP address on your browser and you will get the result below

779ffdf73efc5671b48c95537285aa47e9bc2346b138dbedca1ac9b31a4f5ed80e8aad90cf4a0e8a?t=609d700ebe1c6dcca7198bbf791621c0

 

- The second options to verify it is to type command systemctl status httpd.service

9f1513ea4936ad9851a99f070f067d42ac9f02cdd8ffd836640e35e5308f9aa4878e81a80ebafc4a?t=08b59518cd1e19a642548f7a39619a0c

 

3. Install MYSQL (MariaDB)

- Here we will use MaridDB as our database SQL server which is open source. The command to install is as follows:

sudo yum install mariadb-server mariadb -y

 

- Now, let’s start the MariaDB service and check on the status

sudo systemctl start mariadb

sudo systemctl status mariadb

 

0c255ce505ae5308d6de594016bad32092e713df04354c951d51b1b87572e9ddc2f6b967f64a927e?t=cc10f2dbac1ac8cf209f137c5d152787

 

4. Install PHP

- First, you have to install yum-utils and enable EPEL (Extra Packages for Enterprise Linux) repository:

yum install epel-release yum-utils

 

- Install and enable remirepo:

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum-config-manager --enable remi-php73

 

- Install php with the following command

yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysqlnd

 

- Verify php version by typing command yum info php

0d17f06c1df240f11b0743856c828a4a0870e640deee352ab015f4ecd3c217b6e645bdb6a2d26c0d?t=052dacd8f20ea1b7b11134287b34ae8c

 

- Restart your Apache server to make sure it working with the new installed PHP

systemctl restart httpd.service

 

You have successfully installed LAMP to your system

 


Share via

Related Articles

Copyright © 2024 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)