Kamis, 20 September 2018

How to install rh-php56 on linux centos 6 from SCL repo

  Tidak ada komentar
Some day i need install rh-php56 on server that running centos 6 because i have to use apache 2.4, and it will conflict if i install non rh scl php packe 

Install scl repo and scl rh repo
[root@localhost ~]# yum -y install centos-release-scl-rh centos-release-scl
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.biz.net.id
 * epel: archive.linux.duke.edu
 * extras: centos.biz.net.id
 * remi-php56: fr2.rpmfind.net
 * remi-safe: fr2.rpmfind.net
 * updates: centos.biz.net.id
Resolving Dependencies
--> Running transaction check
...
Installed:
  centos-release-scl.noarch 10:7-3.el6.centos
  centos-release-scl-rh.noarch 0:2-3.el6.centos

Complete!
[root@localhost ~]#
Install httpd24 with enable scl repo command
[root@localhost ~]# yum --enablerepo=centos-sclo-rh-testing -y install rh-php56
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.biz.net.id
 * epel: archive.linux.duke.edu
 * extras: centos.biz.net.id
 * remi-php56: fr2.rpmfind.net
 * remi-safe: fr2.rpmfind.net
 * updates: centos.biz.net.id
centos-sclo-rh-testing                                   | 3.0 kB     00:00
centos-sclo-rh-testing/primary_db      
..
  rh-php56-php-pear.noarch 1:1.9.5-4.el6
  rh-php56-php-pecl-jsonc.x86_64 0:1.3.6-3.el6
  rh-php56-php-process.x86_64 0:5.6.25-1.el6
  rh-php56-php-xml.x86_64 0:5.6.25-1.el6
  rh-php56-runtime.x86_64 0:2.3-1.el6

Complete!
[root@localhost ~]#

Enable php on environment by typing following command
[root@localhost ~]#
[root@localhost ~]# php -v
bash: php: command not found
[root@localhost ~]#
[root@localhost ~]# scl enable rh-php56 bash
[root@localhost ~]#
Enable httpd persistent on environment by entering following command :source scl_source enable rh-php56 on .bashrc file
[root@localhost ~]# vi ~/.bashrc
[root@localhost ~]#
[root@localhost ~]# cat ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

source scl_source enable httpd24
source scl_source enable rh-php56

[root@localhost ~]#
If you need another package you can find here : 
https://centos.pkgs.org/6/centos-sclo-rh-testing/22/
https://centos.pkgs.org/6/centos-sclo-testing/11/

Tidak ada komentar :

Posting Komentar