Install Oracle under Linux Red Hat enterprise5

Source: Internet
Author: User
Tags ssh secure file transfer

I am an absolute newbie for Linux, but today I have a job to set up automatic data backup for an Oracle server installed on Linux. This is probably only one job, only one thing, will certainly be forgotten after a long time, so the entire installation and configuration process is recorded for the next time you need to refer.

I installed Linux on Vmware. I installed it about a month ago. I didn't remember it at the time. Now I forget how it was installed.

Oracle can be downloaded from its official website. I downloaded Oracle 11g (11.2.0.1.0) for Linux x86 at http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-linuxsoft-085393.html. There are two files, respectively linux_11gr2_database_1of2.zipand linux_11gr2_database5of2.zip.

After downloading the file, upload it to Linux. I use the SSH Secure File Transfer to transfer it.

1. Before installing Oracle, you need to install some necessary. I'm referring to http://www.liusuping.com/ubuntu-linux/redhat-linux-oracle-11g-r2.html.

Some of the prerequisites may have been installed before, so before installation, use rpm-Qa | grep XXX to check whether the installation is complete. For example, to install elfutils-libelf-devel, run the following command:

    1. [Root @ localhost server] # rpm-Qa | grep elfutils-libelf-devel

If you have already installed the tool, the following message is displayed:

    1. [Root @ localhost server] # rpm-Qa | grep elfutils-libelf-devel
    2. Elfutils-libelf-devel-Static-0.125-3. EL5
    3. Elfutils-libelf-devel-0.125-3.el5

We can see that we do not need to write the full name of the package after grep.

If it is not installed, there is no prompt. Run the following command to install it.

    1. [root @ localhost server] # rpm-IVH elfutils-libelf-devel *
    2. warning: elfutils-libelf-devel-0.125-3.el5.i386.rpm: Header V3 DSA Signature: nokey, key ID 37017186
    3. preparing... ######################################## ### [1, 100%]
    4. 1: elfutils-libelf-devel-s ################################# ######### [50%]
    5. 2: elfutils-libelf-devel ################################### ######## [1, 100%]
    6. [root @ localhost server] # rpm-Qa | grep elfutils-libelf-devel
    7. elfutils-libelf-devel--0.125-3. EL5
    8. elfutils-libelf-devel-0.125-3.el5

This * is a wildcard, that is, we do not need to write it completely, it will find it by itself. However, you must put the Linux installation CD in wmware and then CD it to the media/CD name/Server Directory to find the package.

The package to be installed is as follows:

  1. Binutils-2.17.50.0.6
  2. Compat-libstdc ++-33-3.2.3
  3. Elfutils-libelf-0.125
  4. Elfutils-libelf-devel-0.125
  5. Elfutils-libelf-devel-Static-0.125
  6. Gcc-4.1.2
  7. Gcc-C ++-4.1.2
  8. Glibc-2.5-24
  9. Glibc-common-2.5
  10. Glibc-devel-2.5
  11. Glibc-headers-2.5
  12. Kernel-headers-2.6.18
  13. Ksh-20060214
  14. Libaio-0.3.106
  15. Libaio-devel-0.3.106?
  16. Libgcc-4.1.2
  17. Libgomp-4.1.2
  18. Libstdc ++-4.1.2?
  19. Libstdc +-devel-4.1.2
  20. Make-3.81
  21. Sysstat-7.0.2
  22. UnixODBC-2.2.11
  23. UnixODBC-devel-2.2.11

I'm in anotherArticleSee these packages are a little different, some articles will be a few more, some will be a little less. At the moment, we don't have to worry about what we need.

Since I want to install Oracle 11g and rhel5, I don't need to change the system version when installing 10 in some articles.

2. Create a user

    1. #/Usr/sbin/groupadd oinstall
    2. #/Usr/sbin/groupadd DBA
    3. #/Usr/sbin/useradd-G oinstall-g dba Oracle
    4. # Passwd Oracle

When the last command is run, a prompt is displayed. Let's enter the password of the Oracle user.

3. Modify system parameters

Run the VI command to modify/etc/sysctl. conf and add the following parameters:

    1. FS. AIO-max-Nr = 1048576
    2. FS. File-max = 6815744
    3. Kernel. Shmall = 2097152
    4. Kernel. shmmax = 536870912
    5. Kernel. shmmni = 4096
    6. Kernel. SEM = 250 32000 100 128
    7. Net. ipv4.ip _ local_port_range = 9000 65500
    8. Net. Core. rmem_default = 262144
    9. Net. Core. rmem_max = 4194304
    10. Net. Core. wmem_default = 262144
    11. Net. Core. wmem_max = 1048586

Run the VI command to modify/etc/security/limits. confi and add the following parameters:

    1. Oracle soft nproc 2047
    2. Hard nproc 16384
    3. Oracle soft nofile 1024
    4. Oracle hard nofile 65536

Modify/etc/PAM. d/login and add:

    1. Session required pam_limits.so

Modify/etc/profile and add:

  1. If[$ User ="Oracle"]; Then
  2. If[$ Shell ="/Bin/KSh"]; Then
  3. Ulimit-P 16384
  4. Ulimit-N 65536
  5. Else
  6. Ulimit-u 16384-N 65536
  7. Fi
  8. Fi

Installation Directory Configuration:

    1. # Mkdir-P/u01/
    2. # Chown-r ORACLE: oinstall/u01/
    3. # Chmod-r 775/u01/

Then run the su Oracle command to switch to the Oracle user, and then modify the user variable. bash_profile file:

    1. [Oracle @ localhost ~] $ VI. bash_profile

Add the following content:

    1. Export oracle_base =/u01/APP
    2. Export ORACLE_HOME = $ oracle_base/Oracle
    3. Export oracle_sid = liusuping
    4. Export Path = $ ORACLE_HOME/bin: $ path: $ home/bin

Log out of the root account, log on to Oracle, and start the graphical interface.

Go to the folder where the two zip packages of Oracle are downloaded. My directory is/usr/tools/oracle. Decompress these two zip packages, for example:

Decompress both packages, uncompress them to the same directory, and then run./runinstaller. After a while, the Oracle Installation Wizard is displayed, for example:

However, there seems to be some problems with the display of this wizard. The following "Next" button cannot be clicked. It should be about resolution. Just install a VMware tool.

It is not easy to install VMware tool. It will not be written here.

After wmware tool is installed and Linux is restarted, the resolution can be adjusted. After the adjustment, the Oracle Installation interface will not flash. But installProgramWhen checking the system, the system reports an error of insufficient memory and swap space. Memory shortage is a good solution. Just add some memory, but to increase the swap space, you need Linux commands.

Refer to http://lanlfeng.blog.51cto.com/337014/123130. execute the following command as follows:

    1. DdIf=/Dev/Zero of =/opt/image/swap BS = 1024 COUNT = 2048000
    2. Mkswap/opt/image/swap
    3. Swapon/opt/image/swap

Run the free-M command to check whether the existing swap zone has become larger.

    1. [Root @ localhost ~] # Free-m
    2. Total used free shared buffers cached
    3. Mem: 1434 1140 293 0 43 848
    4. -/+ Buffers/cache: 247 1186
    5. Swap: 3983 0 3983

Then re-run the Oracle Installation program and check that:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.