码迷,mamicode.com
首页 > 数据库 > 详细

源码安装cx_Oracle(适合离线环境)

时间:2017-12-08 14:19:40      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:.so   tran   ++   nts   自动   cli   math   tool   one   

cd ~/tools

unzip instantclient-basic-linux.x64-12.2.0.1.0.zip

mv instantclient_12_2 /opt/

export ORACLE_HOME=/opt/instantclient_12_2/

mv instantclient-sdk-linux.x64-12.2.0.1.0.zip /opt

cd /opt

unzip instantclient-sdk-linux.x64-12.2.0.1.0.zip

这里解压会自动解压到/opt/instantclient_12_2/里

export C_INCLUDE_PATH=/opt/instantclient_12_2/sdk/include/

export LD_LIBRARY_PATH=/opt/instantclient_12_2/

ln -s /opt/instantclient_12_2/libclntsh.so.12.1 /opt/instantclient_12_2/libclntsh.so

cd ~/tools/rpmbao

for hello in cpp-4.8.5-16.el7_4.1.x86_64.rpm libgcc-4.8.5-16.el7_4.1.i686.rpm libquadmath-4.8.5-16.el7_4.1.x86_64.rpm libstdc++-devel-4.8.5-16.el7_4.1.x86_64.rpm gcc-4.8.5-16.el7_4.1.x86_64.rpm libgcc-4.8.5-16.el7_4.1.x86_64.rpm libquadmath-devel-4.8.5-16.el7_4.1.x86_64.rpm python-devel-2.7.5-58.el7.x86_64.rpm gcc-c++-4.8.5-16.el7_4.1.x86_64.rpm libgfortran-4.8.5-16.el7_4.1.x86_64.rpm libstdc++-4.8.5-16.el7_4.1.i686.rpm gcc-gfortran-4.8.5-16.el7_4.1.x86_64.rpm libgomp-4.8.5-16.el7_4.1.x86_64.rpm libstdc++-4.8.5-16.el7_4.1.x86_64.rpm;
当出现">"这个符号时,再敲"do rpm -ivh $hello ; "
do rpm -ivh $hello ;
当出现">"这个符号时,再敲"done"
done

echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/instantclient_12_2/" >> ~/.bashrc

source ~/.bashrc

cd ~/tools/cx_Oracle-6.0.3

python setup.py install

源码安装cx_Oracle(适合离线环境)

标签:.so   tran   ++   nts   自动   cli   math   tool   one   

原文地址:http://www.cnblogs.com/liangweixiong/p/8004478.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!