bash: sqlplus: command not found 解决方法
2016-04-09 20:20
2196 查看
环境变量已经配好,但是仍报错:
[oracle@dg1 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export EDITOR=vi
export ORACLE_SID=dg1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export PATH=$ORACLE_HOME/bin:$PATH
umask 022
解决方法:
[oracle@dg1 ~]$ sqlplus /nolog
bash: sqlplus: command not found
[oracle@dg1 ~]$ ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
ln: creating symbolic link `/usr/bin/sqlplus' to `/bin/sqlplus': Permission deni ed
[oracle@dg1 ~]$ su - root
Password:
[root@dg1 ~]# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
[root@dg1 ~]# su - oracle
[oracle@dg1 ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 11 12:51:24 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 79694068 bytes
Database Buffers 83886080 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL>
[oracle@dg1 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export EDITOR=vi
export ORACLE_SID=dg1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export PATH=/u01/app/oracle/product/10.2.0/db_1/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export PATH=$ORACLE_HOME/bin:$PATH
umask 022
解决方法:
[oracle@dg1 ~]$ sqlplus /nolog
bash: sqlplus: command not found
[oracle@dg1 ~]$ ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
ln: creating symbolic link `/usr/bin/sqlplus' to `/bin/sqlplus': Permission deni ed
[oracle@dg1 ~]$ su - root
Password:
[root@dg1 ~]# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
[root@dg1 ~]# su - oracle
[oracle@dg1 ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 11 12:51:24 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 79694068 bytes
Database Buffers 83886080 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL>
相关文章推荐
- Hbase 学习笔记1----shell
- 嵌入式linux常用shell指令
- Shell脚本交互之:自动输入密码
- 使用 Shell 脚本自动化 Linux 系统维护任务
- shell 脚本调试技巧
- Xshell Solarized Dark主题
- sed命令n,N,d,D,p,P,h,H,g,G,x解析
- Linux shell ${}简单用法
- shell脚本带参数实例
- Linuxshell脚本攻略第四章总结----让文本飞
- shell脚本使用
- shell 调试手段总结
- 脚本实现telnet检测指定机器端口的连通性
- Linux下Bash常用基本特性
- Windows 10上快速尝鲜bash on Ubuntu
- Windows 10上快速尝鲜bash on Ubuntu
- Shell中的循环语句for、while、until实例讲解
- bash
- LNMP一键安装shell脚本(v1.2)
- Windows10 Linux bash安装问题