Install Oracle10g on centos 4.6

Source: Internet
Author: User
To install Oracle10g on 2008-06-17centos 4.6, check whether the following package exists: Java code
  1. Gcc
  2. Make
  3. Binutils
  4. Openmotif
  5. Setarch
  6. Compat-gcc
  7. Compat-gcc-C ++
  8. Compat-libstdc ++
  9. Compat-libstdc ++-devel
  10. Compat-DB
gccmakebinutilsopenmotifsetarchcompat-gcccompat-gcc-c++compat-libstdc++compat-libstdc++-develcompat-db

If the centos installation disk does not exist, use rpm for installation.
Then, create the Oracle user Java code

  1. #/Usr/sbin/groupadd oinstall
  2. #/Usr/sbin/groupadd DBA
  3. #/Usr/sbin/useradd-m-g oinstall-g dba Oracle
  4. # ID Oracle
  5. # Passwd Oracle
# /usr/sbin/groupadd oinstall  # /usr/sbin/groupadd dba # /usr/sbin/useradd -m -g oinstall -G dba oracle # id oracle #passwd oracle  

Step 3: Create the installation path of Oracle Java code

  1. # Mkdir-P/u01/APP/Oracle
  2. # Mkdir-P/u02/oradata
  3. # Chown-r ORACLE: oinstall/u01/APP/Oracle/u02/oradata
  4. # Chmod-r 775/u01/APP/Oracle/u02/oradata
# mkdir -p /u01/app/oracle # mkdir -p /u02/oradata # chown -R oracle:oinstall /u01/app/oracle /u02/oradata # chmod -R 775 /u01/app/oracle /u02/oradata 

/U01 stores program files and configuration files
/U02 store data files
Step 4: Modify Linux Kernel Parameters
Modify/etc/sysctl. conf with the following content:

Java code
  1. Kernel. Shmall = 2097152
  2. Kernel. shmmax = 2147483648
  3. Kernel. shmmni = 4096
  4. Kernel. SEM = 250 32000 100 128
  5. FS. File-max = 65536
  6. Net. ipv4.ip _ local_port_range = 1024 65000
  7. Net. Core. rmem_default = 262144
  8. Net. Core. rmem_max = 262144
  9. Net. Core. wmem_default = 262144
  10. Net. Core. wmem_max = 262144
   kernel.shmall = 2097152    kernel.shmmax = 2147483648    kernel.shmmni = 4096    kernel.sem = 250 32000 100 128    fs.file-max = 65536   net.ipv4.ip_local_port_range = 1024 65000    net.core.rmem_default=262144   net.core.rmem_max=262144   net.core.wmem_default=262144   net.core.wmem_max=262144  

Run the sysctl-p command to confirm after editing.
Step 5: Set shell restrictions for oracle users
Add the Java code to the/etc/security/limits. conf configuration file.

  1. Oracle soft nproc 2047
  2. Hard nproc 16384
  3. Oracle soft nofile 1024
  4. Oracle hard nofile 65536
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536

In addition, add the Java code to the/etc/PAM. d/login file.

  1. Session required/lib/security/pam_limits.so
session required /lib/security/pam_limits.so  

Modify/etc/profile and add the following configuration Java code:

  1. If[/$ User = "oracle"]; then
  2. If[/$ Shell = "/bin/KSh"]; then
  3. Ulimit-P 16384
  4. Ulimit-N 65536
  5. Else
  6. Ulimit-u 16384-N 65536
  7. Fi
  8. Umask 022
  9. Fi
if [ /$USER = "oracle" ]; then  if [ /$SHELL = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fiumask 022fi

Note that the following Java code configures the/etc/SELinux/config configuration file:

  1. SELinux = disabled
SELINUX=disabled 

To disable SELinux Security Settings
After setting, restart
Step 6: Set the Oracle user's environment variables. you can log on as an oralce user. If you log on as a root user, note that the file should be under the/home/Oracle/directory and the file name is. bash_profile (because Bash is used), set the Oracle environment variable Java code

  1. TMP =/tmp; export TMP
  2. Tmpdir = $ TMP; export tmpdir
  3. Oracle_base =/u01/APP/Oracle; export oracle_base
  4. ORACLE_HOME = $ oracle_base/product/10.2.0/db_1; export ORACLE_HOME
  5. Oracle_sid = orcl; export oracle_sid
  6. Oracle_term = xterm; export oracle_term
  7. Path =/usr/sbin: $ path; export path
  8. Path = $ ORACLE_HOME/bin: $ path; export path
  9. LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
  10. Classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib
  11. Export classpath
TMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOMEORACLE_SID=orcl; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERM PATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport CLASSPATH 

Set the directory to the actual directory.
Step 7: Install and decompress the installation file. Note that you must install the Java code as an oracle user.

  1. Unzip 10201_database_linux32.zip
  2. CD database
  3. ./Runinstaller
unzip 10201_database_linux32.zipcd database./runInstaller 

During the installation process, two scripts are displayed as root. You can run the su command to switch to root.

After installation, You can edit the/etc/rc. d/rc. Local file and add the Java code.

  1. Echo "Starting Oracle 10g"
  2. Su-Oracle-c "/u01/APP/Oracle/product/10.2.0/db_1/bin/LSNRCTL start"
  3. Su-Oracle-c "/u01/APP/Oracle/product/10.2.0/db_1/bin/dbstart>/dev/Null2> & 1 &"
echo "Starting ORACLE 10g"su - oracle -c "/u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start"su - oracle -c "/u01/app/oracle/product/10.2.0/db_1/bin/dbstart >/dev/null 2>&1 &“

Enable Oracle to automatically start with Linux

In addition, there are two ways to install Linux that are not supported
1. For example, rhel5.1 does not support 10.2 or 0.1. Modify the installation file.
# Vi/10201_database_linux32/database/install/oraparam. ini
#### [Certified versions]
Linux = redhat-3, SuSE-9, redhat-4, redhat-5, UnitedLinux-1.0, asianux-1]
Add more
Linux-redhat-5.0-optional
Temp_space = 80
Swap_space = 150
Min_display_colors = 256
2. Run the runinstaller-ingoresysprereqs command to ignore the operating system check.

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.