Linux 常用命令总结 oracle 常用命令
【LINUX常用命令总结:】***************************************************************
------------------------------------------------Begin---------------------------------------------
远程登陆命令:
//远程登陆
telnet 99.1.76.3
//用户名、密码
system/orcl
//启动 Tomcat
cd /home/ssmp/3Party/tomcat/bin
./shutdown.sh
//查看包含 3Party 的进程
ps -ef|grep 3Party
//杀死进程
kill <PID>
./startup.sh
编辑文件:
vi log
shif +g 跳到最后一行
vi sysctrl.conf ?按i 进行修改状态 ESC 后:wq保存退出
查看命令:
ls -lt :显示详细信息
ls /etc | wc -l ?:有多少个文件
ls /etc -l | grep "^d"|wc -l?
压缩文件目录 :
tar -cvf 20110914ssmp.tar ./webapps/
解压 tar.gz文件:
tar zxvf 文件名.tar.gzls?
安装Oracle时错误:Could not execute auto check for display colors using command /usr/bin/xdpyinfo 解决方法
use root login,then ?
#xhost +
#su - oracle
#./runInstaller
关机:
halt
显示当前目录:
pwd
查看存储空间状态:
df -k;
复制文件:?
cp -rf /mnt/hgfs/DataBase/tomcat/* /home/ssmp/3Party/tomcat
linux客户端:xMangemnt
export ?DISPLAY:99.1.68..36:0.0
------------------------------------------------End-----------------------------------------------
?
?
【LINUX下启动数据监听和服务步骤:】***************************************************************
------------------------------------------------Begin---------------------------------------------
创建数据库实例:
su - oracle
//创建数据库
dbca?
配置监听:
su - oracle
//配置监听
netcat
启动监听:
oracle@linux:/> lsnrctl start
oracle@linux:/> lsnrctl stop
------------------------------------------------End-----------------------------------------------
?
?
【启动 oracle 服务】******************************************************************************
------------------------------------------------Begin---------------------------------------------
[oracle@apabi ~]$ sqlplus /nolog
?
SQL*Plus: Release 11.2.0.1.0 Production on Tue May 22 21:39:22 2012
?
Copyright (c) 1982, 2009, Oracle. ?All rights reserved.
?
SQL> connect/as sysdba;
Connected.
SQL> startup?
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
?
Total System Global Area ?857903104 bytes
Fixed Size ? ? ? ? ? ? ? ? ?1303272 bytes
Variable Size ? ? ? ? ? ? 549457176 bytes
Database Buffers ? ? ? ? ?301989888 bytes
Redo Buffers ? ? ? ? ? ? ? ?5152768 bytes
Database mounted.
Database opened.
执行删除脚本:
sqlplus system/orcl
SQL*Plus: Release 11.2.0.1.0 Production on Tue May 22 21:39:22 2012
?
Copyright (c) 1982, 2009, Oracle. ?All rights reserved.
?
SQL> start 删除脚本路径;
导入数据库:
imp boco/boco@tybookdb file=/home/tybookfiles/tybookdb20120521V2.dmp full=y ignore=y
?
------------------------------------------------End-----------------------------------------------
?
?
【LINUX下启动Tomcat步骤:】***************************************************************
------------------------------------------------Begin---------------------------------------------
启动 Tomcat 服务
cd /home/tomcat/bin/
./startup.sh
停止 Tomcat 服务
cd /home/tomcat/bin/
./shutdown.sh
查看 Tomcat 运行日志:
tail -f /home/tomcat/tylogs/tybook_back_manager.log
监听Tomcat输出日志:
tail -f ../logs/catalina.out
------------------------------------------------End-----------------------------------------------
?
?
?
持续更新中... ...