CentOS 5.3에서 PHP 5.2 설치하기

By | 2009/08/02

  CentOS는 안정화에 중점을 둔 배포판이라 생각합니다. 따라서 기존 repository에서 패키지를 찾아보면 버전이 제법 낮거나 없는 것이 많습니다. 그만큼 많은 테스트로 안전하고 잘 동작하는 것을 배포한다는 의미라 생각합니다. 그래서 Fedora나 Ubuntu를 썼을 때와 달리 컴퓨터가 다운되는 일은 없었습니다.

  하지만 가끔 버전이 너무 낮아 답답한 경우가 있습니다. 이번에 PHP를 이용해서 서비스를 하나 개발하고 있는데, 필요한 라이브러리의 요구사항을 보니 PHP 5.2 이상이라고 적혀있었습니다. 그렇지만 CentOS에서 제공하는 PHP는 5.1이기에 라이브러리가 제대로 작동하지 않는 것입니다.

  서버를 바꿔야 하는지 PHP를 따로 컴파일을 해야 하는지 고민을 하였는데 구글링을 하다가 좋은 문서를 하나 발견하였습니다.

Install PHP 5.2 on CentOS 5.2 Using Yum

  CentOS 5.2에서 PHP 5.2를 설치하는 방법에 대해 얘기하고 있습니다. 그 방법은 새로운 repository를 등록하는 것입니다.

Yum Repository

  위의 문서에 적힌대로 하나씩 차근차근 하였습니다.

  1. rpm –import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
  2. yum utterramblings http://www.jasonlitka.com/media/EL4/$ARCH
  3. vim /etc/yum.repos.d/utterramblings.repo
  4. [utterramblings]
    name=Jason’s Utter Ramblings Repo
    baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
    enabled=1
    priority=1
    gpgcheck=1
    gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

  기존의 문서에서 utterramblings.repo 파일에 priority=1이라는 문구를 넣었습니다. 이는 CentOS-Base.repo에서 Base 등을 priority=1로 잡았기에 목록이 뜨지 않는 문제가 발생한 것입니다.

  이렇게 문제를 해결하니 다음과 같이 Update 목록에 PHP를 포함하여 다른 것들이 나왔습니다.

c2

  PHP는 현재 업데이트 하였기에 나오지 않습니다. 하지만 현재 남아있는 것들의 update를 실행하니 에러가 뜨고 있습니다.

Transaction Check Error:
  file /etc/my.cnf from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/bin/mysql_tableinfo from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/info/mysql.info.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/my_print_defaults.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysql.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysql_find_rows.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysql_tableinfo.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysql_waitpid.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysqlaccess.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysqladmin.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysqldump.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/charsets/ascii.xml from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/czech/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/danish/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/dutch/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/english/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/estonian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/french/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/german/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/greek/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/italian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/japanese/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/korean/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/polish/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/romanian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/russian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/serbian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/slovak/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/spanish/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/swedish/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/man/man1/pcregrep.1.gz from install of pcre-7.6-jason.1.x86_64 conflicts with file from package pcre-6.6-2.el5_1.7.i386
  file /usr/share/man/man1/pcretest.1.gz from install of pcre-7.6-jason.1.x86_64 conflicts with file from package pcre-6.6-2.el5_1.7.i386
  file /usr/share/man/man1/mysql_config.1.gz from install of mysql-server-5.0.58-jason.2.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/locale/es/LC_MESSAGES/subversion.mo from install of subversion-1.4.4-jason.1.x86_64 conflicts with file from package subversion-1.4.2-4.el5.i386
  file /usr/share/locale/it/LC_MESSAGES/subversion.mo from install of subversion-1.4.4-jason.1.x86_64 conflicts with file from package subversion-1.4.2-4.el5.i386
  file /usr/share/locale/ja/LC_MESSAGES/subversion.mo from install of subversion-1.4.4-jason.1.x86_64 conflicts with file from package subversion-1.4.2-4.el5.i386
  file /usr/share/locale/ko/LC_MESSAGES/subversion.mo from install of subversion-1.4.4-jason.1.x86_64 conflicts with file from package subversion-1.4.2-4.el5.i386
  file /usr/share/locale/nb/LC_MESSAGES/subversion.mo from install of subversion-1.4.4-jason.1.x86_64 conflicts with file from package subversion-1.4.2-4.el5.i386
  file /usr/share/locale/zh_CN/LC_MESSAGES/subversion.mo from install of subversion-1.4.4-jason.1.x86_64 conflicts with file from package subversion-1.4.2-4.el5.i386

Error Summary

  이게 현재 무슨 에러이고 어떻게 해결하는지는 잘 모르겠습니다. 하지만 PHP외에는 현재 불만이 없기에 update를 하지 않고 그대로 사용하고 있습니다.

  CentOS의 단점을 보완해주는 이런 것이 있으니 참으로 좋습니다. 밑에 참조 페이지에 좋은 것들이 많으니 필요하신 분은 문서를 읽어보시길 권장합니다.

참조

Leave a Reply