Virink's Blog logo

Virink's Blog

Let life be beautiful like summer flowers, and death like autume leaves.

 Centos6.8 with Oracle UEK R3 for DTrace and PHP

Install the UEKR3 repo

cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo

Disable all OL7 yum channels and enable UEK3 only

yum-config-manager --disable ol6*
yum-config-manager --enable ol6_UEKR3

Make kernel-uek the new default

sed -i 's/DEFAULTKERNEL=kernel/DEFAULTKERNEL=kernel=uek/' /etc/sysconfig/kernel

OR

grub2-set-default 0

Import the OL7 RPM GPG key

rpm --import http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6

Install kernel-uek

yum install kernel-uek kernel-uek-devel -y

Confirm kernel-uek is default and reboot

grub2-editenv list
init 6

Install dtrace-utils

The dtrace-utils need to csi for download, Ijust save dtrace-utils-0.5.1-3.el6.x86_64.rpm

git clone

rpm -Uvh dtrace-utils-0.5.1-3.el6.x86_64.rpm

Download PHP Source

wget http://cn2.php.net/distributions/php-5.6.27.tar.xz
xz -d php-5.6.27.tar.xz
tar xf php-5.6.27.tar -C /usr/local/src/

Add epel repo

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Install 依赖

yum install gcc bison bison-devel zlib-devel libmcrypt-devel mcrypt mhash-devel openssl-devel libxml2-devel libcurl-devel bzip2-devel readline-devel libedit-devel sqlite-devel -y

Add user www

groupadd www
useradd -g www -s /sbin/nologin -M www

Install

cd /usr/local/src/php-5.6.27/

./configure \--prefix=/usr/local/php56 \
--with-config-file-path=/usr/local/php56/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-bz2 \
--with-readline \
--enable-dtrace

make -j8 && make install

If you want to reinstall:

make clean
make clean all
./configure ...
make -j8 && make install

Configure PHP

ini:

cp php.ini-development /usr/local/php56/etc/php.ini

php-fpm service

cp /usr/local/php56/etc/php-fpm.conf.default /usr/local/php56/etc/php-fpm.conf
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm56
chmod +x /etc/init.d/php-fpm56

Start php-fpm

service php-fpm56 start

Add PHP Command to PATH

vim ~/.bash_profile
export PATH=$PATH:/usr/local/php56/bin

source ~/.bash_profile
本文标题 : Centos6.8 with Oracle UEK R3 for DTrace and PHP
文章作者 : Virink
发布时间 :  
最后更新 :  
本文链接 : https://www.virzz.com/2016/10/29/centos_6.8_with_oracle_uek_r3_for_dtrace_and_php.html
转载声明 : 转载请保留原文链接及作者。
转载说明 : 本卡片有模板生成,本人转载来的文章请忽略~~