miércoles, 24 de abril de 2013

Install Oracle 11gR2 on RHEL 5 (step by step)

To install RHEL 5 you can follow one of my guide (It's about CentOS but are the same steps) --> my guide.



First of all, you have to download the software of Oracle database 11gR2 (the newest version is but i will install to upgrade it in the future in that blog, you can download and install any version following this guide):
To download database 11gR2 software:  http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html



1) With user Oracle, Unzip files:

[oracle@localhost ~]unzip linux.x64_11gR2_database_1of2.zip
[oracle@localhost ~]unzip linux.x64_11gR2_database_2of2.zip

2) add at the end of /etc/hosts the next:

<IP-address>   <full_machine_name>   <machine_name>
*by default if you are using your own PC add -->   localhost.localdomain   localhost

3) To download all rpm's necessary , we can do it automatically with this easy way:

With user root go to /etc/yum.repos.d/ and execute wget http://public-yum.oracle.com/public-yum-el5.repo

and execute"yum install oracle-validated -y" or "yum install oracle-rdbms-server-11gR2-preinstall" to install all rpm's required automatically:

*if you have another Oracle Linux version go to http://public-yum.oracle.com and follow the steps.

To install rpm's manually or update:

[root@localhost ~]yum -y install gcc
[root@localhost ~]yum -y install gcc-c++
[root@localhost ~]yum -y install compat-libstdc++-33
[root@localhost ~]yum -y install libstdc++-devel
[root@localhost ~]yum -y install elfutils-libelf-devel
[root@localhost ~]yum -y install glibc-devel
[root@localhost ~]yum -y install libaio-devel
[root@localhost ~]yum -y install sysstat
[root@localhost ~]yum -y install perl-URI
[root@localhost ~]yum -y install net-snmp
[root@localhost ~]yum -y install sendmail-cf
[root@localhost ~]yum -y install httpd
[root@localhost ~]yum -y install mod_ssl
[root@localhost ~]yum -y install php
[root@localhost ~]yum -y install php-gd
[root@localhost ~]yum -y install php-mbstring
[root@localhost ~]yum -y install php-ldap
[root@localhost ~]yum -y install bitstream-vera-fonts
[root@localhost ~]yum -y install librsvg2
[root@localhost ~]yum -y install xorg-x11-xinit
[root@localhost ~]yum -y install fonts-*

4) continue with root user, go to /etc/sysctl.conf and add or replace (with "vi" or another editor) the follow kernel parameters (this values are recommended by Oracle):

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

after that, execute /sbin/sysctl -p to update the new values:

5) Now go to /etc/security/limits.conf and add this lines at the end (root user):

oracle  soft    nproc   2047
oracle  hard    nproc   16384
oracle  soft    nofile  4096
oracle  hard    nofile  65536

6) Add new groups and users (still with root user):

[root@localhost ~]/usr/sbin/groupadd dba
[root@localhost ~]/usr/sbin/groupadd oinstall
[root@localhost ~]/usr/sbin/useradd -g oinstall -G dba oracle
[root@localhost ~]passwd oracle

*when you run "passwd oracle" you have to write your password (remember it!!)

7) Create ORACLE_HOME with root user

8) Connect as oracle user and modify .bash_profile as follow:



1) When you unzip the database software, automatically was created a folder called "database", now we have to run ./runInstaller from this folder (with oracle user, close root user and login as oracle user)

2) After execute ./runInstaller, a quick test of three basic points will be fired and must be "correct" to continue:

3) In the first window just un-select "I wish to receive security updates via My Oracle Support" and click on "Next" (will appear a new windows that say we haven't add a mail, just click on continue)

4) Create and configure database and Next

5)Desktop class and Next

6) You can change the global database name, my database will be called Fran, and you can choose the password you want, a warning will be appear if you choose a password that violates Oracle recommendations (but just a warning, you can skip if you want).

7) After another requeriment test (all should be correct, if not you have to solve the reported errors and "check again" until all will be correct)

8) In the last windos, will be shown our configuration, click "Finish"

9) The installation of the software starts:

10) Almost at the end of the installation will appear the window of "Database Configuration Assistant". (which creates the database and instance)

11) when the installation finish, will appear a new window. You can now unlock users and write Its passwords, also  I recommend save Oracle Enterprise Link. click on 'Next'

12) In the new window ask us to execute a script called root.sh (it is allocated in $ORACLE_HOME). Open a termianl and run it with root user:

Open a new terminal and connect as root user, then execute both scripts.

*when question us for the full pathname of the local bin directory, just click on "Enter", don't write anything:
13) when finish you can close the terminal. Accept that window and close the installation window. We have now Oracle database installed.
By default, a log with the information about the installation are been saved into /u01/app/oraInventory/logs/installActions<date_of_installation>.log

Thanks for choose this guide, hope it helps someone someday :)

No hay comentarios:

Publicar un comentario