Multiple PHP Versions - php 5.4 설치 및 사용 > Virtualmin Guide

본문 바로가기
 

Multiple PHP Versions - php 5.4 설치 및 사용

페이지 정보

작성자 차동박 댓글 0건 조회 8,693회 작성일 15-05-18 22:51

본문

Multiple PHP Versions

Posted 2013-03-01 15:25 by andreychek

Introduction

Beginning in Virtualmin 3.99, if you have multiple PHP versions installed, you can choose which version to use for a given domain, or even per-directory.
While this feature can work with any Operating System version, it works best with 64 bit CentOS 6 using the CentOS Software Collections repository.
Also, the repository providing these packages currently only provides 64 bit packages.

Installing a second PHP Version on CentOS 6

CentOS supports something called "Software Collections", which is a system for installing multiple software versions on one server. Using packages provided by a third party in the Software Collections repository, it's possible to install PHP 5.4 in /opt/, while keeping your current PHP version installed in /usr/.
To install PHP 5.4 from the Software Collections repository, perform the following steps:
  1. Log into your server over SSH as root
  2. Setup the SCL repository with this command: yum install centos-release-SCL
  3. Install PHP 5.4 and scl-utils with this command: yum install php54 php54-php-cli php54-php-mysql php54-php-gd

Configuring the second PHP Version in Virtualmin

Once you have completed the installation of a second PHP version, you can verify that Virtualmin sees it by logging into Virtualmin, and clicking System Settings -> Re-Check Config. You should see something like this:
The following PHP versions are available : 5.3.3 (/usr/bin/php-cgi), 5.4.16 (/opt/rh/php54/root/usr/bin/php-cgi)
You can configure which one is the default PHP version used on new Virtual Servers. The default is to use the newest available. You can change that default in System Settings -> Server Templates -> Default -> Apache Website, and on that screen you can set the default PHP version to use in the field Default PHP version.

Configuring Individual Virtual Servers

You can configure the PHP version being used for a specific Virtual Server by selecting Server Configuration -> PHP Versions.
The first line there specifies what PHP version will be used by default.
If you wish, you can specify a different PHP version to be used for a specific directory.
 

댓글목록

등록된 댓글이 없습니다.

Total 32건 1 페이지
게시물 검색