How to install Oracle in Linux and related knowledge points-Series 3

Source: Internet
Author: User

4. Disk Space

11g R2 requirements/tmp space cannot be less than 1G. if the requirements are not met, You can do one of the following two things:

(1) Delete/tmp space to meet disk requirements.

(2) set the TMP and TMPDIR environment variables.

Use df-h to view disk space. The size required by 11g R2 is:

Installation Type Requirement for Software Files (GB)
Enterprise Edition 4.7
Standard Edition 4.6

Installation Type Requirement for Data Files (GB)
Enterprise Edition 1.7
Standard Edition 1.5

5. Dependency packages

11g R2 requires the following dependency packages for Linux x86_64:

Binutils-2.20.51.0.2-5.11.el6 (x86_64)
Compat-libcap1-1.10-1 (x86_64)
Compat-libstdc ++-33-3.2.3-69.el6 (x86_64)
Compat-libstdc ++-33-3.2.3-69.el6.i686
Gcc-4.4.4-13.el6 (x86_64)
Gcc-c ++-4.4.4-13. el6 (x86_64)
Glibc-2.12-1.7.el6 (i686)
Glibc-2.12-1.7.el6 (x86_64)
Glibc-devel-2.12-1.7.el6 (x86_64)
Glibc-devel-2.12-1.7.el6.i686
Ksh
Libgcc-4.4.4-13.el6 (i686)
Libgcc-4.4.4-13.el6 (x86_64)
Libstdc ++-4.4.4-13. el6 (x86_64)
Libstdc ++-4.4.4-13. el6.i686
Libstdc ++-devel-4.4.4-13.el6 (x86_64)
Libstdc +-devel-4.4.4-13.el6.i686
Libaio-0.3.107-10.el6 (x86_64)
Libaio-0.3.107-10.el6.i686
Libaio-devel-0.3.107-10.el6 (x86_64)
Libaio-devel-0.3.107-10.el6.i686
Make-3.81-19.el6
Sysstat-9.0.4-11.el6 (x86_64)

The following package is missing for the current experiment version:

Compat-libstdc ++
Gcc-c ++
Libstdc ++-devel
Libaio-devel

In addition, to Use ODBC, you also need to install the unixODBC package.

You can use yum-y install libaio-devel * to install the required dependent packages.

Through the experiment, we can see that many of the above dependency packages have the same prefix, but the suffixes are divided into x86_64 and i686. In fact, you only need to download x86_64.

Whether the dependency package is fully installed determines whether the dependency package is missing during Oracle installation.

Wang Dao tries to install the dependency package that is fully required by the Official System. The latest version of the package will also be found in yum.

6. Create the installation path, user, and user group:

(1) create a dba group

Groupadd-g 101 dba

You can specify gid as 101 or use the default value without specifying it.

You can use grep dba/etc/group to check whether a dba group has been created.

(2) create an oinstall Group

Groupadd oinstall

If this group is not set up, the current Oracle Installation will not be affected. The oinstall group is generally used to control software installation and patch installation. The dba group is generally used to control database creation and database management, of course, the group name may not have to be dba or oinstall. In addition, all the above permissions can be authorized to the dba group, so you only need to create a dba group.

You can use more/etc/oraInst. loc to check whether an Oracle Inventory group has been created. For example:

Inventory_loc =/opt/app/oraInventory

Inst_group = oinstall

(3) create a user

Useradd-g oinstall-G dba ora11g

Here,-g indicates that the user ora11g specifies that the primary group is oinstall, and-G indicates that the user ora11g specifies that the other user (secondary) group is dba.

A user can belong to only one primary group, but can belong to multiple other user groups.

You can use id ora11g to view the user's primary group and secondary group information. You can also use groups ora11g to view the group.

Use passwd ora11g to create a password for the user.

(4) Create an installation directory and Configure permissions

Mkdir-p/opt/app/ora11g

Chown-R ora11g: dba/opt/app/ora11g

Create an Oracle installation path/opt/app/ora11g.-R indicates modifying the users and groups to which the directory belongs, including subfolders in the path.

7. System Kernel Parameters

The Kernel Parameter suggestions in the official documentation are as follows:

VciBLZXJuZWwgUGFyYW1ldGVycyBvbiBMaW51eA = "width =" 100% ">
Parameter Minimum Value File
Semmsl

Semmns

Semopm

Semmni

250

32000

100

128

/Proc/sys/kernel/sem
Shmall 2097152 /Proc/sys/kernel/shmall
Shmmax Minimum: 536870912

Maximum: A value that is 1 byte less than the physical memory

Recommended: More than half the physical memory

See My Oracle Support Note 567506.1 for additional information about processing ing shmmax.

/Proc/sys/kernel/shmmax
Shmmni 4096 /Proc/sys/kernel/shmmni
File-max 6815744 /Proc/sys/fs/file-max
Ip_local_port_range Minimum: 9000

# Maximum: 65500

/Proc/sys/net/ipv4/ip_local_port_range
Rmem_default 262144 /Proc/sys/net/core/rmem_default
Rmem_max 4194304 /Proc/sys/net/core/rmem_max
Wmem_default 262144 /Proc/sys/net/core/wmem_default
Wmem_max 1048576 /Proc/sys/net/core/wmem_max
Aio-max-nr 1048576

Note: This value limits concurrent outstanding requests and shocould be set to avoid I/O subsystem failures.

/Proc/sys/fs/aio-max-nr
It is also emphasized that if the Kernel Parameter Value of the current system is greater than the above recommended value, we do not recommend modifying these values.

If you need to modify the parameters, we recommend that you record the modified parameters and values.

Run the following command to view the corresponding Kernel Parameter values:

Parameter Command
Semmsl, semmns, semopm, and semmni #/Sbin/sysctl-a | grep sem

This command displays the value of the semaphore parameters in the order listed.

Shmall, shmmax, and shmmni #/Sbin/sysctl-a | grep shm
File-max #/Sbin/sysctl-a | grep file-max
Ip_local_port_range #/Sbin/sysctl-a | grep ip_local_port_range
Rmem_default #/Sbin/sysctl-a | grep rmem_default
Rmem_max #/Sbin/sysctl-a | grep rmem_max
Wmem_default #/Sbin/sysctl-a | grep wmem_default
Wmem_max #/Sbin/sysctl-a | grep wmem_max
To modify the kernel parameters, edit/etc/sysctl. conf.

After modification, use sysctl-p to take effect. The following content is added and modified:

It is also recommended that an additional parameter be set for 11g R2: fs. aio-max-nr.

8. Modify the resource limits of Oracle software installation users

Official recommendations:

Resource Shell Limit Resource Soft Limit Hard Limit

Open file descriptors

Nofile

At least 1024

At least 65536

Number of processes available to a single user

Nproc

At least 2047

At least 16384

Size of the stack segment of the process

Stack

At least 10240 KB

At least 10240 KB, and at most 32768 KB

Modify/etc/security/limits. conf,

Ora11g soft nproc 2047

Ora11g hard nproc 16384

Ora11g soft nofile 1024

Ora11g hard nofile 65536

Note: But I have not set the stack (11g R2 is recommended), and I do not know if it has any impact.

Type:

Soft refers to the setting value that takes effect for the current system.

Hard indicates the maximum value that can be set in the system.

Soft cannot be more restrictive than hard.

-Indicates that both soft and hard values are set.

Resource:

Nofile indicates the maximum number of opened files.

Nproc indicates the maximum number of processes.

Check the minimum and maximum limits of soft and hard of file descriptor: ulimit-Sn and ulimit-Hn.

Check the minimum and maximum limits of soft and hard processes available to users: ulimit-Su and ulimit-Hu.

Check the maximum and minimum limits of stack soft: ulimit-Ss and ulimit-Hs.

The preceding changes to the limits. conf file must be logged on again to take effect. Before continuing the installation, log on again.

Knowledge Point 4: limits. conf file content:

Soft core 0 prohibits creation of core files

What is a core file? When a program crashes, the stored images of the process are copied to the core file in the current working directory of the process. The core file is just a memory image (same

Debugging information), mainly used for debugging. The core file is a binary file, and a corresponding tool is required to analyze the memory image when the program crashes. System Default

The core file size is 0, so it is not created.

You can use the ulimit command to view and modify the size of the core file.

$ Ulimit-c
0
$ Ulimit-c 1000

$ Ulimit-c

1000

-C specifies the size of the core file, and 1000 specifies the size of the core file. The core file size is not limited, for example:

# Ulimit-c unlimited

# Ulimit-c

Unlimited

If you want the change to take effect permanently, You need to modify the setting file, such as. bash_profile,/etc/profile, or/etc/security/limits. conf.

Hard rss 10000 non-root users use up to 10 MB of memory

Hard nproc 20: the maximum number of processes is 20.

How limits. conf works:

Limits. the backend of conf works like this: limits. conf is the configuration file of pam_limits.so, And then/etc/pam. d/The application under calls pam _***. so module. For example, when a user accesses the server, the service program sends the request to the PAM module. The PAM module sends the request to/etc/pam according to the service name. d directory, select a corresponding service file, and then select a specific PAM module based on the service file content for processing.

For example, the number of services that restrict admin users to log on to sshd cannot exceed 2:

Add session required pam_limits.so to/etc/pam. d/sshd.

Add admin-maxlogins 2 to/etc/security/limits. conf.

9. Add the following content to/etc/pam. d/login:

Session required pam_limits.so

The reason is described above. To make the limits. conf file take effect, make sure that the pam_limits.so file is added to the Startup File.

As mentioned above, you can use ulimit-n 32768 to set the maximum descriptor, but it is only useful for the current session and root, or modify/etc/security/limits. conf, but it must be restarted.

Pam. d Refers to verifying the login configuration and storing the security policy configuration file related to the PAM module. As mentioned above, you need to modify the security policy and load the pam_limits.so module when modifying the maximum number of opened files. Login is the login configuration file. Simply put, this is the login configuration file of the Linux operating system. Each time you log on to the system or change the password, you must first pass the pam verification. The verification rules are defined here. If they match, you can log on to the system.

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.