Upgrade the php version of the server

Source: Internet
Author: User
The php version of the server has just been upgraded to the php version of the company's server. there is no problem. upgrade from 5.2 to 5.6, install the yaf framework, and paste the steps to share it, the specific configuration is as follows:

### Download the remi package
Wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

### Install the remi package
Rpm-ivh remi-release-7.rpm
Rpm-ivh epel-release-7-5.noarch.rpm
Rpm-qa | grep remi-release
Rpm-qa | grep epel-release

### Use Remi repo
Vim/etc/yum. repos. d/remi. repo
[Remi]
Name = Les RPM de remi pour Enterprise Linux 6-$ basearch
# Baseurl = http://rpms.famillecollet.com/#ise/6/remi/#basearch/
Using list = http://rpms.famillecollet.com/enterprise/6/remi/mirror
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Remi-php56
Name = Les RPM de remi de phphp 5.5 pour Enterprise Linux 6-$ basearch
# Baseurl = http://rpms.famillecollet.com/#ise/6/php55/?basearch/
Using list = http://rpms.famillecollet.com/enterprise/6/php55/mirror
# WARNING: If you enable this repository, you must also enable "remi"
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-remi

# Set enabled to 1. make it take effect. Note: If you want to upgrade PHP5.4 to PHP5.5, set [remi-php55] enabled to 1


### Stop Related services
Systemctl stop nginx
Ps-ef | grep nginx
Systemctl stop php-fpm
Ps-ef | grep php-fpm


### Update
Yum update-y
Yum update php
# At this time, the system will remind you to update php to 5.6 and run the following command to check whether the upgrade has been completed.

### Check the version
Php-v


### Start the service
Systemctl start nginx
Systemctl start php-fpm


#### Install the yaf framework:

Wget https://pecl.php.net/get/yaf-2.3.5.tgz
Tar zxvf yaf-2.3.5.tgz
Cd yaf-2.3.5/
/Usr/bin/phpize
./Configure -- with-php-config =/usr/bin/php-config
Make
Make install

### Check
Php-m

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.