Home Backend Development PHP Tutorial [PHP] Detailed explanation of Alibaba Cloud upgrading PHP to 5.5

[PHP] Detailed explanation of Alibaba Cloud upgrading PHP to 5.5

Aug 08, 2016 am 09:28 AM
memcached php root

Purpose

Use the new version of PHP to improve code execution efficiency

Difference from the offline environment

The database uses RDS service, there is no need to install MYSQL locally

To use the cache service, you need to install the official memcached extension

Required to install Extensions

memcached,yar,memcached,apc,mycrypt

Install

Upgrade php

[root@iZ28vpjayxiZ ~]# yum remove php  php-bcmath php-cli php-common  php-devel php-fpm    php-gd php-imap  php-ldap php-mbstring php-mcrypt php-mysql   php-odbc   php-pdo   php-pear  php-pecl-igbinary  php-xml php-xmlrpc
Copy after login

[root@iZ28vpjayxiZ ~]# rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
Copy after login

[root@iZ28vpjayxiZ ~]# yum install php55w  php55w-bcmath php55w-cli php55w-common  php55w-devel php55w-fpm    php55w-gd php55w-imap  php55w-ldap php55w-mbstring php55w-mcrypt php55w-mysql   php55w-odbc   php55w-pdo   php55w-pear  php55w-pecl-igbinary  php55w-xml php55w-xmlrpc php55w-opcache php55w-intl php55w-pecl-memcache
Copy after login

[root@iZ28vpjayxiZ ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Copy after login

Install extensions

MemcacheSASL

[root@iZ28vpjayxiZ html]# yum  install gcc+ gcc-c++
Loaded plugins: security
Setting up Install Process
No package gcc+ available.
Package gcc-c++-4.4.7-11.el6.x86_64 already installed and latest version
Nothing to do

[root@iZ28vpjayxiZ html]# yum install cyrus-sasl-plain cyrus-sasl  cyrus-sasl-devel  cyrus-sasl-lib

[root@iZ28vpjayxiZ ~]# wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz

[root@iZ28vpjayxiZ ~]# tar zxvf libmemcached-1.0.16.tar.gz

[root@iZ28vpjayxiZ ~]# cd libmemcached-1.0.16

[root@iZ28vpjayxiZ libmemcached-1.0.16]# ./configure --prefix=/usr/local/libmemcached --enable-sasl

   * CPP Flags:                  -fvisibility=hidden
   * LIB Flags:
   * Assertions enabled:        no
   * Debug enabled:             no
   * Shared:                    yes
   * Warnings as failure:       no
   * SASL support:              yes
   * make -j:                   2
   * VCS checkout:              no

[root@iZ28vpjayxiZ libmemcached-1.0.16]# make && make install

[root@iZ28vpjayxiZ libmemcached-1.0.16]# cd ../
[root@iZ28vpjayxiZ ~]# yum install zlib-devel
Loaded plugins: security
Setting up Install Process
Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version
Nothing to do

[root@iZ28vpjayxiZ ~]# wget http://pecl.php.net/get/memcached-2.1.0.tgz
[root@iZ28vpjayxiZ ~]# tar zxvf memcached-2.1.0.tgz
[root@iZ28vpjayxiZ ~]# cd memcached-2.1.0
[root@iZ28vpjayxiZ memcached-2.1.0]# phpize
[root@iZ28vpjayxiZ memcached-2.1.0]# ./configure --with-libmemcached-dir=/usr/local/libmemcached --enable-memcached-sasl
[root@iZ28vpjayxiZ memcached-2.1.0]# make && make install

最后修改php.ini文件(locate找该文件,yum安装的一般在/etc/php.ini 如果系统中有两套PHP环境,需找到使用OCS的PHP环境路径,对应修改之),增加extension=memcached.so 
             memcached.use_sasl = 1
执行php –m |grep memcached 如显结果有 memcache 表示环境已支持memcache
Copy after login

yar

[root@iZ28vpjayxiZ ~]# pecl install channel://pecl.php.net/msgpack-0.5.5
#修改php.ini 增加 extension=msgpack.so

[root@iZ28vpjayxiZ ~]# pecl install yar
yes
#修改php.ini 增加 extension=yar.so
#由于yar需要json支持,所以需要先加载json.so
Copy after login

The above introduces [PHP] Alibaba Cloud’s detailed explanation of upgrading PHP to 5.5, including all aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

See all articles