Professional Documents
Culture Documents
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 ci oracle l log vo bng user oracle.)
Cc RPM c th tm thy trong CD ci Linux, hay search trn google Ti copy cc RPMs vo ci th mc shares ca VMWare, chy cc 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/ci mi: rpm -ivh package-file-name.rpm to update/nng cp: rpm -Uvh package-file-name xem info package c trong my: rpm -qi package-name xem info package file: rpm -qpi package-file-name
Ci Oracle11
Login vo Linux vi user oracle. Kim tra(echo) li xem coi cc Environment Vars c set, export ko? Run: # cd /mnt/oracle11g/ # ./runInstaller Step 1: Select Installation Method: -Chn Basic Installation -Global Database Name: EDU11 -Database Password -Nhng ci cn li default mc nh -Click Next note: Enterprise cn 3.3GB + DB 1.48GB = 4.8GB Chn Basic Install cho d. Ai rnh th chn Advanced. Ti chn Basic Install. Khe!
Step 3: Product-Specific Prereqisite Checks -Step ny, ai chun b ko tt s b bo li, warning! -Ai b th copy text trong ci textbox ra xem, cancel install, tm ch no c ch "failed"! fix li, ri runInstaller li. -Ti b 1 li l RAM ch c 512MB, nn click Next c!
Step 5: Oracle Configuration Manager Registration -Ngho nh ti th lm g c Customer Identification Number CSI, click next!
Step 9: Execute Configuration scripts Step ny phi chy 2 ci scrips bng user root. -Chut phi m new Terminal -G: $ su - root # /u01/app/oraInventory/orainstRoot.sh # /u01/app/oracle/product/11.1.0/db_1/root.sh Khi b hi: Enter the full pathname of the local direcory, th nhn Enter... # exit <- quay v oracle #exit <- close terminal -tip tc vi Oracle Install dialog box: click OK Step 10: End of Installation click exit and Yes! xong, finish!
T ng Start v Shutdown
Login vo h thng bng user root: 1. chnh sa file /etc/oratab, thay i k t cui cng thnh Y (mc nh l N). EDU11:/u01/app/oracle/product/11.1.0/db_1:Y 2. chnh sa file $ORACLE_HOME/bin/dbstart v thay i gi tr cho ORACLE_HOME_LISTNER (dng 82): ORACLE_HOME_LISTNER=$ORACLE_HOME 3. chnh sa file $ORACLE_HOME/bin/dbshut v thay i gi tr cho ORACLE_HOME_LISTNER (dng 53): ORACLE_HOME_LISTNER=$ORACLE_HOME 4. To file c tn l oracle trong th mc /etc/init.d/ vi ni dung nh sau: #!/bin/bash # # oracle Init file for starting and stopping # Oracle Database. Script is valid for 10g and 11g versions. # # chkconfig: 35 80 30 # description: Oracle Database 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 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. To file c tn l oraemctl trong th mc /etc/init.d/ vi ni 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" ;;
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