티스토리 뷰

OS-서버-서비스/Linux

CentOS 에 PHP FPM 5.6 설치

VoidNoble 공허공자 2016. 4. 6. 15:38

root 계정으로 아래 명령 실행

$ rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm $ rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm $ cd /etc/yum.repos.d $ curl -O http://rpms.famillecollet.com/enterprise/remi.repo

http://itzone.tistory.com/669 참고하여 저장소 enabling


http://saksin.tistory.com/1282 참고하여 저장소 추가

PHP 5.6.x 설치하려면 remi 저장소의 remi, remi-php56 을 활성화 :

$ vi /etc/yum.repos.d/remi.repo


[remi]

name=Les RPM de remi pour Enterprise Linux 7 - $basearch

#baseurl=http://rpms.famillecollet.com/enterprise/7/remi/$basearch/

mirrorlist=http://rpms.famillecollet.com/enterprise/7/remi/mirror

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi


[remi-php56]

name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 7 - $basearch

#baseurl=http://rpms.famillecollet.com/enterprise/7/php56/$basearch/

mirrorlist=http://rpms.famillecollet.com/enterprise/7/php56/mirror

# WARNING: If you enable this repository, you must also enable "remi"

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi


PHP 7.x 설치하려면 remi 저장소의 remi-php70 을 활성화 :

$ vi /etc/yum.repos.d/remi-php70.repo


# This repository only provides PHP 7.0 and its extensions

# NOTICE: common dependencies are in "remi-safe"


[remi-php70]

name=Remi's PHP 7.0 RPM repository for Enterprise Linux 7 - $basearch

#baseurl=http://rpms.remirepo.net/enterprise/7/php70/$basearch/

mirrorlist=http://rpms.remirepo.net/enterprise/7/php70/mirror

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi


[remi-php70-debuginfo]

name=Remi's PHP 7.0 RPM repository for Enterprise Linux 7 - $basearch - debuginfo

baseurl=http://rpms.remirepo.net/enterprise/7/debug-php70/$basearch/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi


[remi-php70-test]

name=Remi's PHP 7.0 test RPM repository for Enterprise Linux 7 - $basearch

#baseurl=http://rpms.remirepo.net/enterprise/7/test70/$basearch/

mirrorlist=http://rpms.remirepo.net/enterprise/7/test70/mirror

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi


[remi-php70-test-debuginfo]

name=Remi's PHP 7.0 test RPM repository for Enterprise Linux 7 - $basearch - debuginfo

baseurl=http://rpms.remirepo.net/enterprise/7/debug-test70/$basearch/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi


yum 업데이트 실시

$ yum update


패키지 설치는

만약 mbstring, mcrypt, soap, apc 와 같은 PHP-모듈들을 추가 설치하고싶다면 아래와같이

$ yum install -y php php-fpm php-devel php-cli php-mysql php-mbstring php-mcrypt php-soap php-apc $ yum install gd-last $ yum groupinstall "PHP Support" –y

위와같이 실행하면 PHP-FPM 5.6 설치됨.

PHP-FPM 버젼 확인

[root@Chandan yum.repos.d]# /usr/sbin/php-fpm -version
PHP 5.6.12 (fpm-fcgi) (built: Aug 6 2015 17:15:15)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
[root@Chandan yum.repos.d]#


출처: https://geekflare.com/install-upgrade-php-fpm-5-6-on-centos-6/

댓글
댓글쓰기 폼
Total
818,296
Today
119
Yesterday
305
«   2020/02   »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
글 보관함