Install Oracle 11g R2 on CentOS 6.2 X64 in KVM. install the Master System CetnOS6.2x64 Englis minimal install configure network IP and Bridge Mode vi/etc/sysconfig/network-scripts/ifcfg-eth0 vi/etc/sysconfig/network-scripts/ifcfg-br0 www.2cto.com service network restart vi/etc/selinux/configSELINUX = disabled yum install qemu-kvm libvirt virt-install bridge-utils reboot lsmod | grep kvmstat/dev/kvmvirsh-c qemu: /// system list #/etc/init. d/libmongod restart reboo T virt-install -- name COSOraVnc -- ram 2048 -- vcpus = 4 -- disk path =/kvm/img/linux/COSOraVnc. img, size = 100 -- accelerate -- location/tools/CentOS6.2 _ 64_1.iso -- graphics vnc, port = 6902, listen = 0.0.0.0, password = medusa www.2cto.com in another graphical interface, complete subsystem 2 Environment: Operating System: CetnOS6.2x64 minimal installation. The network IP address has been configured, the physical memory is 2 GB, and the hard disk is 100 GB. Swap 2G/boot 800 M/opt 20G/home 30G/the remaining space linux.x64_11gr2_database5of2.zip is located in the/opt/3 directory. After the root user logs on, # yum install unzip/download unzip, decompress the preceding two compressed files # cd/opt // switch the current directory to the directory where the oracle compressed files are located # unzip // decompress # unzip linux.x64_11gr2_database204 f2.zip and then add a/opt/database directory, it contains all the oracle installation files after decompression. In the/etc/hosts file, add the Host Name (obtained through hostname) to the loopback IP address ing as follows: 127.0.0.1 localhost. localdomain localhost4 localhost4.localdomain4 oracle11gcentos6.dlxg.gov.cn: 1 localhost. localdomain localhost6 localhost6.localdomain6 guest # vi/etc/selinux/conf set SELINUX = disabled # setenforce 0 // disable selinux # service iptables stop // temporarily disable the firewall www.2cto.com 4 install the required package yum install gcc make binutils gcc-c ++ compat-libstdc ++-33 yum install elfutils-libelf-devel-static yum install ksh yum install libaio-devel numactl- devel sysstat yum install unixODBC-devel pcre-devel yum install mesa-libGL.i686 yum install wget www.2cto.com wget ftp://ftp.icm.edu.pl/vol/rzm2/linux-slc/slc41/x86_64/SL/RPMS/pdksh-5.2.14-30.x86_64.rpm Rpm-ivh pdksh-5.2.14-30.x86_64.rpm 5 prepare to install users and user groups # groupadd oinstall # groupadd dba # useradd-g oinstall-G dba-d/home/oracle # passwd oracle // set oracle password 6 modify the kernel parameter configuration file # vim/etc/sysctl. add fs. conf at the end of the file. aio-max-nr = 1048576 fs. file-max = 6553600 kernel. shmall = 2097152 kernel. shmmax = 2147483648 kernel. shmmni = 4096 kernel. sem = 250 32000 100 128 net. ipv4.ip _ local_port_range = 9000 65500 net. cor E. rmem_default = 262144 net. core. rmem_max = 4194304 net. core. wmem_default = 262144 net. core. wmem_max = 1048586 save the file. #/Sbin/sysctl-p // make the parameter take effect www.2cto.com 7 modify the user's restricted file # vim/etc/security/limits. add oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 after the conf file to save the file. Modify/etc/pam. d/login file, add the following: session required/lib64/security/pam_limits.so // 64 is the system, do not write/lib/security/pam_limits.so, otherwise, you cannot log on to the session required pam_limits.so to modify/etc/profile and add: if [$ USER = "oracle"]; then if [$ SHELL = "/bin/ksh"]; then ulimit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 fi fi8 create the installation directory and set file permissions # mkdir/opt/Oracle/11.2.0 // database system installation directory # mkdir/opt/oradata // data Library Data installation directory # mkdir/opt/oradata_back // Data Backup Directory # mkdir/home/Oracle/inventory // List Directory # chown-R oracle: oinstall/opt # chown-R oracle: oinstall/home/Oracle/inventory # chmod-R 775/opt www.2cto.com 9 edit the Silent Installation response file # su-oracle $ cp-R/opt/database/response/home/Oracle/ /copy a template $ cd/home/Oracle/response $ mv db_install.rsp db_install_swonly.rsp // because the following installation only installs software and does not start the database instance, therefore, if you change the name to prompt yourself $ vi db_install_swonly.rsp // To modify the installation response file, set the following options: oracle. install. responseFileVersion =/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 // generated by the system. Do not modify oracle. install. option = INSTALL_DB_SWONLY // only install software, do not install start database ORACLE_HOSTNAME = export UNIX_GROUP_NAME = oinstall INVENTORY_LOCATION =/home/Oracle/inventory SELECTED_LANGUAGES = en, zh_CN ORACLE_HOME =/opt/Oracle/11.2.0 ORACLE_BASE =/opt/Oracle or Acle. install. db. installEdition = EE oracle. install. db. isCustomInstall = false www.2cto.com oracle. install. db. customComponents = oracle. server: 11.2.0.1.0, // retain the default oracle. sysman. cr: 10.2.7.0.0, oracle. xdk: 11.2.0.1.0, oracle. rdbms. oci: 11.2.0.1.0, oracle. network: 11.2.0.1.0, oracle. network. listener: 11.2.0.1.0, oracle. rdbms: 11.2.0.1.0, oracle. options: 11.2.0.1.0, oracle. rdbms. partitioning: 11.2.0.1.0, oracle. oraol Ap: 11.2.0.1.0, oracle. rdbms. dm: 11.2.0.1.0, oracle. rdbms. dv: 11.2.0.1.0, orcle. rdbms. lbac: 11.2.0.1.0, oracle. rdbms. rat: 11.2.0.1.0 oracle. install. db. DBA_GROUP = dba oracle. install. db. OPER_GROUP = dba DECLINE_SECURITY_UPDATES = true // be sure to set it to true www.2cto.com 10. Install oracle $ cd/opt/database $ according to the response file. /runInstaller-silent-responseFile/home/oracle/response/db_install_swonly.rsp Successfully Setup Software. indicates that the installation is successful.. Follow the prompts. $ Exit // return to root #/home/oracle/inventory/orainstRoot. sh #/opt/oracle/11.2.0/root. sh by panpanxj