Wednesday, March 16, 2016

Install PHP 7 on CentOS through IUS Repository

Install PHP 7 on CentOS through IUS Repository

# cd ~ ; curl '' -o

# bash

# yum install httpd24u mod24u_ssl

# yum install php70u-bcmath php70u-cli php70u-common php70u-dba php70u-dbg php70u-devel php70u-fpm php70u-fpm-httpd php70u-gd php70u-gmp php70u-intl php70u-json php70u-mbstring php70u-mcrypt php70u-mysqlnd php70u-opcache php70u-pdo php70u-pear php70u-xml php70u-xmlrpc

Edit mpm.conf:

# vim /etc/httpd/conf.modules.d/00-mpm.conf

Comment out the following line:

LoadModule mpm_prefork_module modules/

Uncomment the following line:

LoadModule mpm_event_module modules/

Change the following line:

# vim /etc/httpd/conf/httpd.conf

<Directory "/var/www/html">
  AllowOverride All

  # New directive needed in Apache 2.4.3: 
  Require all granted

Enable and restart services:

# systemctl enable httpd.service

# systemctl restart httpd.service

# systemctl enable php-fpm.service

# systemctl restart php-fpm.service

No comments: