Thứ Hai, 19 tháng 4, 2021

Cài đặt Oracle Client trên Linux

1. Cài đặt tự động với Yum/RPM

# (Optional) Lấy  repository mới nhất
cd /etc/yum.repos.d
rm -f public-yum-ol7.repo
wget https://yum.oracle.com/public-yum-ol7.repo

# Bật  instant client repository.
yum install -y yum-utils
yum-config-manager --enable ol7_oracle_instantclient

# (Optional) Kiểm tra gói xem có chưa 
yum list oracle-instantclient*

# Cài đặt gói cơ bản và sqlplus.
yum install -y oracle-instantclient18.3-basic oracle-instantclient18.3-sqlplus

Sau khi cài đặt test lại: 

export CLIENT_HOME=/usr/lib/oracle/18.3/client64
export LD_LIBRARY_PATH=$CLIENT_HOME/lib
export PATH=$PATH:$CLIENT_HOME/bin

sqlplus /nolog

Nếu dùng RHEL hay OS Linux khác có thể down gói  RPMs từ yum.oracle.com và cài đặt

2. Cài đặt thủ công

Ưu điểm so với cài đặt bằng YUM:

  • Không cần quyền root để cài đặt hay update 
  • Chủ động thiết lập vị trí lưu Oracle Client được cài đặt

Download

Download gói Oracle Client cho  Linux x86-64 specific downloads:

 Các file sẽ download được:

  • instantclient-basic-linux.x64-11.2.0.4.0.zip
  • instantclient-sqlplus-linux.x64-11.2.0.4.0.zip

Cài đặt

$ mkdir ~/software
$ cd ~/software
$ unzip /tmp/instantclient-basic-linux.x64-11.2.0.4.0.zip
$ unzip /tmp/instantclient-sqlplus-linux.x64-11.2.0.4.0.zip 

Sử dụng

Khi sử dụng Instance Client, cần đảm bảo biến môi trường LD_LIBRARY_PATH environment trỏ vào thư mục vừa unzip và đặt vào biến môi trường PATH:

$ export LD_LIBRARY_PATH=/home/tomcat/software/instantclient_11_2
$ export PATH=$PATH:$LD_LIBRARY_PATH

$ sqlplus scott/tiger@//myhost.example.com:1521/myservice
=============================
* KHOÁ HỌC ORACLE DATABASE A-Z ENTERPRISE trực tiếp từ tôi giúp bạn bước đầu trở thành những chuyên gia DBA, đủ kinh nghiệm đi thi chứng chỉ OA/OCP, đặc biệt là rất nhiều kinh nghiệm, bí kíp thực chiến trên các hệ thống Core tại VN chỉ sau 1 khoá học.
* CÁCH ĐĂNG KÝ: Gõ (.) hoặc để lại số điện thoại hoặc inbox https://m.me/tranvanbinh.vn hoặc Hotline/Zalo 090.29.12.888
* Chi tiết tham khảo:
https://bit.ly/oaz_w
hoặc
https://bit.ly/oaz_fp
=============================
KẾT NỐI VỚI CHUYÊN GIA TRẦN VĂN BÌNH:
📧 Mail: binhoracle@gmail.com
☎️ Mobile: 0902912888
⚡️ Skype: tranbinh48ca
👨 Facebook: https://www.facebook.com/BinhOracleMaster
👨 Inbox Messenger: https://m.me/101036604657441 (profile)
👨 Fanpage: https://www.facebook.com/tranvanbinh.vn
👨 Inbox Fanpage: https://m.me/tranvanbinh.vn
👨👩 Group FB: https://www.facebook.com/groups/DBAVietNam
👨 Website: https://www.tranvanbinh.vn
👨 Blogger: https://tranvanbinhmaster.blogspot.com
🎬 Youtube: http://bit.ly/ytb_binhoraclemaster
👨 Tiktok: https://www.tiktok.com/@binhoraclemaster?lang=vi
👨 Linkin: https://www.linkedin.com/in/binhoracle
👨 Twitter: https://twitter.com/binhoracle
👨 Địa chỉ: Tòa nhà Sun Square - 21 Lê Đức Thọ - Phường Mỹ Đình 1 - Quận Nam Từ Liêm - TP.Hà Nội

=============================
học oracle database, Tự học Oracle, Tài liệu Oracle 12c tiếng Việt, Hướng dẫn sử dụng Oracle Database, Oracle SQL cơ bản, Oracle SQL là gì, Khóa học Oracle Hà Nội, Học chứng chỉ Oracle ở đầu, Khóa học Oracle online,khóa học pl/sql, học dba, học dba ở việt nam, khóa học dba, khóa học dba sql, tài liệu học dba oracle, Khóa học Oracle online, học oracle sql, học oracle ở đâu tphcm, học oracle bắt đầu từ đâu, học oracle ở hà nội, oracle database tutorial, oracle database 12c, oracle database là gì, oracle database 11g, oracle download, oracle database 19c, oracle dba tutorial, oracle tunning, sql tunning , oracle 12c, oracle dataguard, oracle goldengate, oracle weblogic, oracle exadata, hoc solaris, hoc linux, hoc aix

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master