HOWTO: Install PHP7 on CentOS 7 Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby baijianpeng » Sun Oct 16, 2016 11:27 pm

This is how I installed VestaCP:

Code: Select all

# cd /tmp
# curl -O http://vestacp.com/pub/vst-install.sh
# bash vst-install.sh


And then type in :

y
(email address)
(host name)


Then everything will be installed and configured AUTOMATICALLY. I did not see any option asking me to choose which combination to install.

Will this procedure also generates "php-fpm.service"?

Thank you.

SS88
Posts: 298
Joined: Thu Nov 19, 2015 12:40 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby SS88 » Mon Oct 17, 2016 10:49 am

This line is why:

Oct 16 23:26:09 localhost.localdomain php-fpm[3593]: [16-Oct-2016 23:26:09] ERROR: failed to load configura...nf'

Take a look at the configuration file, or post it here, or pM me.

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby baijianpeng » Thu Oct 20, 2016 1:06 pm

Ok, finally, I figure it out: because I was using the "default" installing command to install VestaCP, so I got both Apache and Nginx installed. That means, my PHP 5.6 was NOT running on php-fpm mode, so I got errors when I following your steps, since you ONLY had nginx installed without Apache.

So, the correct way to apply your tutorial is: At FIRST, the server should be installed in the "Nginx only, no apache" way, then , all steps in your post will be executed smoothly!

Thank you.

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby baijianpeng » Thu Oct 20, 2016 11:31 pm

Well, since VestaCP installs both Apache and Nginx by "default" installing commands, so I wonder, if you have interest to make another tutorial about "Upgrade PHP 5 to PHP 7" for "Apache + Nginx" combination type of VestaCP installation?

I know this is kind of "off-topic", but you know, there are a lot of VestaCP users running their VestaCP in the "Apache + Nginx" way. So your new tutorial will benefit many more users.

Thank you.

Leussink
Posts: 7
Joined: Mon Dec 12, 2016 7:43 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby Leussink » Mon Dec 12, 2016 7:46 pm

I currently have the same issue with roundcube and PHP7 on CentOS 7.
Followed this guide: http://www.servermom.org/upgrade-vestac ... -7-centos/

Does anybody have any idea how to solve this?
Running 5 websites, still get my incoming mail but outcoming is not working anymore.

Who knows how to solve this?
Maybe reinstall vestacp?
My backups are all from after the installation so all have PHP7 in it.

Help me out please.

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby baijianpeng » Mon Dec 12, 2016 11:57 pm

Finally I got my issue sovled perfectly: I gave up CentOS and swtiched to Ubuntu 16.04, then install VestaCP on Ubuntu 16.04 and I got PHP7 immediately without ANY further "tricks".

Leussink
Posts: 7
Joined: Mon Dec 12, 2016 7:43 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby Leussink » Tue Dec 13, 2016 8:05 pm

Good idea! I can also move to Ubuntu. But have 5 websites running including email. When I create a backup in VestaCP with CentOS can I restore that backup in Ubuntu? Or do I need to manually move all sites/mail?

SS88
Posts: 298
Joined: Thu Nov 19, 2015 12:40 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby SS88 » Tue Dec 13, 2016 8:11 pm

Leussink wrote:Good idea! I can also move to Ubuntu. But have 5 websites running including email. When I create a backup in VestaCP with CentOS can I restore that backup in Ubuntu? Or do I need to manually move all sites/mail?


The command they use on the website/tutorial was wrong - and it was wrong on mine until I fixed it.

If you backup in Vesta it will port to another operating system ok. Just make sure both machines are running the same VestaCP version.

You'll have to reinstall PHP 5.6 which will reinstall roundcube and phpmyadmin then follow my tutorial again.

This should install everything (look out for Roundcube and phpMyAdmin before entering YES):

Code: Select all

yum install php php-common


If you want to stick with CentOS 7 and are reinstalling the operating system then may I suggest my script here which will set-up VestaCP + more: viewtopic.php?f=10&t=12802

Leussink
Posts: 7
Joined: Mon Dec 12, 2016 7:43 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby Leussink » Wed Dec 14, 2016 8:23 pm

Thank you for the suggestion @SS88.

I used the command as root what you described and this is what I got returned in console:

yum install php php-common
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
base | 3.6 kB 00:00
epel/x86_64/metalink | 25 kB 00:00
epel | 4.3 kB 00:00
extras | 3.4 kB 00:00
nginx | 2.9 kB 00:00
remi | 2.9 kB 00:00
remi-debuginfo | 2.9 kB 00:00
remi-php55 | 2.9 kB 00:00
remi-php55-debuginfo | 2.9 kB 00:00
remi-php56 | 2.9 kB 00:00
remi-php56-debuginfo | 2.9 kB 00:00
remi-safe | 2.9 kB 00:00
remi-test | 2.9 kB 00:00
remi-test-debuginfo | 2.9 kB 00:00
updates | 3.4 kB 00:00
vesta | 2.9 kB 00:00
(1/17): base/7/x86_64/group_gz | 155 kB 00:00
(2/17): epel/x86_64/group_gz | 170 kB 00:00
(3/17): epel/x86_64/updateinfo | 685 kB 00:00
(4/17): extras/7/x86_64/primary_db | 166 kB 00:00
(5/17): remi-debuginfo/x86_64/primary_db | 274 kB 00:00
(6/17): remi/primary_db | 1.6 MB 00:00
(7/17): remi-php55/primary_db | 203 kB 00:00
(8/17): remi-php55-debuginfo/x86_64/primary_db | 46 kB 00:00
(9/17): nginx/x86_64/primary_db | 18 kB 00:00
(10/17): remi-php56-debuginfo/x86_64/primary_db | 46 kB 00:00
(11/17): remi-php56/primary_db | 209 kB 00:00
(12/17): remi-test-debuginfo/x86_64/primary_db | 47 kB 00:00
(13/17): base/7/x86_64/primary_db | 5.6 MB 00:01
(14/17): remi-safe/primary_db | 584 kB 00:00
(15/17): remi-test/primary_db | 344 kB 00:00
(16/17): epel/x86_64/primary_db | 4.4 MB 00:01
(17/17): updates/7/x86_64/primary_db | 1.2 MB 00:00
Determining fastest mirrors
* epel: epel.check-update.co.uk
* remi: remi.mirror.ate.info
* remi-php55: remi.mirror.ate.info
* remi-php56: remi.mirror.ate.info
* remi-safe: remi.mirror.ate.info
* remi-test: remi.mirror.ate.info
Package php-5.6.29-1.el7.remi.x86_64 already installed and latest version
Package php-common-5.6.29-1.el7.remi.x86_64 already installed and latest version
Nothing to do

Nothing with roundcube and roundcube is not working after this.

Any idea how to get roundcube working again?

I first want to try to get my mail working again.

SS88
Posts: 298
Joined: Thu Nov 19, 2015 12:40 pm

Re: HOWTO: Install PHP7 on CentOS 7

Postby SS88 » Thu Dec 15, 2016 12:52 am

Leussink wrote:Thank you for the suggestion @SS88.

I used the command as root what you described and this is what I got returned in console:

yum install php php-common
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
base | 3.6 kB 00:00
epel/x86_64/metalink | 25 kB 00:00
epel | 4.3 kB 00:00
extras | 3.4 kB 00:00
nginx | 2.9 kB 00:00
remi | 2.9 kB 00:00
remi-debuginfo | 2.9 kB 00:00
remi-php55 | 2.9 kB 00:00
remi-php55-debuginfo | 2.9 kB 00:00
remi-php56 | 2.9 kB 00:00
remi-php56-debuginfo | 2.9 kB 00:00
remi-safe | 2.9 kB 00:00
remi-test | 2.9 kB 00:00
remi-test-debuginfo | 2.9 kB 00:00
updates | 3.4 kB 00:00
vesta | 2.9 kB 00:00
(1/17): base/7/x86_64/group_gz | 155 kB 00:00
(2/17): epel/x86_64/group_gz | 170 kB 00:00
(3/17): epel/x86_64/updateinfo | 685 kB 00:00
(4/17): extras/7/x86_64/primary_db | 166 kB 00:00
(5/17): remi-debuginfo/x86_64/primary_db | 274 kB 00:00
(6/17): remi/primary_db | 1.6 MB 00:00
(7/17): remi-php55/primary_db | 203 kB 00:00
(8/17): remi-php55-debuginfo/x86_64/primary_db | 46 kB 00:00
(9/17): nginx/x86_64/primary_db | 18 kB 00:00
(10/17): remi-php56-debuginfo/x86_64/primary_db | 46 kB 00:00
(11/17): remi-php56/primary_db | 209 kB 00:00
(12/17): remi-test-debuginfo/x86_64/primary_db | 47 kB 00:00
(13/17): base/7/x86_64/primary_db | 5.6 MB 00:01
(14/17): remi-safe/primary_db | 584 kB 00:00
(15/17): remi-test/primary_db | 344 kB 00:00
(16/17): epel/x86_64/primary_db | 4.4 MB 00:01
(17/17): updates/7/x86_64/primary_db | 1.2 MB 00:00
Determining fastest mirrors
* epel: epel.check-update.co.uk
* remi: remi.mirror.ate.info
* remi-php55: remi.mirror.ate.info
* remi-php56: remi.mirror.ate.info
* remi-safe: remi.mirror.ate.info
* remi-test: remi.mirror.ate.info
Package php-5.6.29-1.el7.remi.x86_64 already installed and latest version
Package php-common-5.6.29-1.el7.remi.x86_64 already installed and latest version
Nothing to do

Nothing with roundcube and roundcube is not working after this.

Any idea how to get roundcube working again?

I first want to try to get my mail working again.


Do you want to try:

Code: Select all

yum install roundcubemail phpmyadmin


Then make sure the following files are there (if on nginx install):

Code: Select all

/etc/nginx/conf.d/webmail.inc
/etc/nginx/conf.d/phpmyadmin.inc


Return to “Web Server”



Who is online

Users browsing this forum: Yandex [Bot] and 5 guests