HOW-TO Install Oracle 11gR2 on OL5U7
Objet : Installation d Oracle Enterprise Server 11gR2 sur Oracle Linux 5 Update 7. Historique : Version Date Modifications Rédacteur Vérificateur Approbateur 1.0 27/09/2011 laurenceb Documents de référence : Description du document Nom du document N Page 2
SOMMAIRE 1 INTRODUCTION... 4 2 INSTALLATION D ORACLE LINUX 5 Update 7... 5 3 Installation des prérequis... 19 3.1 Installation automatique avec : Oracle validated... 19 3.1.1 Note : configure wget derrière un proxy... 19 3.1.2 Note : Configurer Yum derrière un proxy... 19 3.1.3 Installation du package «oracle-validated»... 19 3.2 Installation manuel des prerequis... 23 3.3 Création des groupes... 25 3.4 Création des répertoires d installation... 25 3.5 Modification de l utilisateur «oracle»... 25 4 Installation du logiciel de base de données Oracle... 27 Page 3
1 INTRODUCTION Certification Certification Information for Oracle Database on Linux x86 [ID 1307056.1] Oracle Enterprise Linux 5 Update 2 and higher. Tutorial d installation : http://www.oracle-base.com/articles/11g/oracledb11gr2installationonenterpriselinux5.php http://www.oracle-base.com/articles/linux/oracleenterpriselinux5installation.php Page 4
2 INSTALLATION D ORACLE LINUX 5 UPDATE 7 Appuyez sur «entrée» pour une installation en mode Graphique. Sélectionnez «skip» : Page 5
Cliquez sur «next» : Sélectionnez «French (Français)», puis cliquez sur «next». Page 6
Sélectionnez «Français», puis cliquez sur «Suivant». Cliquez sur «oui» : Page 7
Sélectionnez «Créer un partitionnement personnalisé», cliquez sur «Suivant» : Créez une partition «/boot» de 150Mo de type «ext3» : Page 8
Créez un volume groupe physique (15go ici à titre d éxemple) : Cliquez sur «LVM», ajoutez les volumes logiques suivant : - Un volume logique «swap» de 2.5Go - Un volume logique «ext3» dont le point de montage est «/» Page 9
Le partitionnement doit être identique à celui-ci : Cliquez sur suivant : Page 10
Entrez le nom d hôte de la machine (ici vmora11g) et configurez l adresse ip de la machine (ici dhcp) : Sélectionnez «Europe/Paris», cliquez sur «Suivant» : Page 11
Entrez le mot de passe de l utilisateur «root» et cliquez sur «Suivant» : Cliquez sur «Suivant» : Page 12
Clique sur «Suivant» : L installation commence : Page 13
L installation est maintenant terminée, cliquez sur «Redémarrer» : Après redémarrage de la machine ; Cliquez sur «Avancer» : Page 14
Sélectionnez «Oui, j accepte le contrat de license», cliquez sur «Avancer» : Désactivez le pare-feu, cliquez sur «Avancer» : Page 15
Désactivez «SELinux», cliquez sur «Avancer» : Cliquez sur «Avancer» : Page 16
Cliquez sur «Avancer» : Créez l utilisateur propriétaire du logiciel de base de données Oracle «oracle», cliquez sur «Avancer» : Page 17
Cliquez sur «Avancer» : L installation est maintenant terminée, cliquez sur «Terminer» : Page 18
3 INSTALLATION DES PREREQUIS 3.1 Installation automatique avec : Oracle validated L ensemble des instructions à suivre sont disponible à l adresse suivante : http://public-yum.oracle.com/ 3.1.1 Note : configure wget derrière un proxy vi /etc/wgetrc Ajouter / Modifier les lignes : # You can set the default proxies for Wget to use for http and ftp. # They will override the value in the environment. #http_proxy = http://proxy.yoyodyne.com:18023/ #ftp_proxy = http://proxy.yoyodyne.com:18023/ http_proxy = your_proxy:port/ proxy-user = DOMAIN\user proxy-password = password 3.1.2 Note : Configurer Yum derrière un proxy Vi /etc/yum.conf proxy=http:// your_proxy:port/ proxy_username=domain\user proxy_password=password 3.1.3 Installation du package «oracle-validated» Téléchargement du «repository» : cd /etc/yum.repos.d wget http://public-yum.oracle.com/public-yum-el5.repo Modifiez le fichier téléchargé : [ol5_u7_base] name=oracle Linux $releasever - U7 - $basearch - base baseurl=http://public-yum.oracle.com/repo/oraclelinux/ol5/7/base/$basearch/ gpgkey=http://public-yum.oracle.com/rpm-gpg-key-oracle-el5 gpgcheck=1 enabled=1 Installation du package : [root@vmora11g yum.repos.d]# yum install oracle-validated Page 19
Loaded plugins: rhnplugin, security This system is not registered with ULN. ULN support will be disabled. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package oracle-validated.i386 0:1.1.0-14.el5 set to be updated --> Processing Dependency: sysstat for package: oracle-validated --> Processing Dependency: libxp for package: oracle-validated --> Processing Dependency: kernel-headers for package: oracle-validated --> Processing Dependency: gdb for package: oracle-validated --> Processing Dependency: gcc-c++ for package: oracle-validated --> Processing Dependency: gcc for package: oracle-validated --> Processing Dependency: unixodbc-devel for package: oracle-validated --> Processing Dependency: compat-db for package: oracle-validated --> Processing Dependency: libaio-devel for package: oracle-validated --> Processing Dependency: elfutils-libelf-devel for package: oracle-validated --> Processing Dependency: glibc-devel for package: oracle-validated --> Processing Dependency: glibc-headers for package: oracle-validated --> Processing Dependency: unixodbc for package: oracle-validated --> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated --> Processing Dependency: compat-gcc-34 for package: oracle-validated --> Processing Dependency: libstdc++-devel for package: oracle-validated --> Running transaction check ---> Package compat-db.i386 0:4.2.52-5.1 set to be updated ---> Package compat-gcc-34.i386 0:3.4.6-4.1 set to be updated ---> Package compat-gcc-34-c++.i386 0:3.4.6-4.1 set to be updated ---> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated --> Processing Dependency: elfutils-libelf-devel-static-i386 = 0.137-3.el5 for package: elfutils-libelfdevel ---> Package gcc.i386 0:4.1.2-51.el5 set to be updated ---> Package gcc-c++.i386 0:4.1.2-51.el5 set to be updated ---> Package gdb.i386 0:7.0.1-37.el5 set to be updated ---> Package glibc-devel.i386 0:2.5-65 set to be updated ---> Package glibc-headers.i386 0:2.5-65 set to be updated ---> Package kernel-headers.i386 0:2.6.18-274.el5 set to be updated ---> Package libxp.i386 0:1.0.0-8.1.el5 set to be updated ---> Package libaio-devel.i386 0:0.3.106-5 set to be updated ---> Package libstdc++-devel.i386 0:4.1.2-51.el5 set to be updated --> Running transaction check ---> Package compat-db.i386 0:4.2.52-5.1 set to be updated ---> Package compat-gcc-34.i386 0:3.4.6-4.1 set to be updated ---> Package compat-gcc-34-c++.i386 0:3.4.6-4.1 set to be updated ---> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated Page 20
--> Processing Dependency: elfutils-libelf-devel-static-i386 = 0.137-3.el5 for package: elfutils-libelfdevel ---> Package gcc.i386 0:4.1.2-51.el5 set to be updated ---> Package gcc-c++.i386 0:4.1.2-51.el5 set to be updated ---> Package gdb.i386 0:7.0.1-37.el5 set to be updated ---> Package glibc-devel.i386 0:2.5-65 set to be updated ---> Package glibc-headers.i386 0:2.5-65 set to be updated ---> Package kernel-headers.i386 0:2.6.18-274.el5 set to be updated ---> Package libxp.i386 0:1.0.0-8.1.el5 set to be updated ---> Package libaio-devel.i386 0:0.3.106-5 set to be updated ---> Package libstdc++-devel.i386 0:4.1.2-51.el5 set to be updated ol5_u7_base/filelists 2.8 MB 00:00 ---> Package sysstat.i386 0:7.0.2-11.el5 set to be updated ---> Package unixodbc.i386 0:2.2.11-7.1 set to be updated ---> Package unixodbc-devel.i386 0:2.2.11-7.1 set to be updated --> Running transaction check ---> Package elfutils-libelf-devel-static.i386 0:0.137-3.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================== Package Arch Version Repository Size ================================================================================== Installing: oracle-validated i386 1.1.0-14.el5 ol5_u7_base 23 k Installing for dependencies: compat-db i386 4.2.52-5.1 ol5_u7_base 1.7 M compat-gcc-34 i386 3.4.6-4.1 ol5_u7_base 4.0 M compat-gcc-34-c++ i386 3.4.6-4.1 ol5_u7_base 11 M elfutils-libelf-devel i386 0.137-3.el5 ol5_u7_base 24 k elfutils-libelf-devel-static i386 0.137-3.el5 ol5_u7_base 66 k gcc i386 4.1.2-51.el5 ol5_u7_base 5.2 M gcc-c++ i386 4.1.2-51.el5 ol5_u7_base 3.4 M gdb i386 7.0.1-37.el5 ol5_u7_base 2.4 M glibc-devel i386 2.5-65 ol5_u7_base 2.0 M glibc-headers i386 2.5-65 ol5_u7_base 604 k kernel-headers i386 2.6.18-274.el5 ol5_u7_base 1.2 M libxp i386 1.0.0-8.1.el5 ol5_u7_base 22 k libaio-devel i386 0.3.106-5 ol5_u7_base 12 k libstdc++-devel i386 4.1.2-51.el5 ol5_u7_base 2.8 M sysstat i386 7.0.2-11.el5 ol5_u7_base 182 k unixodbc i386 2.2.11-7.1 ol5_u7_base 830 k unixodbc-devel i386 2.2.11-7.1 ol5_u7_base 743 k Page 21
Transaction Summary ================================================================================== Install 18 Package(s) Upgrade 0 Package(s) Total download size: 36 M Is this ok [y/n]: y Downloading Packages: (1/18): libaio-devel-0.3.106-5.i386.rpm 12 kb 00:00 (2/18): libxp-1.0.0-8.1.el5.i386.rpm 22 kb 00:00 (3/18): oracle-validated-1.1.0-14.el5.i386.rpm 23 kb 00:00 (4/18): elfutils-libelf-devel-0.137-3.el5.i386.rpm 24 kb 00:00 (5/18): elfutils-libelf-devel-static-0.137-3.el5.i386.rpm 66 kb 00:00 (6/18): sysstat-7.0.2-11.el5.i386.rpm 182 kb 00:00 (7/18): glibc-headers-2.5-65.i386.rpm 604 kb 00:01 (8/18): unixodbc-devel-2.2.11-7.1.i386.rpm 743 kb 00:02 (9/18): unixodbc-2.2.11-7.1.i386.rpm 830 kb 00:02 (10/18): kernel-headers-2.6.18-274.el5.i386.rpm 1.2 MB 00:02 (11/18): compat-db-4.2.52-5.1.i386.rpm 1.7 MB 00:03 (12/18): glibc-devel-2.5-65.i386.rpm 2.0 MB 00:05 (13/18): gdb-7.0.1-37.el5.i386.rpm 2.4 MB 00:06 (14/18): libstdc++-devel-4.1.2-51.el5.i386.rpm 2.8 MB 00:06 (15/18): gcc-c++-4.1.2-51.el5.i386.rpm 3.4 MB 00:07 (16/18): compat-gcc-34-3.4.6-4.1.i386.rpm 4.0 MB 00:10 (17/18): gcc-4.1.2-51.el5.i386.rpm 5.2 MB 00:11 (18/18): compat-gcc-34-c++-3.4.6-4.1.i386.rpm 11 MB 00:25 ---------------------------------------------------------------------------------------------------------------------------- Total 389 kb/s 36 MB 01:34 attention: rpmts_hdrfromfdno: Entête V3 DSA signature: NOKEY, key ID 1e5e0159 ol5_u7_base/gpgkey 1.4 kb 00:00 Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>" from http://public-yum.oracle.com/rpm-gpg-key-oracle-el5 Is this ok [y/n]:y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : unixodbc 1/18 Installing : libxp 2/18 Installing : compat-db 3/18 Installing : gdb 4/18 Installing : sysstat 5/18 Installing : kernel-headers 6/18 Page 22
Installing : glibc-headers 7/18 Installing : glibc-devel 8/18 Installing : libstdc++-devel 9/18 Installing : unixodbc-devel 10/18 Installing : libaio-devel 11/18 Installing : compat-gcc-34 12/18 Installing : gcc 13/18 Installing : gcc-c++ 14/18 Installing : compat-gcc-34-c++ 15/18 Installing : elfutils-libelf-devel 16/18 Installing : elfutils-libelf-devel-static 17/18 Installing : oracle-validated 18/18 Installed: oracle-validated.i386 0:1.1.0-14.el5 Dependency Installed: compat-db.i386 0:4.2.52-5.1 compat-gcc-34.i386 0:3.4.6-4.1 compat-gcc-34-c++.i386 0:3.4.6-4.1 elfutils-libelf-devel.i386 0:0.137-3.el5 elfutils-libelf-devel-static.i386 0:0.137-3.el5 gcc.i386 0:4.1.2-51.el5 gcc-c++.i386 0:4.1.2-51.el5 gdb.i386 0:7.0.1-37.el5 glibc-devel.i386 0:2.5-65 glibc-headers.i386 0:2.5-65 kernel-headers.i386 0:2.6.18-274.el5 libxp.i386 0:1.0.0-8.1.el5 libaio-devel.i386 0:0.3.106-5 libstdc++-devel.i386 0:4.1.2-51.el5 sysstat.i386 0:7.0.2-11.el5 unixodbc.i386 0:2.2.11-7.1 unixodbc-devel.i386 0:2.2.11-7.1 Complete! 3.2 Installation manuel des prerequis Dans le cas ou vous n auriez pas de connection internet, les prérequis sont les suivant : Oracle recommande les paramètres suivants. fs.suid_dumpable = 1 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 Page 23
net.core.wmem_max = 1048586 Les valeurs actuelles peuvent être testées en utilisant la commande suivante. /sbin/sysctl -a grep <param-name> Ajouter ou modifier les lignes suivantes dans le fichier «/ etc / sysctl.conf". fs.suid_dumpable = 1 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default=4194304 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586 Exécutez la commande suivante pour modifier les paramètres du noyau. /sbin/sysctl p Ajoutez les lignes suivantes au fichier «/ etc / security / limits.conf". oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 Installez les packages suivants s'ils ne sont pas déjà présentes. cd /media/cdrom/server rpm -Uvh binutils-2.* rpm -Uvh compat-libstdc++-33* rpm -Uvh compat-libstdc++-33*.i386.rpm rpm -Uvh elfutils-libelf* rpm -Uvh gcc-4.* rpm -Uvh gcc-c++-4.* rpm -Uvh glibc-2.* rpm -Uvh glibc-common-2.* rpm -Uvh glibc-devel-2.* rpm -Uvh glibc-headers-2.* Page 24
rpm -Uvh ksh* rpm -Uvh libaio-0.* rpm -Uvh libaio-devel-0.* rpm -Uvh libgomp-4.* rpm -Uvh libgcc-4.* rpm -Uvh libstdc++-4.* rpm -Uvh libstdc++-devel-4.* rpm -Uvh make-3.* rpm -Uvh sysstat-7.* rpm -Uvh unixodbc-2.* rpm -Uvh unixodbc-devel-2.* rpm -Uvh numactl-devel-2* cd / eject 3.3 Création des groupes groupadd oinstall groupadd dba groupadd oper groupadd asmadmin Ajoutez ces groupes à l utilisateur «oracle» (a l aide de system-config-users) et définissez le groupe «oinstall» comme groupe primaire. 3.4 Création des répertoires d installation mkdir -p /u01/app/oracle/product/11.2.0/db_1 chown -R oracle:oinstall /u01 chmod -R 775 /u01 3.5 Modification de l utilisateur «oracle» Modifiez le fichier «.bash_profile» en y ajoutant les lignes suivantes : # Oracle Settings TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR ORACLE_HOSTNAME=vmora11g.localdomain; export ORACLE_HOSTNAME ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME ORACLE_SID=orcl; export ORACLE_SID PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH Page 25
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH Pour executer le fichier «.bash_profile», exécutez la commande suivante :. ~/.bash_profile Page 26
4 INSTALLATION DU LOGICIEL DE BASE DE DONNEES ORACLE Après avoir déposé les sources Oracle 11gR2 sur la machine, lancer l installeur Oracle à l aide de la commande suivante : «runinstaller» [oracle@vmora11g database]$./runinstaller Dà marrage d'oracle Universal Installer... Vérification de l'espace temporaire : doit être supérieur à 80 Mo. Réel 6728 Mo Succès Vérification de l'espace de swap : il doit être supérieur à 150 Mo. Réel 2495 Mo Succès Vérification de l'écran : doit être configuré pour afficher au moins 256 couleurs. Réel 16777216 Succès Préparation du lancement d'oracle Universal Installer à partir de /tmp/orainstall2011-09-28_11-34- 37AM. Veuillez patienter... Désélectionnez «Je souhaite recevoir les mises à jour de sécurité via My Oracle Support», cliquez sur «Suivant» : Page 27
Sélectionnez «Installer le logiciel de base de données uniquement», cliquez sur «Suivant» : Sélectionnez «Installation d une base de données mono-instance», cliquez sur «Suivant» : Page 28
Sélectionnez les langues «Français» et «Anglais», cliquez sur «Suivant» : Sélectionnez «Enterprise Edition», cliquez sur «Suivant» : Page 29
Vérifiez le répertoire de base et l emplacement du logiciel, ils doivent correspondre aux variables d environnement «ORACLE_BASE» et «ORACLE_HOME» : Vérifiez le répertoire de l inventaire Oracle et son groupe, Cliquez sur «Suivant» Page 30
Vérifiez les groupes d administration et opérateurs, cliquez sur «Suivant» : L installation va pouvoir commencer, cliquez sur «Fin» : Page 31
A la fin de l installation, il vous ai demandé d éxecuter les scripts suivant en tant qu utilisateur «root» : [root@vmora11g ~]# /u01/app/orainventory/orainstroot.sh Modification des droits d'accã s de /u01/app/orainventory. Ajout de droits d'accã s en lecture/ã criture pour le groupe. Suppression des droits d'accã s en lecture/ã criture/exã cution pour le monde. Page 32
Modification du nom de groupe de /u01/app/orainventory en oinstall. L'exà cution du script est terminã e. [root@vmora11g ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin... Copying oraenv to /usr/local/bin... Copying coraenv to /usr/local/bin... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. L installation est maintenant terminé, cliquez sur «Fermer» : Page 33