Sei sulla pagina 1di 8

To install, first you must add the Webtatic EL yum repository information

corresponding to your CentOS/RHEL version to yum:

CentOS/RHEL 7.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm


rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm


rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Now you can install PHP 5.6’s mod_php SAPI (along with an opcode cache)
by doing:

yum install php56w php56w-opcache

You can alternatively install PHP 5.6’s php-fpm SAPI (along with an opcode
cache by doing:

yum install php56w-fpm php56w-opcache

Packages

Package Provides

php56w mod_php, php56w-zts

php56w-
bcmath

php56w-cli php-cgi, php-pcntl, php-readline

php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-ereg, php-exif, php-


fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-
libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-
php56w- reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer,
common php-zend-abi, php-zip, php-zlib

php56w-dba
Package Provides

php56w-devel

php56w-
embedded php-embedded-devel

php56w-
enchant

php56w-fpm

php56w-gd

php56w-imap

php56w-
interbase php_database, php-firebird

php56w-intl

php56w-ldap

php56w-
mbstring

php56w-
mcrypt

php56w-mssql

php56w-mysql php-mysqli, php_database

php56w-
mysqlnd php-mysqli, php_database

php56w-odbc php-pdo_odbc, php_database

php56w-
opcache php56w-pecl-zendopcache

php56w-pdo php56w-pdo_sqlite, php56w-sqlite3

php56w-pear
Package Provides

php56w-pecl-
apcu

php56w-pecl-
gearman

php56w-pecl-
geoip

php56w-pecl-
imagick

php56w-pecl-
memcache

php56w-pecl-
memcached

php56w-pecl-
mongodb

php56w-pecl-
xdebug

php56w-pgsql php-pdo_pgsql, php_database

php56w-
phpdbg

php56w-
process php-posix, php-sysvmsg, php-sysvsem, php-sysvshm

php56w-pspell

php56w-
recode

php56w-snmp

php56w-soap

php56w-tidy

php56w-xml php-dom, php-domxml, php-wddx, php-xsl


Package Provides

php56w-
xmlrpc

REMI REPO
PHP 7.1

1.1 Update server

yum -y update
1.2 Install EPEL Repository

yum -y install epel-release


1.3. Install REMI Repository

wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7*.rpm
1.4. Verify EPEL Repo

yum repolist

Install Apache web server

3.1 Installing Apache


yum -y install httpd
3.2 Start Apache web server
systemctl start httpd.service
3.3. Create the system startup link for httpd to start httpd automatically on the system
boot

systemctl enable httpd.service

PHP 7.1 installation

4.1. Make sure remi-php71.repo is there

ls /etc/yum.repos.d
smple output

CentOS-Base.repo CentOS-Vault.repo remi-php54.repo


CentOS-CR.repo CentOS-fasttrack.repo remi-php70.repo
CentOS-Debuginfo.repo MariaDB.repo remi-php71.repo
CentOS-Media.repo epel-testing.repo remi-safe.repo
CentOS-Sources.repo epel.repo remi.repo
4.2 Enable REMI repository for php7.1 (change enabled=0 to enabled=1)

vi /etc/yum.repos.d/remi-php71.repo

sample output

[remi-php71]
name=Remis PHP 7.1 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php71/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/php71/httpsmirror
mirrorlist=http://rpms.remirepo.net/enterprise/7/php71/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
4.3. Install PHP

yum -y install php


4.4. Install MySQL Support for PHP7

yum -y install php-mysql

yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc


php-mbstring php-snmp php-soap curl curl-devel

4.6. Restart Apache:

systemctl restart httpd.service


4.7. Let’s test: Create php info file

vi /var/www/html/info.php

add the following lines to info.php

<?php
phpinfo();
phpinfo(INFO_MODULES);
?>
Make sure PHP works and php modules are there http://your.server.ip.address/info.php

INSTALLATION PHP 7.0 & HPPTD FROM WEBTATIC REPO


CentOS/RHEL 7.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm


rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm


rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Now install PHP


yum install php70w php70w-opcache php70w-bcmath php70w-common php70w-mysqlnd php70w-
pdo php70w-pear php70w-xml php70w-cli

list of package below we can select

Packages

Package Provides
php70w mod_php, php70w-zts
php70w-
bcmath
php70w-cli php-cgi, php-pcntl, php-readline
php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-
fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-
json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-
php70w- pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets,
common php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
php70w-dba
php70w-devel
php70w-
embedded php-embedded-devel
php70w-
enchant
php70w-fpm
php70w-gd
Package Provides
php70w-imap
php70w-
interbase php_database, php-firebird
php70w-intl
php70w-ldap
php70w-
mbstring
php70w-
mcrypt
php70w-
mysql php-mysqli, php_database
php70w-
mysqlnd php-mysqli, php_database
php70w-odbc php-pdo_odbc, php_database
php70w-
opcache php70w-pecl-zendopcache
php70w-pdo php70w-pdo_sqlite, php70w-sqlite3
php70w-
pdo_dblib php70w-mssql
php70w-pear
php70w-pecl-
apcu
php70w-pecl-
imagick
php70w-pecl-
memcached
php70w-pecl-
mongodb
php70w-pecl-
redis
php70w-pecl-
xdebug
php70w-pgsql php-pdo_pgsql, php_database
php70w-
phpdbg
Package Provides
php70w-
process php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php70w-pspell
php70w-
recode
php70w-snmp
php70w-soap
php70w-tidy
php70w-xml php-dom, php-domxml, php-wddx, php-xsl

php70w-xmlrpc

Potrebbero piacerti anche