lamp一键安装包:
https://lnmp.org/install.html
在CentOS 6.7 64位安装PHP的PDO_OCI扩展 Installing PDO_OCI extension on CentOS 6.7 64bit:
http://www.cnblogs.com/jpdoutop/p/Install-PDO_OCI-extension-On-Linux-64bit.html
CENTOS6下PHP5.6的安装 oci8 pdo-oci:
http://blog.csdn.net/ezsky/article/details/49766463
所有的附件信息:链接:https://pan.baidu.com/s/1PPA63CAKMRGEkxesy5c1sQ 密码:r9kn
安装Oraclecient
安装rpm包: rpm -ivh oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm rpm -ivh oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm 以下几条命令仅供参考: rpm -qa | grep oracle //查看oracle是否安装 rpm -qa //查看所有已安装的人rpm包 rpm -e oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm //卸载已安装的rpm包 rpm -ivh --force oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm //强制安装rpm包 配置: #vi /etc/ld.so.conf /usr/lib/oracle/12.1/client64/lib/ //加入此行,保存退出
定义环境变量
vi /etc/profile 加入以下几行: export ORACLE_HOME=/usr/lib/oracle/12.1/client64/ export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64:$LD_LIBRARY_PATH export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
创建相关目录和软连接:
cd /usr/include/oracle mkdir 11.2 cd /usr/lib/oracle mkdir 11.2 ln -s /usr/include/oracle/12.1/client64 /usr/include/oracle/11.2/client ln -s /usr/lib/oracle/12.1/client64 /usr/lib/oracle/11.2/client
安装oci8: phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-oci8=shared,instantclient,/usr,11.2 make make install 在php.ini中加入 extension=oci8.so 安装pdo_oci: phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-oci=instantclient,/usr,11.2 make make install 在php.ini中加入 extension=pdo_oci.so