Install PHP, MySQL and Apache on CentOS 7 (LAMP) in 3 simple steps

Review Overview

- 0/100

Total

0/100

Introduction

Step 01: Install Apache
sudo yum install httpd
sudo systemctl start httpd.service

Check: http://SERVER_IP_ADDRESS/ (Featured Image)
Find Server IP address
ip addr show eth0 | grep inet | awk ‘{ print $2; }’ | sed ‘s/\/.*$//’

Step 2: Install MySQL (MariaDB)
2016-03-05_1717_centos7_mariadb
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
sudo systemctl enable mariadb.service

Step 3: Install PHP
2016-03-05_1720_centos7_php
sudo yum install php php-mysql
sudo systemctl restart httpd.service

* Install PHP Modules
yum search php~
yum info [package name] #  php-fpm: PHP FastCGI Process Manager
yum info php-fpm
sudo yum install php-fpm

* Config Firewall
sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –permanent –zone=public –add-service=https
sudo firewall-cmd –reload

* Test PHP
git clone https://lecaoquochung@github.com/lecaoquochung/php.git

2016-03-05_1754_centos7_phpinfo

Next: CentOS7 & PHP7

Shares

About ddnbgroup

You Might Also Like