Page 6 of 10

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Thu Aug 31, 2017 7:22 am
by abst
How update php 7 to 7.1/7.2 after using this manual for uprate from 5.6 to php 7?

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Wed Sep 20, 2017 11:32 pm
by juslintek
abst wrote:How update php 7 to 7.1/7.2 after using this manual for uprate from 5.6 to php 7?
Do the same as with php70, you can yum search php72 and it will list all the packages. Then install ones required. Finally do all the same as wtih php70, just replace php70 keyword with php72. I've got it working. But vesta still has php-fpm greyed out.

Update:

Noticed that php7*w packages work better then without w.

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Wed Nov 22, 2017 5:46 am
by usr999
How to install roundcube and phpmyadmin on php7+php-fpm?

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Thu Nov 23, 2017 11:23 am
by Pim
Hi. Thank you for your guide.

I have that problem after install:

Code: Select all

Error: php70w-common conflicts with php-common-5.6.32-1.el7.remi.x86_64

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Wed Jan 24, 2018 10:33 am
by shishupal
Is there any notification to get PHP 7 default on next update??

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Mon Feb 12, 2018 7:39 pm
by M4nDrK
i follow and works fine thanks. but. now i need same instructions for nginx + apache plz.

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Wed Mar 14, 2018 5:44 am
by baijianpeng
I read another article which provided a new way to update default PHP 5.6.x to PHP7 on CentOS 7, it also introduced some skills to optimize VestaCP as well :

https://vpsguide.net/tutorials/vps-tuto ... -centos-7/


Hope someone will compare these two methods and tell us which is better?

Thank you.

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Thu Mar 15, 2018 2:58 am
by LorenzoVonMatterhorn
KuJoe wrote:
Sun Aug 06, 2017 12:55 pm
For those interested in getting RoundCube working with PHP 7 in CentOS 7 here you go:

Remove all traces of PHP 5.x (including RoundCube):

Code: Select all

yum remove php
Now install PHP 7.0 using the code in the first post (also follow all of the steps in the first post, this is just here for completeness sake):

Code: Select all

yum -y --enablerepo=remi install php70 php70-php php70-php-pear php70-php-bcmath php70-php-pecl-jsond-devel php70-php-mysqlnd php70-php-gd php70-php-common php70-php-fpm php70-php-intl php70-php-cli php70-php php70-php-xml php70-php-opcache php70-php-pecl-apcu php70-php-pecl-jsond php70-php-pdo php70-php-gmp php70-php-process php70-php-pecl-imagick php70-php-devel php70-php-mbstring
Now download the latest version of the RoundCube RPM (as of this post):

Code: Select all

wget ftp://195.220.108.108/linux/remi/enterprise/7/test/x86_64/roundcubemail-1.3.0-2.el7.remi.noarch.rpm
Now install RoundCube:

Code: Select all

rpm -i --nodeps roundcubemail-1.3.0-2.el7.remi.noarch.rpm
Run these commands (the version in the URLs will most likely change so make sure it matches the current version of VestaCP):

Code: Select all

wget c.vestacp.com/0.9.8/rhel/httpd-webmail.conf -O /etc/httpd/conf.d/roundcubemail.conf
wget c.vestacp.com/0.9.8/rhel/roundcube-main.conf -O /etc/roundcubemail/main.inc.php
wget c.vestacp.com/0.9.8/rhel/roundcube-db.conf -O /etc/roundcubemail/db.inc.php
wget c.vestacp.com/0.9.8/rhel/roundcube-driver.php -O  /usr/share/roundcubemail/plugins/password/drivers/vesta.php
wget c.vestacp.com/0.9.8/rhel/roundcube-pw.conf -O /usr/share/roundcubemail/plugins/password/config.inc.php
chmod a+r /etc/roundcubemail/*
Now just restart Apache and nginx (not sure if both are needed but it can't hurt):

Code: Select all

service httpd restart;service nginx restart
And RoundCube is working again. Enjoy! :D
After two weeks I found your answer and that was the only correct answer for default vestacp installation. With my thanks.

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Fri Mar 16, 2018 1:48 pm
by baoang
juslintek wrote:
Wed Sep 20, 2017 11:32 pm
abst wrote:How update php 7 to 7.1/7.2 after using this manual for uprate from 5.6 to php 7?
Do the same as with php70, you can yum search php72 and it will list all the packages. Then install ones required. Finally do all the same as wtih php70, just replace php70 keyword with php72. I've got it working. But vesta still has php-fpm greyed out.

Update:

Noticed that php7*w packages work better then without w.
Vesta still has php-fpm greyed out? So that means, I guess, there are now two versions of php, the old one of php70, and the freshly installed one of php72, and the greyed php is under Vesta's control, and the newly installed php70 is not?
shishupal wrote:
Wed Jan 24, 2018 10:33 am
Is there any notification to get PHP 7 default on next update??
My current installation, nginx+php-fpm style, produces php v5.33, a bit lower than v5.6. I also hope there soon will be an update to push the old ver to the current one, so that I can install phpBB v3.2 easily.

It's not that easy to unload the shipped php-fpm v5.33 and replace it with a more freshed one, ver 7.x, although v5.6 is the minimum of phpBB v3.2 installation.

Re: HOWTO: Install PHP7 on CentOS 7

Posted: Fri Mar 16, 2018 2:06 pm
by SS88
This will install PHP 7.2. It will replace old PHP versions.

If you have REMI Repository you can skip this step.

Code: Select all

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
Then enable Remi

Code: Select all

yum --enablerepo=remi update remi-release
Now remove old PHP and install PHP7

Code: Select all

service php-fpm stop
yum -y --enablerepo=remi install php72-php php72-php-pear php72-php-bcmath php72-php-pecl-jsond-devel php72-php-mysqlnd php72-php-gd php72-php-common php72-php-fpm php72-php-intl php72-php-cli php72-php php72-php-xml php72-php-opcache php72-php-pecl-apcu php72-php-pecl-jsond php72-php-pdo php72-php-gmp php72-php-process php72-php-pecl-imagick php72-php-devel php72-php-mbstring
Remove and re-link new PHP 7.2

Code: Select all

rm -f /usr/bin/php
ln -s /usr/bin/php72 /usr/bin/php
Test if we have PHP 7.2

Code: Select all

php -v
Output should be (take note of PHP 7.2!!)

Code: Select all

[root@tiny system]# php -v
PHP 7.2.3 (cli) (built: Mar  2 2018 12:24:56) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.3, Copyright (c) 1999-2018, by Zend Technologies
Now open up new PHP-FPM.conf ( /etc/opt/remi/php72/php-fpm.conf ) file and change line 11 to:

Code: Select all

include=/etc/php-fpm.d/*.conf
Start PHP-FPM

Code: Select all

service php72-php-fpm start
Remove old systemctl php-fpm and link to new one

Code: Select all

rm -f /usr/lib/systemd/system/php-fpm.service
ln -s /usr/lib/systemd/system/php72-php-fpm.service /usr/lib/systemd/system/php-fpm.service
Reload systemctl daemon

Code: Select all

systemctl daemon-reload