Centos6.8 with Oracle UEK R3 for DTrace and PHP

admin 2022年5月17日11:27:42安全博客评论4 views2234字阅读7分26秒阅读模式

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


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


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 \

make -j8 && make install

If you want to reinstall:

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

Configure PHP


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

FROM : virzz.com | Author:Virink

特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
  • 本文由 发表于 2022年5月17日11:27:42
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  Centos6.8 with Oracle UEK R3 for DTrace and PHP http://cn-sec.com/archives/1013014.html


匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: