We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
HOWTO: Install PHP7.0 or PHP 7.2 on CentOS 7
Re: HOWTO: Install PHP7 on CentOS 7
How to install roundcube and phpmyadmin on php7+php-fpm?
Re: HOWTO: Install PHP7 on CentOS 7
Hi. Thank you for your guide.
I have that problem after install:
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
Is there any notification to get PHP 7 default on next update??
Re: HOWTO: Install PHP7 on CentOS 7
i follow and works fine thanks. but. now i need same instructions for nginx + apache plz.
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: HOWTO: Install PHP7 on CentOS 7
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.
https://vpsguide.net/tutorials/vps-tuto ... -centos-7/
Hope someone will compare these two methods and tell us which is better?
Thank you.
-
- Posts: 7
- Joined: Sat Mar 10, 2018 1:32 pm
- Os: CentOS 5x
- Web: apache + nginx
Re: HOWTO: Install PHP7 on CentOS 7
After two weeks I found your answer and that was the only correct answer for default vestacp installation. With my thanks.KuJoe wrote: ↑Sun Aug 06, 2017 12:55 pmFor those interested in getting RoundCube working with PHP 7 in CentOS 7 here you go:
Remove all traces of PHP 5.x (including RoundCube):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 remove php
Now download the latest version of the RoundCube RPM (as of this post):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 install RoundCube: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
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
rpm -i --nodeps roundcubemail-1.3.0-2.el7.remi.noarch.rpm
Now just restart Apache and nginx (not sure if both are needed but it can't hurt):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/*
And RoundCube is working again. Enjoy! :DCode: Select all
service httpd restart;service nginx restart
Re: HOWTO: Install PHP7 on CentOS 7
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?juslintek wrote: ↑Wed Sep 20, 2017 11:32 pmDo 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.abst wrote:How update php 7 to 7.1/7.2 after using this manual for uprate from 5.6 to php 7?
Update:
Noticed that php7*w packages work better then without w.
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
This will install PHP 7.2. It will replace old PHP versions.
If you have REMI Repository you can skip this step.
Then enable Remi
Now remove old PHP and install PHP7
Remove and re-link new PHP 7.2
Test if we have PHP 7.2
Output should be (take note of PHP 7.2!!)
Now open up new PHP-FPM.conf ( /etc/opt/remi/php72/php-fpm.conf ) file and change line 11 to:
Start PHP-FPM
Remove old systemctl php-fpm and link to new one
Reload systemctl daemon
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
Code: Select all
yum --enablerepo=remi update remi-release
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
Code: Select all
rm -f /usr/bin/php
ln -s /usr/bin/php72 /usr/bin/php
Code: Select all
php -v
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
Code: Select all
include=/etc/php-fpm.d/*.conf
Code: Select all
service php72-php-fpm start
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
Code: Select all
systemctl daemon-reload
Re: HOWTO: Install PHP7 on CentOS 7
Thanks! SS88, very detailed description on the operation.SS88 wrote: ↑Fri Mar 16, 2018 2:06 pmThis will install PHP 7.2. It will replace old PHP versions.
......
Remove old systemctl php-fpm and link to new one
Reload systemctl daemonCode: 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
Code: Select all
systemctl daemon-reload
Mine is on CentOS v6.9, and misses systemctl:(
That's why I try to figure out if I could take a shortcut to get a remi
viewtopic.php?f=10&t=16403
Actually, my installation is nginx+php-fpm, mysql, ... no mail, no DNS, no remi, almost a bare one.
Re: HOWTO: Install PHP7 on CentOS 7
Hello. Thanks for the guide but I'm having some issues. I did all the steps and basically the problem is when I run 'php -v', I get PHP 7.2.X, but my actual websites are still running PHP 5.6 (I'm checking via phpinfo).
To go further, I followed the guide without issue up until where you say to "Start PHP-FPM". But this is what I get when I attempt that:
Code: Select all
[root@server01]# service php72-php-fpm start
Redirecting to /bin/systemctl start php72-php-fpm.service
Job for php72-php-fpm.service failed because the control process exited with error code. See "systemctl status php72-php-fpm.service" and "journalctl -xe" for details.
[root@server01]#
[root@server01]#
[root@server01]# systemctl status php72-php-fpm.service
● php72-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php72-php-fpm.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2018-03-17 04:02:13 UTC; 8s ago
Process: 9138 ExecStart=/opt/remi/php72/root/usr/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 9138 (code=exited, status=78)
Mar 17 04:02:13 server01 systemd[1]: Starting The PHP FastCGI Process Manager...
Mar 17 04:02:13 server01 php-fpm[9138]: [17-Mar-2018 04:02:13] ERROR: Unable to globalize '/etc/php-fpm.d/*.conf' (ret=2) from /etc/opt/remi/php72/php-fpm.conf at line 11.
Mar 17 04:02:13 server01 php-fpm[9138]: [17-Mar-2018 04:02:13] ERROR: failed to load configuration file '/etc/opt/remi/php72/php-fpm.conf'
Mar 17 04:02:13 server01 php-fpm[9138]: [17-Mar-2018 04:02:13] ERROR: FPM initialization failed
Mar 17 04:02:13 server01 systemd[1]: php72-php-fpm.service: main process exited, code=exited, status=78/n/a
Mar 17 04:02:13 server01 systemd[1]: Failed to start The PHP FastCGI Process Manager.
Mar 17 04:02:13 server01 systemd[1]: Unit php72-php-fpm.service entered failed state.
Mar 17 04:02:13 server01 systemd[1]: php72-php-fpm.service failed.