Skip to content

CentOS 7.x 1804 with php72

# Assuming you have your linux CentOS 7-1804 environment correctly installed with networking enabled.

sudo yum update;sudo yum upgrade
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum update
sudo yum -y groupinstall "development tools"
sudo yum install vim
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum update
sudo yum -y install php72-php
sudo yum -y install php72 php-opcache
sudo yum -y install php72-php-mysqlnd
sudo yum -y install php72-php-mbstring
sudo yum -y install vim mlocate ntp ntpdate

# installing Apache Server 2.4.x, you can also try nginx if you like

sudo yum -y install httpd

# the below instructions are meant to install MariaDB

sudo touch /etc/yum.repos.d/mariadb.repo
--paste the next 7 lines of stuff into this repo files and save--

# MariaDB 10.2 CentOS repository list - created 2018-05-12 04:10 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

# We've chosen to install MariaDB instead of Mysql from Mysql Repo
# you can Choose to install Mysql-server, which is also easy to install
# grab that mysql-server repo and follow some simple instructions online then you
# are Golden.
# for MariaDB-server 10.2

sudo yum update
sudo yum install mariadb-server mariadb-client
sudo mysql_secure_installation

 

# there might need to be two additional items inorder to get php72 to function in your centOS server.

  1. Disable SElinux: sudo vim /etc/sysconfig/selinux
  2. turn off firewalld: sudo service firewalld stop

Leave a Reply

Your email address will not be published. Required fields are marked *