php-oci8安装

Posted on 3月 23, 2009
Filed Under linux, shell |

php-oci8安装。在google搜了半天才搜到的,php oci8的安装shell文件在这共享给大家!


#!/bin/sh
# $Id: lazy_php_oci8_el5.sh 22 2007-08-22 12:19:50Z clive $
# lazy pack for installing php-oci8 on el5 (centos5)
#
# do not distribute this script publically.
#
# read http://blog.bsdchat.com/2007/08/php-oci8-on-centos5.html
# for how these files come from.
#
# define
DLDIR=/tmp/lazy_php_oci8
# sub
dlcache()
{
basename=`basename ${1}`
if [ -f ${basename} ]; then
echo “You have ${basename}, good.”
else
echo “Downloading ${basename}”
wget ${1}
fi
}

# main app
if [ "${USER}" != "root" ]; then
echo “Run this script as root!”
exit
fi

mkdir -p ${DLDIR}
if [ -d ${DLDIR} ]; then
cd ${DLDIR}
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.aa”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.ab”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.ac”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.ad”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.ae”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.af”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.ag”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.ah”
dlcache “http://ghs.tongi.org/php-oci8.i386.el5.tbz.ai”
cat php-oci8.i386.el5.tbz.?? | tar jvxf -
for i in *.rpm; do rpm -hiv ${i}; done
dlcache “http://ftp.freshrpms.net/pub/freshrpms/redhat/testing/EL5/oracle/i386/php-oci8-5.1.6-1.el5.i386.rpm”
rpm -hiv php-oci8-5.1.6-1.el5.i386.rpm
ldconfig
service httpd restart
else
echo “I can not mkdir ${DLDIR}!”
fi

Comments

Leave a Reply