1)在建立用户的时候可能遇到下面的问题 useradd: warning: the home directory already exists. Not copying any file from skel directory into it. 原因: 系统添加用户的标准步骤 1.编辑/etc/passwd与/etc/group 2.创建用户主目录 3.从/etc/skel拷贝文件与目录 4.让新用户获得其主目录与文件的拥有权限 5.给新用户一个密码 <!--[if !ppt]--><!--[endif]-->
解决办法: 依旧使用上面的脚本建用户,然后手动拷贝配置文件(3个)到/home/oracle下。如: [root@esri ~]# cp /etc/skel/.bash_profile /home/oracle 或者删掉用户 重新建立 Useerdel –r 这样就可以将家目录等和用户相关的信息全部删掉 2)可能会遇到下面的错误 cannot restore segment prot after reloc: Permission denied 编辑/etc/sysconfig/selinux,找到: # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=enforcing 如果SELINUX已经是 SELINUX=disabled,那么就不用改了,否则就把SELINUX=enforcing 注释掉,新加一行: SELINUX=disabled 3)可能会遇到下面的错误: could not open parameter file '/home/app/oracle/product/11.2.0/db_1/dbs/initorcl.ora 这是因为在oracle9i和oracle10g中,数据库默认将使用spfile启动数据库,如果spfile不存在,则就会出现上述错误。 解决方法: 将$ORACLE_BASE/admin/数据库名称/pfile目录下的init.ora.012009233838形式的文件copy到$ORACLE_HOME/dbs目录下initorcl.ora即可。(注:initorcl.ora中的oracle为你的实例名 ORACLE_SID Startup mount pfile=’ $ORACLE_HOME/dbs/initorcl.ora’ 创建一个实例进行最后测试 注意:在数据库操作中都是用oracle用户执行命令.
输入
[oracle@computer ~]$ sqlplus /nolog
SQL*Plus: Release 11.1.0.6.0 - Production on Tue Dec 11 15:32:23 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.