1.確保RPM開發包,使用下面命令查看是否已安裝這些包
rpm -q gcc cpp compat-libstdc++ glibc-devel glibc-kernheaders binutils
2.進行解壓
zcat Linux9i_Disk1.cpio.gz | cpio -idmv
zcat Linux9i_Disk2.cpio.gz | cpio -idmv
zcat Linux9i_Disk3.cpio.gz | cpio -idmv
3.設置內核參數
vi /etc/sysctl.conf,加入下面參數
kernel.shmmax=4294967295 內存512M
計算方法為:kernel:shmmax=1024*1024*RAM(M)/2
執行sysctl -p生效
4.建立數據目錄和用戶
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
5.vi .bash_profile 設置變量
export LD_ASSUME_KERNEL=2.4.1
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2.0
export ORACLE_SID=ora9i
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME.network/admin
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/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