1創建Oracle用戶帳號和安裝目錄
在shell下,作為root
groupadd dba
groupadd oinstall
useradd –g oinstall –G dba oracle
passwd oracle
mkdir /opt/oracle
mkdir /opt/oracle/product
mkdir /opt/oracle/product/9.2.0
chown –R oracle.oinstall /opt/oracle
mkdir /var/opt/oracle
chown oracle.dba /var/opt/oracle
chmod 755 /var/opt/oracle
2設置環境變量
編輯/home/oracle/.bash_profile文件,添加下列行
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2.0
export ORACLE_SID=lichuanhua
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_DATE_FORMAT=YYYY-MM-DD
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME.network/jlib
export CLASSPATH
export DISPLAY=192.168.1.88:0.0