To install Oracle10g on 2008-06-17centos 4.6, check whether the following package exists: Java code
- Gcc
- Make
- Binutils
- Openmotif
- Setarch
- Compat-gcc
- Compat-gcc-C ++
- Compat-libstdc ++
- Compat-libstdc ++-devel
- 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
- #/Usr/sbin/groupadd oinstall
- #/Usr/sbin/groupadd DBA
- #/Usr/sbin/useradd-m-g oinstall-g dba Oracle
- # ID Oracle
- # 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
- # 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
# 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
- 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
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.
- Oracle soft nproc 2047
- Hard nproc 16384
- Oracle soft nofile 1024
- 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.
- Session required/lib/security/pam_limits.so
session required /lib/security/pam_limits.so
Modify/etc/profile and add the following configuration Java code:
- If[/$ User = "oracle"]; then
- If[/$ Shell = "/bin/KSh"]; then
- Ulimit-P 16384
- Ulimit-N 65536
- Else
- Ulimit-u 16384-N 65536
- Fi
- Umask 022
- 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:
- 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
- TMP =/tmp; export TMP
- Tmpdir = $ TMP; export tmpdir
- Oracle_base =/u01/APP/Oracle; export oracle_base
- ORACLE_HOME = $ oracle_base/product/10.2.0/db_1; export ORACLE_HOME
- Oracle_sid = orcl; export oracle_sid
- Oracle_term = xterm; export oracle_term
- Path =/usr/sbin: $ path; export path
- Path = $ ORACLE_HOME/bin: $ path; export path
- LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
- Classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib
- 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.
- Unzip 10201_database_linux32.zip
- CD database
- ./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.
- 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/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.