이번엔 RPM을 이용하여 의존성을 설치하고,
YUM을 이용하여 PHP5.5버전을 설치 할 것이다.
중요한건 이전에 설치한 아파치는 컴파일인데 현재 설치하는 PHP방식은 YUM으로서 연동하려하면
에러가 있다는것. 그건바로 컴파일한 아파치를 인식하지 못하는건데. 이건 차후에 다루기로하고
두개를 연동하기위해선 PHP를 소스설치하면 되는데 이건 나중에 포스팅 할테니 그때 참고하길 바란다.
이 정보글 역시 짧고 굵게 설치방법만 적을테니 따라올것
참 글을 읽기전 한마디를 덧붙이자면 이글은 rpm을 이용해서 설치하는 작업들이 몇개 있다.
rpm파일들은 웹에 많이 떠돌아다니고 버전도 많으니 원하는게 있다면 찾아보길 바란다.
하지만 난 이전에 아파치 설치와 마찬가지로 귀찮은자들을 위해 서버에 특정버전을 올려놨으니
참고해서 원하면 적용시키도록
PHP설치 여부 확인
$ rpm -qa | grep php # 이하 아무것도 출력되지 않으면 설치되있지 않는 것이다.
remi-release 설치여부 확인
$ rpm -qa | grep remi-release # 이하 아무것도 출력되지 않으면 설치되있지 않는 것이다.
여기서 설치가 되있지않다면 epel-release부터 시작하여 의존성을 설치하고 진행하자
이미 있다면 이 작업을 넘어갈 것!
# epel-release를 설치한다. 이유는 remi-release가 epel에 의존하고 있기 때문 $ rpm -ivh https://www.webshare.co.kr/file/package/epel-release-6-8.noarch.rpm # centos 5.x : https://www.webshare.co.kr/file/package/epel-release-5-4.noarch.rpm # centos 6.x : https://www.webshare.co.kr/file/package/epel-release-6-8.noarch.rpm # centos 7.x : https://www.webshare.co.kr/file/package/epel-release-7-5.noarch.rpm # 이제 remi-release를 설치하자 $ rpm -ivh https://www.webshare.co.kr/file/package/remi-release-6.rpm # 설치가 끝나면 위에 써있는 저장소확인을 다시 해보자 $ rpm -qa | grep remi-release remi-release-6.5-1.el6.remi.noarch
이제 PHP5.5버전을 설치 할 것이다.
# 설치 $ yum --enablerepo=remi-php55 install php # 프로세스가 진행 될 것이다. Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile epel/metalink | 4.1 kB 00:00 * base: centos.tt.co.kr * epel: mirror.premi.st * extras: centos.tt.co.kr * remi-php55: remi.kazukioishi.net * updates: centos.tt.co.kr epel | 4.4 kB 00:00 epel/primary_db | 6.4 MB 00:04 remi-php55 | 2.9 kB 00:00 remi-php55/primary_db | 171 kB 00:00 Resolving Dependencies --> Running transaction check ---> Package php.x86_64 0:5.5.20-2.el6.remi will be installed --> Processing Dependency: php-common(x86-64) = 5.5.20-2.el6.remi for package: php-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: php-cli(x86-64) = 5.5.20-2.el6.remi for package: php-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: httpd-mmn = 20051115 for package: php-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: httpd for package: php-5.5.20-2.el6.remi.x86_64 --> Running transaction check ---> Package httpd.x86_64 0:2.2.15-39.el6.centos will be installed --> Processing Dependency: httpd-tools = 2.2.15-39.el6.centos for package: httpd-2.2.15-39.el6.centos.x86_64 --> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-39.el6.centos.x86_64 ---> Package php-cli.x86_64 0:5.5.20-2.el6.remi will be installed ---> Package php-common.x86_64 0:5.5.20-2.el6.remi will be installed --> Processing Dependency: php-pecl-zip(x86-64) for package: php-common-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: php-pecl-jsonc(x86-64) for package: php-common-5.5.20-2.el6.remi.x86_64 --> Running transaction check ---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed ---> Package httpd-tools.x86_64 0:2.2.15-39.el6.centos will be installed ---> Package php-pecl-jsonc.x86_64 0:1.3.6-1.el6.remi.5.5.1 will be installed --> Processing Dependency: /usr/bin/pecl for package: php-pecl-jsonc-1.3.6-1.el6.remi.5.5.1.x86_64 --> Processing Dependency: /usr/bin/pecl for package: php-pecl-jsonc-1.3.6-1.el6.remi.5.5.1.x86_64 ---> Package php-pecl-zip.x86_64 0:1.12.4-1.el6.remi.5.5 will be installed --> Running transaction check ---> Package php-pear.noarch 1:1.9.4-20.el6.remi will be installed --> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-20.el6.remi.noarch --> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-20.el6.remi.noarch --> Running transaction check ---> Package php-process.x86_64 0:5.5.20-2.el6.remi will be installed ---> Package php-xml.x86_64 0:5.5.20-2.el6.remi will be installed --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.5.20-2.el6.remi.x86_64 --> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.5.20-2.el6.remi.x86_64 --> Running transaction check ---> Package libxslt.x86_64 0:1.1.26-2.el6_3.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: php x86_64 5.5.20-2.el6.remi remi-php55 2.6 M Installing for dependencies: apr-util-ldap x86_64 1.3.9-3.el6_0.1 base 15 k httpd x86_64 2.2.15-39.el6.centos base 825 k httpd-tools x86_64 2.2.15-39.el6.centos base 75 k libxslt x86_64 1.1.26-2.el6_3.1 base 452 k php-cli x86_64 5.5.20-2.el6.remi remi-php55 3.7 M php-common x86_64 5.5.20-2.el6.remi remi-php55 1.0 M php-pear noarch 1:1.9.4-20.el6.remi remi-php55 371 k php-pecl-jsonc x86_64 1.3.6-1.el6.remi.5.5.1 remi-php55 47 k php-pecl-zip x86_64 1.12.4-1.el6.remi.5.5 remi-php55 269 k php-process x86_64 5.5.20-2.el6.remi remi-php55 57 k php-xml x86_64 5.5.20-2.el6.remi remi-php55 208 k Transaction Summary ================================================================================ Install 12 Package(s) Total download size: 9.6 M Installed size: 36 M Is this ok [y/N]: y Downloading Packages: (1/12): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm | 15 kB 00:00 (2/12): httpd-2.2.15-39.el6.centos.x86_64.rpm | 825 kB 00:00 (3/12): httpd-tools-2.2.15-39.el6.centos.x86_64.rpm | 75 kB 00:00 (4/12): libxslt-1.1.26-2.el6_3.1.x86_64.rpm | 452 kB 00:00 (5/12): php-5.5.20-2.el6.remi.x86_64.rpm | 2.6 MB 00:00 (6/12): php-cli-5.5.20-2.el6.remi.x86_64.rpm | 3.7 MB 00:00 (7/12): php-common-5.5.20-2.el6.remi.x86_64.rpm | 1.0 MB 00:00 (8/12): php-pear-1.9.4-20.el6.remi.noarch.rpm | 371 kB 00:00 (9/12): php-pecl-jsonc-1.3.6-1.el6.remi.5.5.1.x86_64.rpm | 47 kB 00:00 (10/12): php-pecl-zip-1.12.4-1.el6.remi.5.5.x86_64.rpm | 269 kB 00:00 (11/12): php-process-5.5.20-2.el6.remi.x86_64.rpm | 57 kB 00:00 (12/12): php-xml-5.5.20-2.el6.remi.x86_64.rpm | 208 kB 00:00 -------------------------------------------------------------------------------- Total 4.8 MB/s | 9.6 MB 00:01 warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi Importing GPG key 0x00F97F56: Userid : Remi Collet <rpms@famillecollet.com> Package: remi-release-6.5-1.el6.remi.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Installing : libxslt-1.1.26-2.el6_3.1.x86_64 1/12 Installing : php-process-5.5.20-2.el6.remi.x86_64 2/12 Installing : php-xml-5.5.20-2.el6.remi.x86_64 3/12 Installing : php-cli-5.5.20-2.el6.remi.x86_64 4/12 Installing : php-common-5.5.20-2.el6.remi.x86_64 5/12 WARNING : These php-* RPM are not official Fedora / Red Hat build and overrides the official ones. Don't file bugs on Fedora Project nor Red Hat. Use dedicated forums http://forums.famillecollet.com/ Installing : 1:php-pear-1.9.4-20.el6.remi.noarch 6/12 Installing : php-pecl-jsonc-1.3.6-1.el6.remi.5.5.1.x86_64 7/12 Installing : php-pecl-zip-1.12.4-1.el6.remi.5.5.x86_64 8/12 Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 9/12 Installing : httpd-tools-2.2.15-39.el6.centos.x86_64 10/12 Installing : httpd-2.2.15-39.el6.centos.x86_64 11/12 Installing : php-5.5.20-2.el6.remi.x86_64 12/12 Verifying : httpd-2.2.15-39.el6.centos.x86_64 1/12 Verifying : php-5.5.20-2.el6.remi.x86_64 2/12 Verifying : 1:php-pear-1.9.4-20.el6.remi.noarch 3/12 Verifying : php-process-5.5.20-2.el6.remi.x86_64 4/12 Verifying : php-pecl-jsonc-1.3.6-1.el6.remi.5.5.1.x86_64 5/12 Verifying : php-xml-5.5.20-2.el6.remi.x86_64 6/12 Verifying : php-pecl-zip-1.12.4-1.el6.remi.5.5.x86_64 7/12 Verifying : httpd-tools-2.2.15-39.el6.centos.x86_64 8/12 Verifying : apr-util-ldap-1.3.9-3.el6_0.1.x86_64 9/12 Verifying : php-cli-5.5.20-2.el6.remi.x86_64 10/12 Verifying : php-common-5.5.20-2.el6.remi.x86_64 11/12 Verifying : libxslt-1.1.26-2.el6_3.1.x86_64 12/12 Installed: php.x86_64 0:5.5.20-2.el6.remi Dependency Installed: apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 httpd.x86_64 0:2.2.15-39.el6.centos httpd-tools.x86_64 0:2.2.15-39.el6.centos libxslt.x86_64 0:1.1.26-2.el6_3.1 php-cli.x86_64 0:5.5.20-2.el6.remi php-common.x86_64 0:5.5.20-2.el6.remi php-pear.noarch 1:1.9.4-20.el6.remi php-pecl-jsonc.x86_64 0:1.3.6-1.el6.remi.5.5.1 php-pecl-zip.x86_64 0:1.12.4-1.el6.remi.5.5 php-process.x86_64 0:5.5.20-2.el6.remi php-xml.x86_64 0:5.5.20-2.el6.remi Complete!
설치가 끝이났다. 확인해보자.
$ rpm -qa | grep php # 이하 비슷한 문구가 출력 될 것이다. php-xml-5.5.20-2.el6.remi.x86_64 php-pecl-jsonc-1.3.6-1.el6.remi.5.5.1.x86_64 php-process-5.5.20-2.el6.remi.x86_64 php-cli-5.5.20-2.el6.remi.x86_64 php-pear-1.9.4-20.el6.remi.noarch php-pecl-zip-1.12.4-1.el6.remi.5.5.x86_64 php-5.5.20-2.el6.remi.x86_64 php-common-5.5.20-2.el6.remi.x86_64 # 버전 확인 $ php -v # 대략 이런 로그가 출력 된다. PHP 5.5.20 (cli) (built: Dec 17 2014 15:09:12) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
여기까지하면 정상적으로 PHP5.5를 설치 한 것이다.
상위 버전도 위와 비슷하니 참고하길 바란다.
그럼 여기서 안녕!
댓글 남기기