Oracle 11g R2 Database installation toss in CentOS

Source: Internet
Author: User
Tags dba

1. Acquisition of the CentOS image on the virtual machine. It is recommended that the CentOS7 version of the NetEase Mirror Station (other open source mirror stations may also). Here are the links:

Http://mirrors.163.com/centos/7.3.1611/isos/x86_64/CentOS-7-x86_64-DVD-1611.iso

PS: This is 64-bit, and now few people use the 32-bit system. Installation of the CentOS system (many online tutorials, not to repeat here)

PS: It is best to keep a space of about 10G (the installation package has 2G, plus the final installation of the volume, a lot of points, the author is not enough to install, then the virtual machine in the expansion of space is a very troublesome thing)

PS: Best memory 2G and above 2G

2.oracle installation package gets. Baidu Paste in the Oracle installation package is mostly Windows system version. We need a Linux version, it is recommended to get it directly from the official website:

Http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of2.zip

Http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of2.zip

There are two packages, but if you click the link directly, you will be prompted to log in to your Oracle account to download. Therefore, I recommend the use of download software (the author uses the Thunderbolt 9) directly add download links to download

3. When the download is complete, unzip to the current folder. A database folder will appear. This completes the preparation of the installation package. The play and the trouble came.

To switch to the root user in the CentOS terminal, we need to update some packages. Toggle command:

Su

Then enter the root user password (r) if it is the root user for the first time, you will be prompted to set the password.

Then we need to update the following packages (the version is higher than the following, some have the latest version, the system will not be updated, this time directly next can be):

binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3   (33 = version 3.3, 296 for 2.96)  elfutils-libelf-0.125  elfutils-libelf-devel-0.125  elfutils-libelf-devel-static-0.125  gcc-4.1.2  gcc-c++-4.1.2  glibc-2.5-24  glibc-common-2.5  glibc-devel-2.5  glibc-headers-2.5  kernel-headers-2.6.18  ksh-20060214  libaio-0.3.106  libaio-devel-0.3.106  libgcc-4.1.2  libgomp-4.1.2  libstdc++ -4.1.2  libstdc++-devel-4.1.2  make-3.81  numactl-devel-0.9.8.i386  sysstat-7.0.2  unixODBC-2.2.11             

Examples of INSTALLATION commands:

Yum Install GCC

The package does not need to be similar to the version number and other packages.

4. Before starting the installation, we will first configure the kernel parameters to ensure the normal operation of Oracle (Oracle boot requires more resources). the configuration is as follows:

Modify the file/etc/sysctl.conf, here the author uses

Gedit/etc/sysctl.conf

Open the file modify the content, the responsibility to skip, no responsibility to add

Modify the following:

Kernel.shmall=4294967296kernel.shmmax=68719476736fs.file-max=6815744fs.aio-max-nr=1048576kernel.shmmni= 4096kernel.sem=800 113600 142net.ipv4.ip_local_port_range=1024 65500net.core.rmem_default=262144net.core.rmem_ max=4194304net.core.wmem_default=262144net.core.wmem_max=1048576

Each parameter has the following meanings:

(1) Shmmax: This parameter defines the maximum size (in bytes) of a shared memory segment, which is typically set to 2G or greater.

(2) Shmmni: Used to set the maximum number of shared memory segments within a system range. The default value is 4096, which is usually not required to change. (3) Shmall: This parameter represents the total amount of shared memory (in pages) that the system can use at one time. The default value is 2097152, which does not need to be modified if the system is automatically generated. (4) SEM: This parameter represents the set semaphore, when the processes parameter setting in the Oracle DB initialization parameter file is large, the SEM settings such as: Kernel.sem = 250 32000 100 128 are defined as follows. SEMMSL semmnssemopm Semmni

SEMMSL should be set to the largest processes parameter +10 in each instance of the server, such as when the maximum processes parameter is 5000, the SEMMSL should be set to 5010.
The Semmns parameter should be set to Semmsl*semmni, as the example SEMMSL for the 5010,semmns parameter should be (5010*128) = 641280. The SEMOPM parameter should be set to the same as the SEMMSL parameter, which should be set to 5010 in the next example
(5) File-max: This parameter represents the maximum number of file handles. The file handle setting indicates the number of files that can be opened on a Linux system.

(6) rmem_default-default TCP/IP receive buffer size (7) rmem_max-maximum TCP/IP Receive window size (8) wmem_default-default TCP/IP Send window size (9) wmem_max-maximum tcp/i P size of the sending window if you want the/etc/sysctl.conf change to take effect immediately, execute the following command:
Sysctl-  P
The following error may have occurred: error: "Net.bridge.bridge-nf-call-ip6tables" is an unknown key
Error: "Net.bridge.bridge-nf-call-iptables" is an unknown key
Error: "Net.bridge.bridge-nf-call-arptables" is an unknown key solution:
Lsmod | grep bridgemodprobe  bridgelsmod | grep bridge
5. Modify the user's user's shell limit, modify the/etc/security/limits.conf file Input command:
Gedit/etc/security/limits.conf
Add content below: and save exit
Oracle   Soft     nproc    4096                Oracle   hard    nproc    16384 oracle   soft     nofile    4096 Oracle   hard    nofile    65536oracle   soft     stack    10240

6. Modify the/etc/pam.d/login file, enter the command: Gedit/etc/pam.d/login, and add the following to the file.

Session   required    /lib64/security/pam_limits.so    session   required    pam_limits.so      

7. Edit/etc/profile, enter command: Gedit/etc/profile, add the following content.

if[$USER = "Oracle"];then    if[$SHELL = "/bin/ksh"];then        ulimit-p 16384        ulimit-n 65536    Else        Ulimit-u 16384-n 65536    Fifi

8. Create an Oracle user and installation directory

PS: The installation directory can be later logged into the system with an Oracle account and created via a graphical interface

To create a user and user group, enter a command:

Groupadd  oinstall                                //Create Oracle Inventory Group Groupadd  dba                                     //create Group DBA Group USERADD-G oinstall-g dba Oracle         Create Oracle Software owner (-G for secondary group,-G for primary group) (can also be followed by-D dir, which indicates the location of the user's home directory, the default normal user's home directory is under                                      /////) passwd Oracle//Modify the Oracle user's password

Then set the password (the password in Linux will not be displayed, and will not show "*", here do not suspect that their keyboard is broken)

Then we create a Health installation directory (can later log in after the use of graphical interface to create health)

Mkdir-p  /home/oracle/app                        #基目录mkdir/home/oracle/app/orainventory        #该目录就像Windows下的注册表文件, whenever there is software installed, Will write some registry mkdir/home/oracle/app/oracle                   #oracle数据库目录mkdir/home/oracle/app/oracle/product    #oracle实例目录

Changing the directory owner is owned by the Oracle user (preventing an issue with insufficient permissions during installation), enter the command:

Chown-r oracle:oinstall  /home/oracle/appchmod-r 775  /home/oracle/app/

9. Configure the Oracle user's environment variables to operate under the Oracle user, enter:

Su Oracle

Then enter the password you set in the previous step login, enter Vim/home/oracle/.bash_profile, press i key into the insert mode, enter in the inside, press the ESC key, and then press: Wq exit

We then enter gedit/home/oracle/.bash_profile into the editor and add:

Export  editor=vi  export  oracle_sid=orcl         #实例名 export  oracle_base=/home/oracle/app  Export Oracle_home= $ORACLE _base/oracle/product/11.2.0/dbhome_1 Export  inventory_location=/home/oracle/app/ Orainventory export  ld_library_path= $ORACLE _home/lib:/usr/lib export  nls_lang= "AMERICAN_AMERICA.ZHS16GBK "Export  nls_date_format= ' yyyy-mm-dd hh24:mi:ss ' export  path= $PATH: $HOME/bin: $ORACLE _home/bin:/bin:/usr/ Bin:/usr/sbin:/usr/local/bin umask 022 Export java_home=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64 export JRE_ Home= $JAVA _HOME/JRE export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH export path= $JAVA _home/bin: $JRE _ Home/bin: $PATHexport Erase ^h     #用于消除换车键产生的乱码

10. Preparation before installation

Restart the CentOS system and log in with your Oracle account

Copy the database folder in step 3rd into the home folder.

(You can create a new folder before creating it)

11. Start the installation.

Enter the command to switch to database, and then enter the installation command

Cd/database
./runinstaller

12. Installation process

After this step or before there may be a problem (the author appeared many times, tossing for a few days), problems such as:

The installation screen suddenly darkened and a vertical line appeared in the middle. The card will not move at this time. In fact, this is a window, but the Linux GUI you know, not show it. Pressing the ENTER key at this point may go to the next step. If not, change the password to more than 8 digits including capital letters, lowercase letters, numbers, and the correct installation path under the check car. Then click Next and press ENTER. After this problem is also stuck, you can try to press the right Shift button, and then press ENTER.

As soon as the installation is complete, you will be prompted to execute 2 shell scripts with root privileges. Perform/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh and/home/oracle/orainventory/as indicated by their path Orainstroot.sh, there will be a message when the installation is complete. Execute command:

CD  /home/oracle/app/oracle/product/11.2.0/dbhome_1     sh  root.sh         #当中有个敲回车的点cd/home/oracle/app/ Orainventory SH  

The installation is complete!

 

Oracle 11g R2 Database installation toss in CentOS

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.