zoukankan      html  css  js  c++  java
  • CentOs5.2中PHP的升级

    最近一个项目中需要使用到PHP5.2的版本,而服务器上使用了官方的yum源进行安装,默认的版本是5.1.6,需要升级。但是因为不是一个非常 正式的服务器环境,所以想通过简单的yum update一下了事。但是很不幸,CentOS的官方默认YUM源不提供直接的升级,因为CentOS一向以稳定著称,所以在他的源里面,提供的一般都 是经过千锤百炼的版本。

    但是CentOS并不是裹足不前的,他同时提供了一个开发源,通过这个开发源,我们可以轻松的安装一些比较新潮的版本。

    在系统中添加开发源的方法比较简单,下面是具体步骤:

    1、首先创建一个单独的源文件

    # /etc/yum.repos.d/CentOS-Testing.repo

    2、在文件中添加如下信息

      # CentOS-Testing:
      # !!!! CAUTION !!!!
      # This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
      # They may or may not replace core CentOS packages, and are not guaranteed to function properly.
      # These packages build and install, but are waiting for feedback from testers as to
      # functionality and stability. Packages in this repository will come and go during the
      # development period, so it should not be left enabled or used on production systems without due
      # consideration.
      [c5-testing]
      name=CentOS-5 Testing
      baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
      enabled=1
      gpgcheck=1
      gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
      includepkgs=php*
    3、完成后我们就可以使用这个源了,可以简单的 yum update ,也可以指定更新指定的软件
    最后,确认一下系统中已经安装了PHP 5.2
    # rpm -qa |grep php
    
      php-cli-5.2.6-2.el5s2
      php-mbstring-5.2.6-2.el5s2
      php-devel-5.2.6-2.el5s2
      php-pdo-5.2.6-2.el5s2
      php-gd-5.2.6-2.el5s2
      php-dba-5.2.6-2.el5s2
      php-common-5.2.6-2.el5s2
      php-bcmath-5.2.6-2.el5s2
      php-xml-5.2.6-2.el5s2
      php-pear-1.5.1-2.el5s2
      php-ldap-5.2.6-2.el5s2
      php-5.2.6-2.el5s2
      php-mysql-5.2.6-2.el5s2
    
    
     # php -v
    
      PHP 5.2.6 (cli) (built: Sep 15 2008 20:42:05)
      Copyright (c) 1997-2008 The PHP Group
      Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
  • 相关阅读:
    在github上面查到了,为什么需要这个padding
    Java 8 新语法习惯,新的函数特性和语法
    数据库连接池配置,获取连接的超时
    用函数式的方式思考,通常以命令式的方式
    centos7 yum方式安装,centos自带mariadb
    mac屏幕脏了怎么办?避免使用粗糙的布
    用 Arthas “庖丁解牛,强大的 Arthas法师来 carry
    图解Knative核心组件,Serving自动伸缩
    vim配置文件
    20200717模拟赛3题解
  • 原文地址:https://www.cnblogs.com/xred/p/3603734.html
Copyright © 2011-2022 走看看