I am sharing the commands for installing the PHP 5.6, Maria DB and Apache in CentOS 7 i.e. Full LAMP Setup. Execute these commands according to your need. I am using the Remi Repository.

Please note I am using Maria DB in this case soon I will also post one more blog for mysql also.

If you want to install extra php package, I have also included that kindly use these commands according to your need.

# Update Repositories
sudo yum update

# Apache Installation
sudo yum install httpd
sudo service httpd start
sudo systemctl enable httpd.service

# PHP Installation
sudo wget -q http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo wget -q https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh remi-release-7.rpm epel-release-latest-7.noarch.rpm
sudo yum-config-manager --enable remi-php56
sudo yum install php
sudo yum --enablerepo=remi,remi-php56 install php-pdo php-mysql php-mysqlnd php-pgsql php-mbstring php-mcrypt php-xml php-simplexml php-redis php-opcache php-curl

# MariaDB Installation
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
sudo systemctl enable mariadb.service

# PHPMyAdmin Installation
sudo yum --enablerepo=remi install phpmyadmin
sudo systemctl restart httpd.service


Last Modified: 2 years ago