centos6.8 on PHP5.3 upgrade to PHP5.4 and later methods

Source: Internet
Author: User
Tags fpm install php


Execute command download, install Yum Source, currently for CENTOS6 and 64-bit version of the source:

[Email protected]_249 YUM.REPOS.D] # RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [Email protected]_249 YUM.REPOS.D] # RPM-IVH http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

The enabled option under Edit [Remi.repo] is set from 0 to 1

[Email protected]_249 YUM.REPOS.D] #

Run the following command

[Email protected]_249 YUM.REPOS.D] # Yum Clean All [Email protected]_249 YUM.REPOS.D] #

Installing php5.4

[Email protected]_249 YUM.REPOS.D] # Yum Install php54 php54-php-devel php54-php-mysql* php54-php-gd php54-php-fpm php54-php-mbstring

If you install php5.5

[Email protected]_249 YUM.REPOS.D] # Yum Install php55 php55-php-devel php55-php-mysql* php55-php-gd php55-php-fpm php55-php-mbstring

can now be installed to php7.0
View all supported versions

[Email protected]_249 YUM.REPOS.D] # Yum list php* |grep php-develphp-devel.x86_64                          5.3.3-46.  El6_6          @updates      php54-php-devel.x86_64                    5.4.45-2.el6.  Remi       @remi         php-devel.x86_64                          5.6.15-1.el6.remi       remi-php56    php55- php-devel.x86_64                    5.5.30-1.el6.  Remi       Remi          php56-php-devel.x86_64                    5.6.16-0.1.rc1.el6.remi remi-test     php70- php-devel.x86_64                    7.0.0-0.25.rc8.el6.remi Remi    

Run the following command [Yum Update php*], then upgrade directly to php5.6

Installation run Yum Error Resolution:
Error:cannot retrieve Metalink for Repository:epel. Verify its path and try again

Edit [Epel.repo] BaseURL before the # number, mirrorlist before adding #

[Email protected]_249 YUM.REPOS.D] # sed ' s/#baseurl =/baseurl=/g;s/mirrorlist=/#mirrorlist =/g '/etc/yum.repos.d/epel.repo
1. Install PHP
Yum Install Php-y

2. Install the PHP component so that PHP supports MySQL and enter the command:

Yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring PHP-MCR Ypt Php-bcmath Php-mhash libmcrypt-y

3. Locate the php.ini file in the/etc directory, download it locally, and open it with notepad++.

# suppress the display of PHP version information  # close error prompt  # Close Register global variable  # Open Magic_quotes_ GPC to prevent SQL injection  # log error logs
4. Install MySQL:
MySQL MySQL-server
start MySQL:
/etc/init.d/mysqld start   recommended boot Chkconfig--level 3 mysqld on  

Beginning Port:

/sbin/iptables-i input-p TCP--dport 80-j ACCEPT Cantos 6.9 Open 80 port
/etc/rc.d/init.d/iptables Save

Vi/etc/selinux/config
#SELINUX =enforcing #注释掉
#SELINUXTYPE =targeted #注释掉
Selinux=disabled #增加

centos6.8 on PHP5.3 upgrade to PHP5.4 and later methods

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.