5.修改LINUX中的环境变量
修改Oracle的.bash_profile,示例如下:oracle_sid之类要提前规划好。
[root@oel-01 oracle]# pwd
/home/oracle
[root@oel-01 oracle]# cat .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/bin
#after is add by admin.
#
ORACLE_SID=bys001
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
PATH=$ORACLE_HOME/bin:$PATH:/user/sbin
export ORACLE_BASE ORACLE_SID ORACLE_HOMEPATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib/
exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
使用ORACLE用户验证下
[oracle@oel-01 ~]$ source .bash_profile
[oracle@oel-01 ~]$ sqlplus
rlwrap: Cannot execute sqlplus: No suchfile or directory
[oracle@oel-01 ~]$ rman
rlwrap: Cannot execute rman: No such fileor directory
说明:其它的内核参数等可以不修改,在安装时检查系统环境时可以使用ORACLE给出的脚本进行修改,我这里就用的这种方法。
6.把ORACLE DATABASE软件上传并解压
我这里使用的是SSH Secure Shell.这个软件里的传文件功能
注意要用ORACLE用户上传并解压文件,避免文件权限问题。
[oracle@oel-01 u01]$ ls
app linux_11gR2_database_2of2.zip
linux_11gR2_database_1of2.zip
[oracle@oel-01 u01]$ du -sh /u01/linux*
1.2G /u01/linux_11gR2_database_1of2.zip
951M /u01/linux_11gR2_database_2of2.zip
[oracle@oel-01 u01]$ unziplinux_11gR2_database_1of2.zip
[oracle@oel-01 u01]$ unziplinux_11gR2_database_2of2.zip
解压后删除原压缩文件节省磁盘空间
[oracle@oel-01 u01]$ du -sh database/
2.3G database/
[oracle@oel-01 u01]$ rm -rf linux_11gR2_*
[oracle@oel-01 u01]$ ls
app database
[oracle@oel-01 u01]$
到此,关机,做一次快照。安装前准备工作完成。
