Welcome, to start with this quick guide on how to install LAMP, we will use the following commands in your SSH terminal as putty, once logged into the terminal we will enter the following commands below:

 

  • dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  • dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
  • dnf module list php
  • dnf module enable php:remi-7.4
  • dnf install php php-{cli,common,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip}
  • dnf install tar unzip git redis nano wget

 

Copy all the following text, then paste and enter.

 

sudo tee /etc/yum.repos.d/mariadb.repo<<EOF
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

 

Continue with the following commands

 

  • sudo yum makecache
  • dnf install httpd mariadb-server php php-cli php-json php-mbstring php-pdo php-pecl-zip php-mysqlnd -y
  • systemctl start mariadb
  • systemctl enable mariadb
  • mysql_secure_installation

 

After the command "mysql_secure_installation" it will ask you to change the mysql password, enter a password and press "Enter", then you will also get 4 more options which we only write "Y" and then enter, once finished we verify our installation with the following commands :

 

  • php -v
  • mysql -v
  • httpd -v

 

 

Was this answer helpful? 24 Users Found This Useful (170 Votes)