


The following column centos tutorial will introduce to you the installation method of CentOS 7 OCI 8. I hope it will be helpful to friends in need!
centos7 oci8 installation
1. Download the oracle file: it must be consistent with the connected Oracle database, for example: the connected Oracle is 11.0.2.4, download The file needs to be version 11.
The following uses Oracle 11.0.2.4 as an example:
Download address: https://www.oracle.com/cn/database/technologies/instant-client/linux -x86-64-downloads.html
Downloaded file:
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. Install oracle-instantclien
2.1 Enter the /usr/local/src/ directory and copy all the downloaded rpms to the directory
[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 Installation package
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 Confirm that the installation is complete
[root@localhost oracle]# ls11.1[root@localhost oracle]# [root@localhost oracle]# [root@localhost oracle]# pwd/usr/lib/oracle[root@localhost oracle]#
3. Add the oci extension of php
3.1. Enter compilation package
[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 Introductionvim /usr/local/php740/lib/php.ini
下面每种都可
extension=/usr/local/php740/lib/php/extensions/no-debug-non-zts-20190902/oci8.so
extenstion=oci8.so
The above is the detailed content of An article explaining in detail the installation of CentOS 7 OCI 8. For more information, please follow other related articles on the PHP Chinese website!

This article explains how to restart a CentOS server using the command-line reboot command. It emphasizes the importance of saving data and gracefully shutting down applications before using sudo reboot to avoid data loss. Potential risks, includin

This guide details methods for restarting network services in CentOS 8. It compares using systemctl (recommended for reliability) with ifdown/ifup (faster, less robust). Troubleshooting steps for network outages are also provided, covering connecti

This article explains CentOS server reboot commands. It focuses on reboot for immediate restarts and shutdown -r for scheduled reboots, highlighting the differences and best practices for each. The main issue is providing clear instructions and con

This article discusses the discontinuation of CentOS and its replacement by CentOS Stream. It details how to find information, downloads, and verify the integrity of CentOS Stream ISOs, now primarily hosted on the Red Hat website. Community support

The article explains how to configure log rotation in CentOS using logrotate, detailing installation, configuration, and benefits like disk space management and security.

The article discusses using Logical Volume Management (LVM) in CentOS for efficient storage management, detailing steps for setup, extension, and backup/restore processes, and highlighting LVM's advantages over traditional partitioning.

Article discusses installation, configuration, and troubleshooting of MySQL/MariaDB on CentOS, including system requirements and security measures.(159 characters)

This guide details safe shutdown and reboot methods for CentOS 7 servers. It emphasizes using the shutdown command for its flexibility and ability to schedule restarts, contrasting it with the less-flexible reboot and halt commands. Safe practices


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
