站長資訊網(wǎng)
最全最豐富的資訊網(wǎng)站

一文詳解關(guān)于CentOS 7 OCI 8 的安裝

下面由centos教程欄目給大家介紹關(guān)于CentOS 7 OCI 8 的安裝方法,希望對(duì)需要的朋友有所幫助!

centos7 oci8安裝

1.下載oracle文件:必須和連接的oracle數(shù)據(jù)庫一致,如:連接的是11.0.2.4的oracle,下載的文件就需要是11版本的。
以下的用11.0.2.4的oracle舉例操作:

下載地址:https://www.oracle.com/cn/database/technologies/instant-client/linux-x86-64-downloads.html

下載的文件:

1.oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm2.oracle-instantclient11.1-devel-11.1.0.7.0-1.x86_64.rpm3.oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm

2.安裝oracle-instantclien

2.1進(jìn)入到/usr/local/src/目錄,把下載好的rpm全部拷貝到該目錄下

[root@localhost src]# pwd/usr/local/src[root@localhost src]# ls oci8                                                    oracle-instantclient11.1-devel-11.1.0.7.0-1.x86_64.rpm oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm  oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm

2.2安裝包

rpm -Uvh oracle-instantclient11.1-devel-11.1.0.7.0-1.x86_64.rpm rpm -Uvh oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm rpm -Uvh oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.x86_64.rpm

2.3確認(rèn)安裝完成

[root@localhost oracle]# ls11.1[root@localhost oracle]#  [root@localhost oracle]#  [root@localhost oracle]# pwd/usr/lib/oracle[root@localhost oracle]#

3.添加php的oci擴(kuò)展

3.1.進(jìn)入編譯包

[root@localhost oci8]# pwd/var/www/html/php-7.4.0/ext/oci8[root@localhost oci8]#

3.2./usr/local/php740/bin/phpize

[root@localhost oci8]# /usr/local/php740/bin/phpize Configuring for:PHP Api Version:         20190902Zend Module Api No:      20190902Zend Extension Api No:   320190902[root@localhost oci8]#

3.3 ./configure

[root@localhost oci8]# ./configure --with-php-config=/usr/local/php740/bin/php-config --with-oci8=shared,instantclient,/usr/lib/oracle/11.1/client64/lib checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -Echecking for a sed that does not truncate output... /bin/sed checking for pkg-config... /bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out

3.4 make

[root@localhost oci8]# make && make installPATH="$PATH:/sbin" ldconfig -n /var/www/html/php-7.4.0/ext/oci8/modules----------------------------------------------------------------------Libraries have been installed in:  /var/www/html/php-7.4.0/ext/oci8/modules If you ever happen to want to link against installed librariesin 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 formore information, such as the ld(1) and ld.so(8) manual pages.----------------------------------------------------------------------Build complete.Don't forget to run 'make test'.Installing shared extensions:     /usr/local/php740/lib/php/extensions/no-debug-non-zts-20190902/[root@localhost oci8]#   [root@localhost oci8]# cd /usr/local/php740/lib/php/extensions/no-debug-non-zts-20190902/[root@localhost no-debug-non-zts-20190902]# ls gd.so  libzip.so  mongodb.so  oci8.so  opcache.a  opcache.so  redis.so  swoole.so  xdebug.so  zip.so

4.1 引入

vim /usr/local/php740/lib/php.ini 下面每種都可 extension=/usr/local/php740/lib/php/extensions/no-debug-non-zts-20190902/oci8.so extenstion=oci8.so

贊(0)
分享到: 更多 (0)
網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)
亚洲精品美女在线观看播放| 香蕉在线精品视频在线观看2| 人人妻人人澡人人爽人人精品浪潮 | 91精品成人福利在线播放| 无码日韩精品一区二区三区免费| 亚洲精品无码国产| 国产亚洲精品免费视频播放| 国产高清一级毛片精品| 欧洲精品一区二区三区在线观看| 国产亚洲日韩一区二区三区| 四虎永久在线精品免费影视 | 久久精品国产精品亚洲艾草网美妙 | 日韩AV无码中文无码不卡电影| 国产精品制服丝袜| 精品91一区二区三区| 依依成人精品视频在线观看| 国产精品美女乱子伦高| 老牛精品亚洲成av人片| 夜色www国产精品资源站| 亚洲精品~无码抽插| 中国大陆精品视频XXXX| 国产午夜精品一本在线观看 | 老司机性色福利精品视频| 亚洲国产精品一区第二页| 国产综合精品女在线观看| 国产精品无码A∨精品影院| 日韩精品无码人成视频手机| assbbwbbwbbwbbwbw精品| 最新精品亚洲成a人在线观看| 精品精品国产国产| 久久精品国产色蜜蜜麻豆| 国产在线精品福利大全| 在线精品动漫一区二区无广告| 人与狗精品AA毛片| 亚洲国产另类久久久精品小说| 亚洲精品国精品久久99热一| 亚洲色精品88色婷婷七月丁香| 亚洲人成精品久久久久| 国产亚洲欧洲精品| 亚洲av无码乱码国产精品| 久久精品国产亚洲AV麻豆~|