天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

PHP下的Oracle客戶端擴展(OCI8)安裝教程

最近的項目需要用php訪問oracle數(shù)據(jù)庫,不得不在linux下給php安裝oci8擴展。php也可以使用pdo訪問oracle數(shù)據(jù)庫,但還是需要安裝客戶端。

首先到oracle官網(wǎng)的這個頁面下載相關(guān)的文件,注意要連數(shù)據(jù)庫服務(wù)器的版本,一定要對應(yīng),否則安裝成功也會連不上,同時也要區(qū)分32位、64位服務(wù)器,比如我要連的數(shù)據(jù)庫服務(wù)器是oracle10.2.0.4,64位主機,那么我要下載下面三個文件:

復(fù)制代碼 代碼如下:
oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm
oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.x86_64.rpm

1.用以下命令安裝

復(fù)制代碼 代碼如下:
# rpm -ivh oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm    oracle-instantclient-sqlplus-10.2.0.4-1.x86_64.rpm

2.安裝OCI8 php擴展

復(fù)制代碼 代碼如下:
# yum install libaio
# cd ~
# wget http://pecl.php.NET/get/oci8-1.3.5.tgz

3.然后執(zhí)行命令

復(fù)制代碼 代碼如下:
# tar zxvf oci8-1.3.5.tgz
# cd oci8-1.3.5/
# /usr/local/php5/bin/phpize  CFLAGS=/usr/lib/oracle/11.2/client64/ CXXFLAGS=/usr/lib/oracle/11.2/client64/
# ./configure --with-php-config=/usr/local/php5/bin/php-config --with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib/
# make
# make install(這里多運行幾次,直到出現(xiàn)如下提示)
 
[root@webserver02 oci8-1.3.5]# make install
/bin/sh /root/oci8-1.3.5/libtool --mode=install cp ./oci8.la /root/oci8-1.3.5/modules
cp ./.libs/oci8.so /root/oci8-1.3.5/modules/oci8.so
cp ./.libs/oci8.lai /root/oci8-1.3.5/modules/oci8.la
PATH="$PATH:/sbin" ldconfig -n /root/oci8-1.3.5/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/oci8-1.3.5/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions:     /usr/local/php5/lib/php/extensions/no-debug-zts-20090626/
# cd /usr/local/php5/lib

4.創(chuàng)建ext目錄

復(fù)制代碼 代碼如下:
# mkdir ext/

把oci8.so文件拷貝到php.ini 的ext目錄里面
復(fù)制代碼 代碼如下:# cp /root/oci8-1.3.5/modules/oci8.so /usr/local/php5/lib/ext/

5.在php.ini里面加上extension=oci8.so

如下:
復(fù)制代碼 代碼如下:
extension_dir = "/usr/local/php5/lib/ext"
extension = "oci8.so"
session.save_path = "/tmp/php"
oci8.privileged_connect = on

重啟apache服務(wù):

復(fù)制代碼 代碼如下:
/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start

刷新測試頁面。發(fā)現(xiàn)oci8出現(xiàn)了,則大功告成.

php技術(shù)PHP下的Oracle客戶端擴展(OCI8)安裝教程,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 恋夜秀场支持安卓版全部视频国产 | 在镜头里被CAO翻了H | 菠萝菠萝蜜在线观看视频 | 无码中文字幕av免费放 | 国产69精品久久久久APP下载 | 伊人久久大香线蕉综合色啪 | 欧美日韩一二区旡码高清在线 | 十九岁在线观看免费完整版电影 | 亚洲伊人久久综合影院2021 | 受喷汁红肿抽搐磨NP双性 | 亚洲另类国产综合在线 | 国产一区亚洲 | 牛牛在线1视频 | 恋夜秀场1234手机视频在线观看 | 国产偷啪自怕网 | 性色爽爱性色爽爱网站 | 国产午夜一级鲁丝片 | gv肉片视频免费观看 | 欧美激情精品久久久久久不卡 | 我的奶头被客人吸的又肿又红 | 5g在视影讯天天5g免费观看 | 97久久精品人人槡人妻人 | 老司机福利在视频在ae8 | 天天躁夜夜踩很很踩2022 | 国产三级在线精品男人的天堂 | 久久免费高清 | 老色哥网站 | 久久综久久美利坚合众国 | 久久精品男人影院 | 午夜在线观看免费完整直播网 | 东京热一本无码av | 国产精品一区二区制服丝袜 | 国产亚洲精品久久久999密臂 | 最近日本免费观看MV免费 | 欧美兽交YOYO | 捆绑白丝粉色JK震动捧喷白浆 | 久久yy99re66| 日本50人群体交乱 | 快播h网站 | 亚洲精品拍拍央视网出文 | www黄色com|