下面由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已停止维护,转向CentOSStream,不再提供适合生产环境的版本。影响包括系统迁移和企业重新评估Linux策略。替代方案有:1.迁移到RHEL,2.转向Ubuntu或Debian,3.考虑CentOSStream作为测试平台,4.使用AlmaLinux或RockyLinux。建议尽早制定迁移计划,评估现有系统和团队需求。

使用Ansible可以实现CentOS的自动化管理。具体步骤包括:1)编写playbook来定义任务,如安装和配置Apache;2)通过SSH协议执行playbook,确保系统配置的一致性;3)使用条件判断和循环功能来处理复杂场景;4)优化性能和遵循最佳实践,如使用异步任务和优化inventory文件。

CentOS面试常见问题及解答包括:1.使用yum或dnf命令安装软件包,如sudoyuminstallnginx。2.通过useradd和groupadd命令管理用户和组,如sudouseradd-m-s/bin/bashnewuser。3.使用firewalld配置防火墙,如sudofirewall-cmd--permanent--add-service=http。4.设置自动更新使用yum-cron,如sudoyuminstallyum-cron并配置apply_updates=yes。

在CentOS系统中,如何诊断和解决常见问题?首先,检查启动日志解决系统启动失败;其次,检查网络配置文件解决网络问题;最后,使用Yum命令解决软件包管理问题。通过这些步骤,你可以有效地诊断和解决CentOS系统中的常见问题。

CentOS服务器安全加固可以通过以下步骤实现:1.保持系统软件更新,使用“sudoyumupdate-y”命令;2.禁用不必要的服务,如“sudosystemctldisablecups&&sudosystemctlstopcups”;3.配置SELinux为强制模式,使用“sudosetenforce1&&sudosed-i's/SELINUX=permissive/SELINUX=enforcing/g'/etc/selinux/config”命令;4.定期

CentOS的高级命令行管理技巧包括:1.使用systemctl管理系统服务,2.使用top监控系统资源,3.使用yum管理软件包,4.使用find和xargs批量处理文件,5.使用rsync优化文件复制。这些技巧能提高工作效率,解决常见问题,并优化系统性能。

在CentOS中,如何管理用户账户、权限和服务?1.使用useradd命令创建用户,2.通过usermod和groupmod命令管理用户权限,3.使用systemd管理服务,如systemctlstart/stop/status命令。通过这些步骤,可以高效管理CentOS服务器,确保其安全和高效运行。

在CentOS中进行备份和恢复的步骤包括:1.使用tar命令进行基本备份和恢复,如tar-czvf/backup/home_backup.tar.gz/home备份/home目录;2.使用rsync进行增量备份和恢复,如rsync-avz/home//backup/home_backup/进行首次备份。这些方法确保数据的完整性和可用性,适用于不同场景的需求。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

mPDF
mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

SublimeText3 Linux新版
SublimeText3 Linux最新版

Dreamweaver Mac版
视觉化网页开发工具

SublimeText3 英文版
推荐:为Win版本,支持代码提示!

DVWA
Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中