一、测试oracle是否成功安装
二、oracle环境变量配置
四、测试环境变量是否生效
再次输入sqlplus,可以看到相关的输出。如下
五、启动数据库
报错:command not found,如果oracle安装正确,说明环境变量没配或者没有生效。
bash-4.1$ sqlplus
bash: sqlplus: command not found
二、oracle环境变量配置
bash-4.1$ vi .bash_profile
#.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startupprograms
export ORACLE_BASE=/home/oracle/app/oracle/product
export ORACLE_HOME=$ORACLE_BASE/11.2.0/dbhome_5
export ORACLE_SID=zjvta
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin:/usr/lib
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH
#export PATH
~
三、使环境变量立即生效(或则重启Linux)
bash-4.1$ source .bash_profile
四、测试环境变量是否生效
再次输入sqlplus,可以看到相关的输出。如下
bash-4.1$ sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 26 01:51:45 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
五、启动数据库
bash-4.1$ sqlplus /nolog
SQL> conn /as sysdba
SQL> exit
bash-4.1$ lsnrctl start
启动成功,出现启动成功提示。