Préparer le serveur pour Oracle 12c Hakim Benameurlaine Janvier
Transcription
Préparer le serveur pour Oracle 12c Hakim Benameurlaine Janvier
Préparer le serveur pour Oracle 12c
Hakim Benameurlaine
Janvier 2014
2014 Hakim Benameurlaine
1
Table of Contents
1
Préparer le serveur ........................................................................................................................................................................................ 3
1.1
Création des groupes ............................................................................................................................................................................. 3
1.2
Création des utilisateurs......................................................................................................................................................................... 4
1.3
Créer les répertoires pour l’installation .................................................................................................................................................. 6
1.4
Ajouter les disques SCSI pour ASM ......................................................................................................................................................... 7
1.5
Créer les partitions ................................................................................................................................................................................. 8
1.6
Afficher les partitions ............................................................................................................................................................................12
2014 Hakim Benameurlaine
2
1 Préparer le serveur
1.1 Création des groupes
Sur Oracle Linux 6.5, les groupes oinstall et dba sont créés lors de l’installation.
Créer les groupes : asmadmin, asmdba et asmoper :
[root@oracledb ~]# groupadd asmadmin
[root@oracledb ~]# groupadd asmdba
[root@oracledb ~]# groupadd asmoper
2014 Hakim Benameurlaine
3
1.2 Création des utilisateurs
Sur Oracle Linux 6.5, l’utilisateur oracle est créé lors de l’installation.
Créer l’utilisateur grid :
[root@oracledb ~]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)
[root@oracledb ~]# useradd -g oinstall -G asmadmin,asmdba,asmoper grid
Ajouter l’utilisateur oracle dans le groupe asmdba :
[root@oracledb ~]# usermod -aG asmdba oracle
2014 Hakim Benameurlaine
4
Ajouter le mot de passe des utilisateurs grid et oracle:
[root@oracledb ~]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@oracledb ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
2014 Hakim Benameurlaine
5
1.3 Créer les répertoires pour l’installation
[root@oracledb ~]# mkdir -p /vol/01/app/oraInventory
[root@oracledb ~]# mkdir -p /vol/01/app/oracle/product/12.1.0/oraclehome
[root@oracledb ~]# mkdir -p /vol/01/app/grid/product/12.1.0/gridhome
[root@oracledb ~]# chown -R grid.oinstall /vol/01/app/grid
[root@oracledb ~]# chown -R grid.oinstall /vol/01/app/oraInventory
[root@oracledb ~]# chown -R oracle.oinstall /vol/01/app/grid
[root@oracledb ~]# chmod -R 775 /vol/01/app
2014 Hakim Benameurlaine
6
1.4 Ajouter les disques SCSI pour ASM
Ajouter 4 disques SCSI pour ASM :
[root@oracledb ~]#
brw-rw----. 1 root
brw-rw----. 1 root
brw-rw----. 1 root
brw-rw----. 1 root
brw-rw----. 1 root
brw-rw----. 1 root
brw-rw----. 1 root
2014 Hakim Benameurlaine
ls -l /dev/sd*
disk 8, 0 Dec
disk 8, 1 Dec
disk 8, 2 Dec
disk 8, 16 Dec
disk 8, 32 Dec
disk 8, 48 Dec
disk 8, 64 Dec
26
26
26
26
26
26
26
09:12
09:12
09:12
09:12
09:12
09:12
09:12
/dev/sda
/dev/sda1
/dev/sda2
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
7
1.5 Créer les partitions
Créer une partition sur chaque disque sans la formater (RAW).
[root@oracledb ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x4c80a972.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e
extended
p
primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
2014 Hakim Benameurlaine
8
[root@oracledb ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x185a12de.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e
extended
p
primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
2014 Hakim Benameurlaine
9
[root@oracledb ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x9a4e2576.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e
extended
p
primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
2014 Hakim Benameurlaine
10
[root@oracledb ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x24abc513.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e
extended
p
primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
2014 Hakim Benameurlaine
11
1.6 Afficher les partitions
[root@oracledb ~]#
brw-rw----. 1 root
brw-rw----. 1 root
brw-rw----. 1 root
brw-rw----. 1 root
2014 Hakim Benameurlaine
ls -l /dev/sd[b-e]1*
disk 8, 17 Dec 26 09:20
disk 8, 33 Dec 26 09:26
disk 8, 49 Dec 26 09:29
disk 8, 65 Dec 26 09:26
/dev/sdb1
/dev/sdc1
/dev/sdd1
/dev/sde1
12