intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Install Oracle 11 on Linux

Chia sẻ: Gcs Vpn | Ngày: | Loại File: DOC | Số trang:7

63
lượt xem
7
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Cài Oracle cần như sau: 1. Tạo 2 Groups: đặc tên là oinstall và dba 2. Tạo 1 User account tên là: oracle (note: Đúng ra đặt là Tí Tèo gì củng được, nhưng conventional, thấy thiên hạ cài Oracle hay đặt là vậy.) Login as root, run: � # groupadd oinstall # groupadd dba # useradd -m -g oinstall -G dba oracle Tạo password cho user: oracle # passwd oracle Changing password for user oracle. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. note: UNIX password đòi phải có số, chử, dấu đặc biệt! Một UNIX pasword thí dụ như là: P@ssw0rd...

Chủ đề:
Lưu

Nội dung Text: Install Oracle 11 on Linux

  1. Install Oracle 11 on Linux TUESDAY, 13. NOVEMBER 2007, 08:52:34 LINUX Cài đặt Oracle 11gR1 trên hệ điều hành Enterprise Linux 5 (Step-by-step) Create Groups and User Account Cài Oracle cần như sau: 1. Tạo 2 Groups: đặc tên là oinstall và dba 2. Tạo 1 User account tên là: oracle (note: Đúng ra đặt là Tí Tèo gì củng được, nhưng conventional, th ấy thiên h ạ cài Oracle hay đ ặt là v ậy.) Login as root, run: � # groupadd oinstall # groupadd dba # useradd -m -g oinstall -G dba oracle Tạo password cho user: oracle # passwd oracle Changing password for user oracle. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. note: UNIX password đòi phải có số, chử, dấu đặc biệt! Một UNIX pasword thí dụ như là: P@ssw0rd Kiểm tra lại, run: # id oracle Create directories, group, user oracle 1. Tạo 1 thư mục /u01/app 2. Trao quyền owner cho user oracle 3. Trao quyền read, write mọi thứ trong /u01/app cho t ất cả! Run commands: # mkdir -p /u01/app # chown -R oracle:oinstall /u01/app # chmod -R 775 /u01/app (note: Tại sap phải đặc tên mấy cái đường dẩn lằn nhằn như th ế? Đúng ra thì củng chẳng bắt buột. Nhưng mà Oracle recomment thế đ ấy. Có cả Document về oracle name convention) Set Enviroment for user oracle Mở file /home/oracle/.bash_profile thêm vào: #environment for oracle ORACLE_BASE=/u01/app/oracle
  2. ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1 ORACLE_SID=EDU11 PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH CLASSPATH (note: Khi cài oracle là log vào bằng user oracle.) Kiểm tra, upgrade RPMs: Bước nầy hơi rất rối tí. Oracle1 đòi hỏi các RPM phải có tối thiểu các Version sau: make-3.81 binutils-2.17.50.0.6 gcc-4.1.1 libaio-0.3.106 libaio-devel-0.3.106 libstdc++-4.1.1 elfutils-libelf-devel-0.125 sysstat-7.0.0 compat-libstdc++-33-3.2.3 libgcc-4.1.1 libstdc++-devel-4.1.1 unixODBC-2.2.11 unixODBC-devel-2.2.11 Run command sau để xem mình đang có RPM Version nào? # rpm -q make binutils gcc libaio libaio-devel libstdc++ elfutils-libelf-devel sysstat compat-libstdc++ libgcc libstdc++-devel unixODBC-2.2.11 unixODBC-devel (..gỏ trong 1 line) Kết quả: make-3.81-1.1 binutils-2.17.50.0.6-2.el5 gcc-4.1.1-52.el5 libaio-0.3.106-3.2 package libaio-devel is not installed libstdc++-4.1.1-52.el5 elfutils-libelf-devel-0.125-3.el5 sysstat-7.0.0-3.el5 package compat-libstdc++ is not installed libgcc-4.1.1-52.el5 libstdc++-devel-4.1.1-52.el5 package unixODBC is not installed package unixODBC-devel is not installed So sánh các RPMs. Nêu thiếu cái nào thì phải cài mới vào. Version củ thì phải upgrade lên!
  3. Các RPM có thể tìm thấy trong CD cài Linux, hay search trên google Tôi copy các RPMs vào cái thư mục shares của VMWare, chạy các command sau: # rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm # rpm -ivh unixODBC-2.2.11-7.1.i386.rpm # rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm # rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm note: to install/cài mới: rpm -ivh package-file-name.rpm to update/nâng cấp: rpm -Uvh package-file-name xem info package có trong máy: rpm -qi package-name xem info package file: rpm -qpi package-file-name Config Linux Kernel Parameters Dùng vi hay gedit(cái nầy giống notepad!) thêm các lines sau vào file /etc/sysctl.conf #This lines is for Oracle Installation kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6553600 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 4194304 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 262144 Check lại, run: # sysctl -p Setting Shell Limits for user oracle todo: 1. Thêm vào file /etc/security/limits.conf các dòng sau: (trên cái line # End of file) oracle soft nofile 63566 oracle hard nofile 63536 oracle soft nproc 16384 oracle hard nproc 16384 (note: soft limit = hard limit setting) 2. Verify file /etc/pam.d/system-auth, check xem có 2 lines sau: session required /lib/security/pam_limits.so session required pam_limits.so
  4. 3. Disable SELinux edit /etc/selinux/config file, change line SELINUX=disabled Cài Oracle11 Login vào Linux với user oracle. Kiểm tra(echo) lại xem coi các Environment Vars có set, export ko? Run: # cd /mnt/oracle11g/ # ./runInstaller Step 1: Select Installation Method: -Chọn Basic Installation -Global Database Name: EDU11 -Database Password -Nhưng cái còn lại để default mặc định -Click Next note: Enterprise cần 3.3GB + DB 1.48GB = 4.8GB Chọn Basic Install cho dể. Ai rành thì chọn Advanced. Tôi chọn Basic Install. Khỏe! Step 2: Specify Inventory directory and crendentials -Click next Step 3: Product-Specific Prereqisite Checks -Step nầy, ai chuẩn bị ko tốt sẻ bị báo lổi, warning! -Ai bị thì copy text trong cái textbox ra xem, cancel install, tìm chổ nào có chử "failed"! fix lổi, rồi runInstaller lại. -Tôi bị 1 lổi là RAM chỉ có 512MB, nên click Next được! Step 4: Warning: Product-Specific Prereqisite Checks -Click yes Step 5: Oracle Configuration Manager Registration -Nghèo như tôi thì làm gì có Customer Identification Number CSI, click next! Step 6: Summary -click install
  5. Step 7: Install run Oracle beginn the install..wait... Step 8: Database Configuration Assistant -click ok Step 9: Execute Configuration scripts Step nầy phải chạy 2 cái scrips bằng user root. -Chuột phải mở new Terminal -Gỏ: $ su - root # /u01/app/oraInventory/orainstRoot.sh # /u01/app/oracle/product/11.1.0/db_1/root.sh Khi bị hỏi: Enter the full pathname of the local direcory, thì nh ấn Enter... # exit
  6. # Source function library. . /etc/rc.d/init.d/functions ORACLE_OWNER="oracle" ORACLE_HOME="/u01/app/oracle/product/11.1.0/db_1" case "$1" in start) echo -n $"Starting Oracle DB:" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart" echo "OK" ;; stop) echo -n $"Stopping Oracle DB:" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut" echo "OK" ;; *) echo $"Usage: $0 {start|stop}" esac Sau đó: chmod 750 /etc/init.d/oracle chkconfig --add oracle --level 0356 5. Tạo file có tên là oraemctl trong thư mục /etc/init.d/ với nội dung nh ư sau: #!/bin/bash # # oraemctl Starting and stopping Oracle Enterprise Manager Database Control. # Script is valid for 10g and 11g versions. # # chkconfig: 35 80 30 # description: Enterprise Manager DB Control startup script # Source function library. . /etc/rc.d/init.d/functions ORACLE_OWNER="oracle" ORACLE_HOME="/u01/app/oracle/product/11.1.0/db_1" case "$1" in start) echo -n $"Starting Oracle EM DB Console:" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole" echo "OK" ;;
  7. stop) echo -n $"Stopping Oracle EM DB Console:" su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole" echo "OK" ;; *) echo $"Usage: $0 {start|stop}" esac Sau đó: chmod 750 /etc/init.d/oraemctl chkconfig --add oraemctl --level 0356
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2