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
FROM : virzz.com | Author:Virink
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论