Requirement

Evgeny Nikitenko edited this page Mar 28, 2018 · 42 revisions

These requirements are for you to run phpbrew and build your PHP. To build your PHP, you need a lot of libraries installed on your system.

The instructions below help you to get things done. Please note that this document may not apply to the versions still under development, and you may need to install some libraries which are not listed here for certain extensions.

Platform support

  • Mac OS 10.5+
  • Ubuntu
  • Debian
  • RHEL / CentOS

Dependencies

  • PHP5.3+
  • curl
  • gcc, binutils, autoconf, libxml, zlib, readline

Mac OS X Requirement

MacPorts

port install curl automake autoconf icu depof:php5 depof:php5-gd mcrypt bison re2c gettext openssl

HomeBrew

xcode-select --install
brew install automake autoconf curl pcre bison re2c mhash libtool icu4c gettext jpeg openssl libxml2 mcrypt gmp libevent
brew link icu4c
brew link --force openssl
brew link --force libxml2

Ubuntu Requirement

Ubuntu 13.04 & 14.04

Please note that you need to disable suhosin patch to run phpbrew.

Install Medium Requirement (+gd +openssl +gettext +mhash +mcrypt +icu)

We'd suggest you to install the requirement below to avoid configure failure.

apt-get build-dep php5
apt-get install -y php5 php5-dev php-pear autoconf automake curl libcurl3-openssl-dev build-essential libxslt1-dev re2c libxml2 libxml2-dev php5-cli bison libbz2-dev libreadline-dev
apt-get install -y libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libjpeg-dev libjpeg8-dev libjpeg8  libgd-dev libgd3 libxpm4 libltdl7 libltdl-dev
apt-get install -y libssl-dev openssl
apt-get install -y gettext libgettextpo-dev libgettextpo0
apt-get install -y libicu-dev
apt-get install -y libmhash-dev libmhash2
apt-get install -y libmcrypt-dev libmcrypt4
Install Minimum Requirement (pure php without default variant)

FOR ADVANCED USERS

apt-get build-dep php5
apt-get install -y php5 php5-dev php-pear autoconf automake curl libcurl3-openssl-dev build-essential libxslt1-dev re2c libxml2 libxml2-dev php5-cli bison libbz2-dev libreadline-dev libicu-dev
Database-Related Requirement

With MySQL:

apt-get install mysql-server mysql-client libmysqlclient-dev libmysqld-dev

With PostgreSQL:

apt-get install postgresql postgresql-client postgresql-contrib

Ubuntu 16.04

apt install \
  php7.0 \
  php7.0-curl \
  php7.0-json \
  php7.0-cgi \
  php7.0-fpm \
  autoconf \
  automake \
  libxml2-dev \
  libcurl4-openssl-dev \
  libssl-dev \
  openssl \
  gettext \
  libicu-dev \
  libmcrypt-dev \
  libmcrypt4 \
  libbz2-dev \
  libreadline-dev \
  build-essential \
  libmhash-dev \
  libmhash2 \
  libxslt1-dev

Fedora/CentOS Requirements

yum install make automake gcc gcc-c++ kernel-devel # these are equivalent to Debian's "build-essential"
yum install php php-devel php-pear bzip2-devel yum-utils bison re2c libmcrypt-devel libpqxx-devel libxslt-devel pcre-devel libcurl-devel libgsasl-devel openldap-devel
yum-builddep php

To compile with +apxs2

yum install httpd-devel

CentOS Requirement

Please note that you need to disable suhosin patch to run phpbrew.

CentOS package requirements are the same as Fedora

# CentOS/RHEL 7.x:
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

# CentOS/RHEL 6.x:
sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

# If you don't have php
sudo yum install --enablerepo=webtatic php php-xml
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
sudo rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
sudo yum install --enablerepo=rpmforge re2c libmhash

Reference: http://matome.naver.jp/odai/2133887830324055901

openSUSE Tumbleweed

Before you start phpbrew installation:

sudo zypper in -y php7 php7-phar php7-curl php7-openssl

For default and fpm variant installation:

sudo zypper in -y -t pattern devel_basis 
sudo zypper in -y libxml2-devel libopenssl-devel libbz2-devel libmcrypt-devel libxslt-devel

To install

phpbrew install 7.0 +default +fpm -- --with-libdir=lib64
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.