Detailed procedure for installing ORACLE11GR2 under centos6.5_x86_64

Source: Internet
Author: User
Tags dba session id readline

Reference Manual: Http://docs.oracle.com/cd/E11882_01/nav/portal_11.htm/Database Quick Installation guide for Linux x86-64 first, pre-preparation:1, Environment Description: linux:64-bit CentOS release 6.5 (Final) Oracle:linux.x64_11gR2_database_1of2.zip linux.x64_11gr2_database_2of 2.zip: Install Oracle 2 on a local virtual machine to a remote server, install the required RPM support package for Oracle Online (choose X86_64 's devel type of installation package, if you don't have a network, go to the iOS installation file to find it, Note that different operating system versions correspond to the same installation package, which is based on the REDHAT5 installation requirements, CentOS is based on the Redhat):      1. binutils-2.17.50.0.6       2. compat-libstdc++-33-3.2.3   (33 = version 3.3, 296 for 2.96)        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   
22. numactl-devel-0.9.8.i386. sysstat-7.0.2 23. unixODBC-2.2.11 (not written in official documents) 24. unixodbc-devel-2.2.11 Description: You can check the installed packages on this machine by Rpm-qa | grep binutils before installing, and then install the packages that are not installed. These packages are available in the system installation files ISO.  3, 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, open the file with vi/etc/sysctl.conf to modify the content, the responsibility to skip, no responsibility to add.      After editing, press ESC, enter ": Wq" to save the parameters are as follows: (1) Shmmax: This parameter defines the maximum size (in bytes) of the 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-size of the largest TCP/IP send windowto make the/etc/sysctl.conf change take effect immediately, execute the following command: > Sysctl-pThe 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 bridge >modprobe Bridge >lsmod | grep BridgeIf there are other errors, it is the spelling error in the profile entry. 4, modify the user's shell limit, modify the/etc/security/limits.conf file   input command: vi /etc/security/limits.conf, press i key to enter the editing mode, add content.                          ,         &NB Sp         oracle   soft     Nproc     4096         &NB Sp           oracle   hard    nproc     16384      oracle   soft     nofile     4096 & nbsp    oracle   hard    nofile     65536      Oracle   soft     stack     10240    Edit after you press ESC, enter ": Wq" to save the exit. 5, modify/etc/pam.d/login   file, enter command: Vi  /etc/pam.d/login, press I to enter edit mode, add the following content to the file.        Session   required    /lib -/security/pam_limits.so Session Required Pam_limits.soNote: If the installed Oracle is 32, the first line should be session required/lib/security/pam_limits.so, or you will have a circular login when you log in. 6, edit  /etc/profile , enter command: Vi  /etc/profile, press I to enter edit mode, add the following content.     7, creating an Oracle user and installation directory.       Create user and user groups, enter commands:              >groupadd   Oinstall                                // Create oracle inventory  group              >GROUPADD  DBA                                  //Create Build 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 home directory of the default normal user Home)              >passwd oracle             &NB Sp                        //Modify the password for the Oracle user       Create the installation directory:             >mkdir - P  /home/oracle/app                         #基目录   &NB Sp          >mkdir/home/oracle/app/orainventory        # The directory is like a registry file under Windows, and whenever software is installed, it will write some registry              >mkdir /home/oracle/ App/oracle                   #oracle数据库目录
>mkdir/home/oracle/app/oracle/product #oracle实例目录 Change Directory owner is owned by Oracle User (prevents insufficient permissions during installation), enter command: >cho Wn-r Oracle:oinstall/home/oracle/app >chmod-r 775/HOME/ORACLE/APP/8, configure environment variables for Oracle users, operate under Oracle user, Into:>su Oracle     >vi/home/oracle/.bash_profile Export EDITOR=VI export ORACLE_SID=ORCL #实例名 export ORACLE_BA Se=/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/sbi N:/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: $PATH Export Erase ^h #用于消除换车键产生的乱码add: If our Linux is mini installed, then there is no JDK, we need to install it: Yum install java-1.7.0-openjdk-devel.x86_64-yNote that the installed directory defaults to the java_home above, but the subsequent version numbers may be different and need to be changed. Two, install Oracleuyn1, installation readiness 1) exit the system to log in as an Oracle user.
2) First copy the Oracle Software installation package to a directory on the Linux system, ensuring that the Oracle user has sufficient permissions to the directory.
     3) open a terminal and run the unzip command to extract the Oracle Software installation package.                 to create a new directory after the decompression is completed, enter the extracted database directory to view.           2.1, start the installation (the system is equipped with a graphical interface)      [[email protected] Database]$  ./runInstaller      installation error:              This can happen , and may not occur, mainly because the installation of Oracle requires a visual interface.       Resolve:            If not resolved, log out, re-login with Oracle user, The graphical interface is then opened with Oracle User execution startx. 2.2, start the installation (the system does not have a graphical interface installed or remote installation of Oracle via SSH)       In this case is not directly installed, because the installation of Oracle requires a graphical interface, can be achieved through Xmanager, Add the configuration as follows:    (1) Install Xmanager, open Xmanager under the xmanager-passive, the user receives the display SSH from the graphical interface.     (2) Re-edit profile: VI  /home/oracle/.bash_profile, add one line:             Export display=192.168.178.1:0.0       #192.168.178.1 is the real IP address of the installation Xmanager physical host. The next 0.0 should be Xmanager's graphical interface certification logo                                (3) [[email protected] Database]$  ./runins Taller           3, installation process Select a common database and configure a database: Create a Desktop database: (note)As soon as the installation is complete, you will be prompted to execute 2 shell scripts with root privileges. Follow the path of its cue   line/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh   and  /home/oracle/orainventory/ 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                                  ,         &NB Sp                          ,         &NB Sp                 >sh  root.sh         #当中有个敲回车的点 &N Bsp                          ,         &NB Sp                          ,         &NB Sp                ②>CD /HOME/ORACLE/APp/orainventory                           &nbs P                          ,         &NB Sp                           >SH  ORAINSTROOT.S h           close:  Third, start the execution of Oracle1, execute >sqlplus/as SYSDBA sql>select table_name from User_tables; Error: Ora-01034:oracle not available ora-27101:shared memory realms does not existlinux-x86_64 Error: 2:no such file or directory Process id:0 Session id:0 Serial number:0 This problem may or may not occur, is generallyoracle_home and ORACLE_SID environment variable error, it is also possible that the ORACLE instance did not start, just the two of me met. First I'm inOracle_home in front of the extra slash, note that the last face can not have a slash:>Echo $ORACLE _home//home/oracle/app/oracle/product/11.2.0/dbhome_1>echo $ORACLE _sid>ORCLPs-ef | grep Smon performs >vi/home/oracle/.bash_profile to view the contents of the file: If only the above error is modified, the same error is reported because our Oracle DB instance does not      Start, see next.           2, after modification, restart Linux, start Oracle instance >sqlplus/as sysdba #注意第一次登陆必须要用管理员的身份登陆 (no password required), because only the administrator has permission to launch the instance. >Startup                       to launch Oracle successfully.       3, switch user, manipulate database.    Four, when you enter the Sqlplus and find that you cannot use the up and down keys to turn over the history command, we can use a third-party toolkit to solve the problem.       (1) Download rlwrap-0.42.tar.gz package;      (2) upload to Linux and perform TAR-ZXVF rlwrap-0.30.tar.gz decompression; nbsp     (3) Enter the unzip directory, compile the configuration file./configure, you may be presented with the following error:                 nbsp       This is due to the lack of readline related packages, execute yum list | grep ReadLine can find these packages, perform yum-y install readline*      (4) If the error is resolved, recompile until error-correct, and then compile the installation software make; make install;& nbsp     (5) Edit Oracle User profile: Vi/home/oracle/.bash_profile, add the following two lines:              & nbsp     alias sqlplus= ' Rlwrap sqlplus '                     alias RM an= ' Rlwrap Rman '              ok, so you can turn up Sqlplus's history commands like windows and up and down.   Installation is complete!   Reprint Please specify the source!

Detailed procedure for installing ORACLE11GR2 under centos6.5_x86_64

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.