以下由centos教學專欄跟大家介紹關於CentOS 7 OCI 8 的安裝方法,希望對需要的朋友有幫助!
centos7 oci8安裝
1.下載oracle檔案:必須和連接的oracle資料庫一致,如:連接的是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進入到/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確認安裝完成
[root@localhost oracle]# ls11.1[root@localhost oracle]# [root@localhost oracle]# [root@localhost oracle]# pwd/usr/lib/oracle[root@localhost oracle]#
#3.新增php的oci擴充
3.1.進入編譯套件
[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
以上是一文詳解關於CentOS 7 OCI 8 的安裝的詳細內容。更多資訊請關注PHP中文網其他相關文章!

CentOS的替代方案包括UbuntuServer、Debian、Fedora、RockyLinux和AlmaLinux。 1)UbuntuServer適合基本操作,如更新軟件包和配置網絡。 2)Debian適用於高級用法,如使用LXC管理容器。 3)RockyLinux可通過調整內核參數優化性能。

CentOS 關機命令為 shutdown,語法為 shutdown [選項] 時間 [信息]。選項包括:-h 立即停止系統;-P 關機後關電源;-r 重新啟動;-t 等待時間。時間可指定為立即 (now)、分鐘數 ( minutes) 或特定時間 (hh:mm)。可添加信息在系統消息中顯示。

CentOS 和 Ubuntu 的關鍵差異在於:起源(CentOS 源自 Red Hat,面向企業;Ubuntu 源自 Debian,面向個人)、包管理(CentOS 使用 yum,注重穩定;Ubuntu 使用 apt,更新頻率高)、支持週期(CentOS 提供 10 年支持,Ubuntu 提供 5 年 LTS 支持)、社區支持(CentOS 側重穩定,Ubuntu 提供廣泛教程和文檔)、用途(CentOS 偏向服務器,Ubuntu 適用於服務器和桌面),其他差異包括安裝精簡度(CentOS 精

CentOS 中配置 IP 地址的步驟:查看當前網絡配置:ip addr編輯網絡配置文件:sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0更改 IP 地址:編輯 IPADDR= 行更改子網掩碼和網關(可選):編輯 NETMASK= 和 GATEWAY= 行重啟網絡服務:sudo systemctl restart network驗證 IP 地址:ip addr

CentOS 安裝步驟:下載 ISO 映像並刻錄可引導媒體;啟動並選擇安裝源;選擇語言和鍵盤佈局;配置網絡;分區硬盤;設置系統時鐘;創建 root 用戶;選擇軟件包;開始安裝;安裝完成後重啟並從硬盤啟動。

重啟 SSH 服務的命令為:systemctl restart sshd。步驟詳解:1. 訪問終端並連接到服務器;2. 輸入命令:systemctl restart sshd;3. 驗證服務狀態:systemctl status sshd。

在 CentOS 8 中重啟網絡需執行以下步驟:停止網絡服務(NetworkManager)重新加載網絡模塊(r8169)啟動網絡服務(NetworkManager)檢查網絡狀態(通過 ping 8.8.8.8)

重啟 CentOS 7 可使用 reboot 命令。步驟如下:打開終端窗口並輸入 reboot 命令。確認重啟提示。系統將重啟,期間會出現引導菜單。重啟完成後,使用憑據登錄。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

Atom編輯器mac版下載
最受歡迎的的開源編輯器

記事本++7.3.1
好用且免費的程式碼編輯器

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

WebStorm Mac版
好用的JavaScript開發工具