Install Oracle 11g on CenOS

Source: Internet
Author: User

Install Oracle 11g on CenOS
1. System check 1.1 memory requirements:
Memory I set 1.5 GB (unit: 4 GB memory)
# Cat/proc/meminfo // view memory size

1.2 requirements for swap partitions:
Swap partition is 1.5 times the memory, which can be adjusted according to the actual situation
# GrepSwapTotal/proc/meminfo // view swap partition size

1.3 hard disk space requirements
Hard Disk Space must meet the required software size,/tmp partition not less than 400 M, installation directory should be greater than 4G:
# Df-h // view disk space usage
# Du-ch // view the directory space size
2. Update the system to the latest version before installing it.
Yum list updates
Yum upgrade
Reboot3. install the oracle dependent component package yum-y install \
Binutils \
Compat-libcap1 \
Compat-libstdc ++-33 \
Compat-libstdc ++-33 *. i686 \
Elfutils-libelf-devel \
Gcc \
Gcc-c ++ \
Glibc *. i686 \
Glibc \
Glibc-devel \
Glibc-devel *. i686 \
Ksh \
Libgcc *. i686 \
Libgcc \
Libstdc ++ \
Libstdc ++ *. i686 \
Libstdc ++-devel \
Libstdc ++-devel *. i686 \
Libaio \
Libaio *. i686 \
Libaio-devel \
Libaio-devel *. i686 \
Make \
Sysstat \
UnixODBC \
UnixODBC *. i686 \
UnixODBC-devel \
UnixODBC-devel *. i686 \
LibXp4. Configure the system environment 4.1 and modify the kernel parameters: # vi/etc/sysctl. conffs. file-max = 6815744 // file-max specifies the number of file handles that can be opened by all processes in the system range (system level, kernel-level ). (The value in file-max denotes the maximum number of file handles that the Linux kernel will allocate ). When an error message like "Too open files in system" is received, this value should be added. Fs. aio-max-nr = 1048576net. ipv4.ip _ local_port_range = 9000 65500net. core. rmem_default = 262144net. core. rmem_max = 4192134net. core. wmem_default = 262144net. core. wmem_max = 1048576kernel. sem = 250 32000 100 128 // semmal semmns semopm semmnisemmal signal set from left to right contains the maximum number of Signals
Maximum number of all SEMMNS Signals
SEMOPM calls the maximum number of signals in a single Signal Set
The maximum value of the SEMMNI signal set. shmall = 2097152 (you can follow the system default, do not modify) kernel. shmmax = 536870912 (you can follow the system default, do not modify) # sysctl-p // Let the Kernel Parameter take effect 4.2 modify the number of processes and maximum number of sessions # vi/etc/security/limits. conforacle soft nproc 2047 // No # oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 655364.3 Association settings # vi/etc/pam. d/loginsession required pam_limits.so4.4 Modify/etc/profile # vi/etc/profileif [$ USER = "oracle"]; thenif [$ SHELL = "/bin/ksh"]; thenulimit-p 16384 ulimit-n 65536 elseulimit-u 16384-n 65536 fifi5. Create an installer, group, and directory 5.1 create installer and group # groupadd oinstall // create oinstall group # groupadd dba // create dba group # useradd-g oinstall-G dba oracle // create an oracle user, set the master group to oinstall, dba # id oracle // check result # passwd oracle // set oracle user password 5.2 create software installation directory # mkdir-p/home/oracle_11/app // create and install root directory # chown-R oracle: oinstall/home/oracle_11 // the user and group of the installation root directory are oracle users and oinstall group # chmod-R 755/home/oracle_11 // modify the access permission of the directory full user control, group and other users can read and execute 5.3 to set user environment variables # vi/home/oracle /. bash_profile export ORACLE_BASE =/home/oracle_11/app // software installation base Directory export ORACLE_SID = orcl // Instance name export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1 // Software Installation product directory export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin # source/home/oracle /. bash_profile // load the file to make the configuration take effect # env | more // check whether the configured environment variables are correct6. Install Oracle11g # cp release/home/oracle_11/app/# cp release/home/oracle_11/app/# unzip restart & unzip linux.x64_11gr2_database5of2.zip and restart it by reboot. conclusion) # xhost + // if not executed, the graphic installation interface cannot be started
# Su-oracle // switch to the oracle user. Add "-". Otherwise, the user's environment variables will not change.
# Cd/home/oracle_11/app/database
#. /RunInstaller select the installation location and enter the Instance name and GLobal IDEntifier, which are consistent with the previous user environment variable configuration to specify the configuration option, enable automatic configuration memory management and switch to the root user, execute script 1, 2/home/oracle_11/oraInventory/orainstRoot. sh/home/oracle_11/app/product/11.2.0/dbhome_1/root. sh is installed successfully !!! (One day ...) After the installation is complete, the terminal prompts you where to save the Installation Log:
[Oracle @ masterdatabase] $ Youcanfindthelogofthisinstallsessionat:/home/oracle_11/oraInventory/logs/installActions2015-07-19_06-49-03PM.log log on to the EM console to view the situation https: // 192.168.209.128: 1158/em (cannot log on to IE browser, is the certificate length limit of IE, doscommand line executes certutil-setreg chain \ EnableWeakSignatureFlags 8)7. Service Startup 7.1 manually enable Oracle in the Linux service and the service is running after installation. After the machine is restarted, Oracle does not add Oracle to the Windows service as in Windows. In linux, You need to manually start the Oracle service. After the restart, log on as an oracle user: $ sqlplus // enter sqlplus $ lsnrctl start // start the listener $ export ORACLE_UNQNAME = orcl // set the oracle environment variable UNQNAME $ emctl start dbconsole // start the EM console and log on to EM with IE console User Name: sys password: ****** 7.2 auto start service 7.2.1 modify $ ORACLE_HOME/bin/dbstart and $ ORACLE_HOME/bin/dbshut file: $ vi $ ORACLE_HOME/bin/dbstart
$ Vi $ ORACLE_HOME/bin/dbshut
Locate ORACLE_HOME_LISTNER = $1 and change it to ORACLE_HOME_LISTNER = $ ORACLE_HOME.
7.2.2: Modify the/etc/oratab file:
$ Vi/etc/oratab
Find the last line:
Orcl:/home/oracle_11/app/product/11.2.0/db_home_1: N
The last setting is "N" (there is only one instance in this environment, so there is only one line of configuration statement). You need to change "N" to "Y ". Save and exit.
7.2.3: test whether the command can start the oracle service:
$ Cd $ ORACLE_HOME/bin // enter the bin directory of the oracle Installation Directory
$./Emctlstartdbconsole // enable the EM Console
$./Lsnrctlstart // enable the listener
$./Dbstart // enable the database instance
7.2.4: Modify the/etc/rc. d/rc. local file.
Add emctlstartdbconsole, lsnrctlstart, and dbstart to the rc. local file. The command is as follows:
# Vi/etc/rc. d/rc. local
Add:
Suoracle-lc "home/oracle_11/app/product/11.2.0/dbhome_1/bin/emctlstart dbconsole" // enter the complete path of the executable program
Suoracle-lc "home/oracle_11/app/product/11.2.0/dbhome_1/bin/lsnrctlstart"
Suoracle-lc "home/oracle_11/app/product/11.2.0/dbhome_1/bin/dbstart"
Note: The command contains spaces, which must be enclosed in quotation marks.

After the system is restarted, the service is automatically enabled.

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.