A photo of Mitesh Shah

Mitesh Shah

Linux Enthusiast
System Administrator

Email Skype Github Twitter Google+ Resume Hire Me Keybase LinkedIn Stackoverflow


Overview

How to Install Linux Apache MySQL PHP (LAMP) Stack on CentOS7

System Update

# Update system packages
$ sudo yum update

Setup/Install Repository

# If you want to use MySQL over MariaDB
# $ sudo yum install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

# PHP5.6 Repository
$  sudo yum install https://rhel7.iuscommunity.org/ius-release.rpm

Install Apache

# Install Apache
$ sudo yum install httpd

# Start the Apache/Httpd service
$ sudo systemctl start httpd.service

# Enable Apache/Httpd service at boot time
$ sudo systemctl enable httpd.service

Install MySQL/MariaDB

# Install MariaDB
$ sudo yum install mariadb-server

# Start the MariaDB Database
$ sudo systemctl start mariadb.service

# Enable MariaDB service at boot time
$ sudo systemctl enable mariadb.service

# Secure MariaDB
$ mysql_secure_installation

Install PHP5.6

# Install PHP5.6
$ sudo yum install php56u php56u-fpm php56u-mysql php56u-gd php56u-common php56u-xmlrpc php56u-pear php56u-xml

# Restart Apache/Httpd service
$ sudo systemctl restart httpd.service




Post Navigation