Linux/Aix日常报错整理

1 [root@localhost ~]# umount /mnt
2 umount.nfs: /mnt: device is busy
3 umount.nfs: /mnt: device is busy

问题原因:有进程在占用,一般原因是有其他人同时登陆并在操作使用

解决方法:可以通过

#fuser -m -v /mnt/nfs

找到进程号(带有用户、进程号、权限、命令),无用的情况下,可通过

#kill -9 进程号

关闭进程,再次执行umount即可

'''解除磁盘挂载'''

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

'''Oracle监听启动失败'''

$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on ************
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Starting /dba/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production

System parameter file is /dba/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /dba/oracle/diag/tnslsnr/ol6-single/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ol6-single)(PORT=1521)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted

问题原因:文件没有操作读取权限,一般Oracle安装都是专门的用户,这一块不存在权限不足的问题,记得以前看到过/var/tmp目录下有个隐藏文件夹.oracle,查看是否是因为用户及用户组归属问题

解决方法:

ls -lrtd /var/tmp/.oracle

修改文件归属用户

chown -R oracle:dba /var/tmp/.oracle

重新启动

'''Oracle监听启动失败'''

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

'''批量修改文件夹下所有文件中的某一个字符串'''

将/xiugai_mulu目录下的所有文件中xiugai_before修改为xiugai_afer

sed -i "s/xiugai_before/xiugai_afer/g" `grep xiugai_before -rl /xiugai_mulu`

-i 表示inplace edit,就地修改文件
-r 表示搜索子目录
-l 表示输出匹配的文件名

posted @ 2019-05-10 14:52  hagendaz  阅读(238)  评论(0编辑  收藏  举报