三、创建所需的操作系统组和用户
The Oracle Inventory group (oinstall)
The Oracle database administrator group (dba)
The Oracle software owner (oracle)
1.To determine whether the oinstall group exists, enter the following command:
# more /etc/oraInst.loc
If the output of this command shows the oinstall group name, then the group already exists.
If the oraInst.loc file exists, then the output from this command is similar to the following:
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
The inst_group parameter shows the name of the Oracle Inventory group, oinstall.
2.If necessary, enter the following commands to create the oinstall group:
[root@CentOS u02]# groupadd oinstall
[root@centos u02]# groupadd dba
[root@centos u01]# groupadd oper
[root@rac1 ~]# groupadd -g 500 oinstall
[root@rac1 ~]# groupadd -g 501 dba
[root@rac1 ~]# groupadd -g 502 oper
3.To determine whether the oracle user exists and belongs to the correct groups, enter the following command:
[root@centos u02]# id oracle
uid=500(oracle) gid=500(oracle) groups=500(oracle)
[root@centos ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
4.If necessary, complete one of the following actions:
If the oracle user exists, but its primary group is not oinstall or it is not a member of the dba group, then enter the following command:
# /usr/sbin/usermod -g oinstall -G dba oracle
If the oracle user does not exist, enter the following command to create it:
# /usr/sbin/useradd -g oinstall -G dba,oper oracle
This command creates the oracle user and specifies oinstall as the primary group and dba as the secondary group.
[root@centos u02]# usermod -g oinstall -G dba,oper oracle
[root@ora11g ~]# useradd -g oinstall -G dba,oper -d /home/oracle -p oracle -u 500 oracle
[root@centos u02]# id oracle
uid=500(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
四、创建安装Oracle所需的目录
4.1 查看当前系统上挂载的文件系统信息:
[root@centos u02]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 7.9G 2.9G 4.7G 38% /
none 760M 0 760M 0% /dev/shm
/dev/sda3 1004M 18M 936M 2% /tmp
/dev/sda6 5.0G 43M 4.7G 1% /u01
/dev/sda5 4.0G 1.6G 2.2G 42% /u02
/dev/hdc 57M 57M 0 100% /media/cdrecorder
4.2 确定满足安装所需空间需求的文件系统,然后在该文件系统上创建如下目录:
[root@centos u01]# mkdir -p /u01/app/oracle
[root@centos u01]# chmod -R 775 /u01
[root@centos u01]# chown -R oracle:oinstall /u01
五、配置Oracle 安装用户 shell 限制;
Add the following lines to the /etc/security/limits.conf file:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
