CentOS 7 Install LAMP Stack

First, make sure everything is updated:

ROOT
yum update

Install Apache

ROOT
yum install httpd

Start Apache

ROOT
systemctl start httpd.service

Start Apache on boot

ROOT
systemctl enable httpd.service

Install MariaDB (community fork of MySQL)

ROOT
yum install mariadb-server mariadb

Start the service

ROOT
systemctl start mariadb

Start on boot

ROOT
systemctl enable mariadb.service

And finish setting up MariaDB/MySQL

ROOT
mysql_secure_installation

Install PHP

ROOT
yum install php php-mysql

Restart apache

ROOT
systemctl restart httpd.service

Optional: Install other PHP modules

Search for PHP modules

ROOT
yum search php-

Install the PHP modules

ROOT
yum install the name of the package you want to use

technology/linux/centos7_install_lamp_stack.txt · Last modified: 2017/04/03 14:52 by travis
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0