If reproduced, please indicate the source: http://blog.csdn.net/robinson_0612/archive/2010/03/30/5431428.aspx
Although Oracle 10g Database Release 2 has been released for several years, this version is still a version that many beginners learn. The following describes how to install Oracle 10g in detail.
I. Linux version Selection
Currently, the main version of Linux (RHEL) is version 5.4. You can download the installation file at the following address.
Rhel5.4 download http://download.chinaunix.net/download/0013000/12623.shtml
Ii. Installation of Linux
Many beginners use virtual machines on the XP system to install linux. Therefore, this article also installs Linux on the virtual machine and then installs Oracle 10g.
For virtual machines, you can use VMware 6.5 workstation, which can be found at Baidu or Google. When installing Linux, We need to configure the Oracle installation environment. For details about how to configure the Oracle installation environment, see install RHEL 5.4 Under vmware6.5.2 (configure the Oracle installation environment)
Iii. Environment check before Oracle Installation
1. Download Oracle 10g r2
Oracle 10g for Linux http://www.oracle.com/technology/software/products/database/index.html
2. Check the Linux kernel parameters. This is a bit redundant. As a beginner, you can still practice it. Ensure that the kernel is higher than 2.6.9-5.0.5.el.
We strongly recommend that you install securecrt or VNC so that you do not have to switch back and forth between XP and Linux.
Uname-R
[Root @ localhost ~] # Uname-R
2.6.18-164. el5xen
3. View CPU, memory, swap, and disk space
Memory: at least 1 GB; medium: 900 MB
Swap: generally 2 times the available physical memory, for example, set to 2 GB
/Temp partition: at least 400 mb
Partitions in the Oracle Installation Directory: at least 4 GB
[Root @ localhost ~] # Free-m
Total used free shared buffers cached
Mem: 900 568 331 0 56 356
-/+ Buffers/cache: 154 745
Swap: 2251 0 2251
[Root @ localhost ~] # DF-H
Filesystem size used avail use % mounted on
/Dev/sda2 6.4 GB 3.8g 2.3g 63%/
/Dev/sdd1 6.8g 144 M 6.3g 3%/u01
/Dev/sdc2 1.2G 34 m 1.1G 3%/home
/Dev/sdc1 760 m 17 m 704 M 3%/tmp
/Dev/sda1 456 M 18 m 415 M 5%/boot
Tmpfs 450 m 0 450 m 0%/dev/SHM
None 450 m 104 K 450 m 1%/var/lib/xenstored
/Dev/HDC 2.8g 2.8g 0 100%/Media/rhel_5.4 i386 DVD
4. Configure the installation environment
1. Install the patch
To check whether the patch package has been installed, use the following method:
Rpm-q gcc make binutils openmotif setarch compat-DB compat-gcc/
Compat-gcc-C compat-libstdc-devel
For details about how to use the RPM tool, refer to: rpm usage introduction.
The RHEL 5.4 file I provided is an ISO file. We can mount it to a directory to install patches.
Use the root account to create a mount directory
Mkdir/mnt/CDROM
Mount/dev/CDROM/mnt/CDROM
Install the following packages
CD/mnt/CDROM/Server
Setarch-2 rpm-uvh *
Rpm-uvh make-3 *
Glibc-2 rpm-uvh *
Libaio-0 rpm-uvh *
Rpm-uvh compat-libstdc ++-33-3 *
Compat-gcc-34-3 rpm-uvh *
Rpm-uvh compat-gcc-34-c ++-3 *
Gcc-4 rpm-uvh *
LibXp-1 rpm-uvh *
Openmotif-2 rpm-uvh *
Compat-db-4 rpm-uvh *
2. Host and network settings
If you use this machine as a server, we recommend that you use a fixed IP address. Dynamic IP addresses can be used in the test environment.
Vim/etc/sysconfig/Network
Networking = Yes
Networking_ipv6 = No
Hostname = robinson.com
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
You do not need to change
# Advanced Micro Devices [amd] 79c970 [pcnet32 Lance]
Device = eth0
Bootproto = DHCP
Hwaddr = 00: 0C: 29: 59: 52: bb
Onboot = Yes
Vim/etc/hosts
# Do not remove the following line, or various programs
# That require Network functionality will fail.
127.0.0.1 localhost. localdomain localhost
: 1 localhost6.localdomain6 localhost6
192.168.1.101 mongoson.com Robinson
3. Set Kernel Parameters
Add the following lines at the end of the sysctl. conf file:
Vim/etc/sysctl. conf
Kernel. Shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
# Semaphores: semmsl, semmns, semopm, semmni
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 following command to make the settings take effect:/Sbin/sysctl-P
Add the following lines at the end of the limit. conf file:
Vim/etc/security/limits. conf
* Soft nproc 2047
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536
Add the following lines at the end of the login file:
Vim/etc/PAM. d/login
Session required pam_limits.so
Modify the config file so that SELinux = disabled
Vim/etc/SELinux/config
SELinux = disabled
4. Create an account and installation directory
Groupadd oinstall
Groupadd DBA
Groupadd rule
Useradd-G oinstall-g dba Oracle
Passwd Oracle
Id Oracle
After successful creation:
[Root @ localhost ~] # ID Oracle
Uid = 500 (Oracle) gid = 500 (oinstall) groups = 500 (oinstall), 501 (DBA)
Mkdir-P/u01/APP/Oracle/
Chown-r ORACLE: oinstall/u01/APP/Oracle
Chmod-r 775/u01/APP/Oracle
5. Create environment variables for Oracle accounts
Su-Oracle
Vim ~ /. Bash_profile
Export oracle_base =/u01/APP/Oracle;
Export ORACLE_HOME = $ oracle_base/10g
Export oracle_sid = orcl
Path = $ path: $ home/bin: $ ORACLE_HOME/bin
Export path
Export lang = en
6. Modify the version number of Linux (because the version is 5.4, to avoid failed check, modify the version number)
[Root @ Robinson ~] # Cat/etc/issue
Red Hat Enterprise Linux Server Release 5.4 (tikanga)
Kernel/r on an/m
Use Vim to modify the version number
Vim/etc/issue
[Root @ Robinson ~] # Cat/etc/issue
Red Hat Enterprise Linux Server Release 4.4 (tikanga)
Kernel/r on an/m
7. After completing the preceding steps, we recommend that you restart Linux.
8. Use root to execute hostx +
[Root @ Robinson ~] # Xhost +
Access Control Disabled, clients can connect from any host
9. If the Oracle 10g installation file has been downloaded to the Linux system, unzip 10201_database_linux32.zip will be used to decompress it to the specified folder.
My installation file is in windows, so it is converted into an ISO file and loaded to the optical drive.
[Root @ Robinson ~] # Mount/dev/CDROM/mnt/CDROM
[Oracle @ Robinson ~] /Mnt/CDROM/runinstaller
5. Install
Run the following two scripts before installation:
[Root @ Robinson ~] #/U01/APP/Oracle/orainventory/orainstroot. Sh
Changing permissions of/u01/APP/Oracle/orainventory to 770.
Changing groupname of/u01/APP/Oracle/orainventory to oinstall.
The execution of the script is complete
[Root @ Robinson ~] #/U01/APP/Oracle/10g/root. Sh
Running oracle10 root. Sh script...
The following environment variables are set:
Oracle_owner = Oracle
ORACLE_HOME =/u01/APP/Oracle/10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to/usr/local/bin...
Copying oraenv to/usr/local/bin...
Copying coraenv to/usr/local/bin...
Creating/etc/oratab file...
Entries will be added to the/etc/oratab file as needed
Database Configuration assistant when a database is created
Finished running generic part of root. Sh script.
Now product-specific root actions will be saved med.
Vi. Others
1. Some operations are not specified, such as creating a user or group. They are completed at the root user # prompt.
2. You can change the Linux version back to version 5.4.
VII. More references
1. Install RHEL 5.4 Under vmware6.5.2 (configure the Oracle installation environment)
2. Use uniread to implement the SQL plus paging Function
3. Introduction to RPM