"CentOS 5에 PHP 5.3 설치 (yum)"의 두 판 사이의 차이

128번째 줄: 128번째 줄:
</source>
</source>


===php 5.3 설치===
===설치===
<source lang='dos'>
<source lang='dos'>
[root@jmnote ~]# yum --enablerepo=webtatic install php
[root@jmnote ~]# yum --enablerepo=webtatic install php

2013년 11월 26일 (화) 15:20 판

1 개요

PHP 5.3 업그레이드
CentOS 5에 PHP 5.3 설치
  • (방법1) CentOS 5 기본 저장소(base)에서 PHP 5.3.3을 설치
  • (방법2) webtatic 저장소를 이용하여 PHP 5.3.27을 설치(이쪽이 상위버전)

2 사전 확인

[root@jmnote ~]# php -v | head -1
PHP 5.1.6 (cli) (built: Jun 27 2012 12:21:13)
→ PHP 버전은 5.1.6이다.
[root@jmnote ~]# yum repolist
... (생략)
repo id                                                  repo name                                                           status
base                                                     CentOS-5 - Base                                                     3,662
extras                                                   CentOS-5 - Extras                                                     265
updates                                                  CentOS-5 - Updates                                                     98
repolist: 4,025
→ CentOS 5 기본 저장소 사용중
[root@jmnote ~]# yum list php
... (생략)
Installed Packages
php.x86_64                                                 5.1.6-40.el5_9                                                 installed
→ 5.1.6이 설치되어 있으며 다른 Available한 다른 버전은 보이지 않는다.

3 방법 1: 5.3.3 설치 (base)

php53이라는 패키지명으로 들어 있다.

[root@jmnote ~]# yum install php53
... (생략)
php53-common-5.3.3-21.el5.x86_64 from base has depsolving problems
  --> php53-common conflicts with php-common
Error: php53-common conflicts with php-common
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
→ 그런데 설치하려고 하면 기존 php-common과 충돌 있음

3.1 php-common 제거

[root@jmnote ~]# yum remove php-common
... (생략)
======================================================================================================
 Package                 Arch                Version                     Repository              Size
======================================================================================================
Removing:
 php-common              x86_64              5.1.6-40.el5_9              installed              397 k
Removing for dependencies:
 php                     x86_64              5.1.6-40.el5_9              installed              6.3 M
 php-cli                 x86_64              5.1.6-40.el5_9              installed              5.3 M

Transaction Summary
======================================================================================================
Remove        3 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Removed:
  php-common.x86_64 0:5.1.6-40.el5_9                                                                  

Dependency Removed:
  php.x86_64 0:5.1.6-40.el5_9                     php-cli.x86_64 0:5.1.6-40.el5_9                    

Complete!

3.2 설치

[root@jmnote ~]# yum install php53
... (생략)
======================================================================================================
 Package                    Arch                 Version                     Repository          Size
======================================================================================================
Installing:
 php53                      x86_64               5.3.3-21.el5                base               1.3 M
Installing for dependencies:
 php53-cli                  x86_64               5.3.3-21.el5                base               2.4 M
 php53-common               x86_64               5.3.3-21.el5                base               608 k

Transaction Summary
======================================================================================================
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 4.3 M
Is this ok [y/N]: y
... (생략)
Installed:
  php53.x86_64 0:5.3.3-21.el5                                                                         

Dependency Installed:
  php53-cli.x86_64 0:5.3.3-21.el5                  php53-common.x86_64 0:5.3.3-21.el5                 

Complete!

3.3 확인

[root@jmnote ~]# php -v
PHP 5.3.3 (cli) (built: Oct  1 2013 18:32:37) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

4 방법 2: 5.3.27 설치 (webtatic)

4.1 webtatic 저장소 추가

[root@jmnote ~]# rpm -Uvh http://mirror.webtatic.com/yum/centos/5/latest.rpm
Retrieving http://mirror.webtatic.com/yum/centos/5/latest.rpm
warning: /var/tmp/rpm-xfer.Y2q1C0: Header V3 DSA signature: NOKEY, key ID cf4c4ff9
Preparing...                ########################################### [100%]
   1:webtatic-release       ########################################### [100%]

4.2 설치

[root@jmnote ~]# yum --enablerepo=webtatic install php
... (생략)
======================================================================================================
 Package                  Arch                 Version                   Repository              Size
======================================================================================================
Updating:
 php                      x86_64               5.3.27-2.w5               webtatic               1.4 M
Updating for dependencies:
 php-cli                  x86_64               5.3.27-2.w5               webtatic               2.6 M
 php-common               x86_64               5.3.27-2.w5               webtatic               664 k

Transaction Summary
======================================================================================================
Install       0 Package(s)
Upgrade       3 Package(s)

Total download size: 4.6 M
Is this ok [y/N]: y
... (생략)
Updated:
  php.x86_64 0:5.3.27-2.w5                                                                            

Dependency Updated:
  php-cli.x86_64 0:5.3.27-2.w5                     php-common.x86_64 0:5.3.27-2.w5                    

Complete!

4.3 확인

[root@jmnote ~]# php -v
PHP 5.3.27 (cli) (built: Jul 13 2013 22:31:41) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

5 같이 보기

6 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}