The entire process of deploying oracle10gr2 databases on Linux servers

Source: Internet
Author: User

The entire process of deploying oracle10gr2 databases on Linux servers

Recently, Oracle Server deployment on Linux is not easy for the Linux cainiao. But it succeeded. The author records the entire deployment process to make it easier for more friends.
Before the beginning of the text, I would like to thank the netizens in the csdn Linux region and some friends from the Linux chat QQ group. They took the trouble to perform Linux "literacy" for me ", patiently help me analyze every error and provide some valuable documents. Without their help, it is hard to imagine my current situation.
Background: 2 Pentium (r) dual-core CPU e5200 @ 2.50 GHz, 64-bit
1. Download the Linux image file.
Centos5.4,: http://isoredirect.centos.org/centos/5/isos/i386/ is recommended. This is a 32-bit Linux system image Installation File, enter the download page, if it is a DVD Disc installation, you can only select the CentOS-5.4-i386-bin-DVD.torrent to download, download and get a 3.9 GB CentOS-5.4-i386-bin-DVD.iso scene file. 64-bit can be downloaded here: http://isoredirect.centos.org/centos/5/isos/x86_64.
2. Burn an image to an image disc.
We recommend that you use a CD-based master. The detailed steps are not described here. For details, refer to the author's previous blog "how to install the Ubuntu 9.10 Server Version System".


3. install Linux.
Prepare the information before installation, such as the server IP address (e.g. 192.168.6.152), subnet mask (e.g. 255.255.255.0), default gateway (e.g. 192.168.6.2), and DNS server (e.g. 202.102.152.3; 202.102.128.68 ); host Name (such as Superman ). If this is not said, You can directly set the bios and insert the disc as required. Pay attention to the following points: Select Simplified Chinese as the language; default keyboard; default mouse; default installation type; Delete Linux partitions and default partitions as the partition; set static IP addresses and cancel DHCP; Time Zone Shanghai; set a password for the root user, select installation for all optional packages, and disable the firewall.

Table of partition types in Linux:


4. patch the system.
After step 3 is completed, the Linux installation is complete, but as an Oracle server, we also need to determine the installed patch. These patches can be found in the centos directory where the DVD is installed. You can also install yum directly:
Compat-db-4.2.52-5.1.i386.rpm;
Compat-gcc-34-3.4.6-4.i386.rpm;
Compat-gcc-34-c + +-3.4.6-4. i386.rpm;
Compat-libstdc ++-33-3.2.3-61.i386.rpm;
Gcc-4.1.2-44.el5.i386.rpm;
Glibc-2.5-34.i386.rpm;
Libaio-0.3.106-3.2.i386.rpm;
LibXp-1.0.0-8.1.el5.i386.rpm;
LibXp-devel-1.0.0-8.1.el5.i386.rpm;
Openmotif-2.3.1-2.el5.i386.rpm;
Openmotif-devel-2.3.1-2.el5.i386.rpm;
Make-3.81-3.el5.i386.rpm;
Setarch-2.0-1.1.i386.rpm.
Some of these may have been installed, but it is best to check them one by one and install them all. To install some packages, You need to download other dependent packages. If the download speed is too slow, if it is determined that it is not our network fault, it may be a problem with the yum source, you can install Yum-fastestmirror to try:
# Yum-y install Yum-fastestmirror
If it is still slow, search for the domestic fast source and modify the yum source. In addition, it is best not to force termination when using yum. If you have to force the termination, yum clean all before the next use.
5. Download the installation file.
The latest JDK installation program under Linux jdk-6u18-linux-i586.bin, size 80.8 MB,: http://java.sun.com/javase/downloads/widget/jdk6.jsp. You can install JDK here. Linux Oracle 10g R2 installer 10201_database_linux32.zip, size 637.8 MB,: http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html (32-bit ). After the download, place the Oracle Installation File in the/downloads directory.
6. Add groups and users.
Here we need to add database groups and oracle users required for Oracle installation. The graphical interface is required for Oracle installation. Therefore, determine whether or not the GUI gnome or KDE is installed. If not, yum.
# Yum groupinstall "X Window System"
# Yum groupinstall "X Window System" "GNOME Desktop Environment"

Or friends who have special liking for KDE run:
# Yum groupinstall "X Window System" "KDE Desktop Environment"
Restart. Log on as the root user and add Oracle groups and users:
# Groupadd oinstall
# Groupadd DBA
# Groupadd rule
# Useradd-G oinstall-g dba Oracle
# Passwd Oracle

Create an Oracle installation directory and grant the permissions to the oracle users:
# Mkdir-P/u01/APP/Oracle
# Chown-r ORACLE: oinstall/u01/APP/Oracle
# Chmod-r 775/u01/APP/Oracle
7. Start setting kernel parameters, system variables, and user variables.
Now that oracle users and groups have been added, set kernel parameters, system variables, and user variables. Warning make a backup before modifying any file! Especially when modifying Kernel Parameters! If not, the system may fail to start! Remember!

In addition, it is best to paste and copy many of the following commands. It is important for new users to build confidence when they are not familiar with kernel commands.
1) Modify kernel parameters.
Check whether all of them exist. If yes, add them as needed.
# Add the following lines to gedit/etc/sysctl. conf: (gedit is used in the graphic interface. If it is a text interface, use VI/etc/sysctl. conf)
Kernel. Shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
# Semaphors: 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 kernel parameters take effect:
#/Sbin/sysctl-P
2) Modify/etc/security/limits. conf.
Gedit/etc/security/limits. conf Add the following content at the bottom: (gedit is used in the graphic interface. If it is a text interface, use VI/etc/security/limits. conf)
# Use for Oracle
* Soft nproc 2047
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536

3) Modify/etc/PAM. d/login.
Gedit/etc/PAM. d/login Add the following content at the bottom: (gedit is used in the graphic interface, if it is a text interface: VI/etc/PAM. d/login)
Session required pam_limits.so

4) Disable SELinux.
Disable SELinux (gedit is used in the graphic interface. For a text interface, use VI/etc/SELinux/config)
# Gedit/etc/SELinux/config
Make sure SELinux = disabled

5) modify the current user variable (set the environment variable for the Oracle user ).
Log on with an oracle user and first return to the oracle root directory.
$ Cd (CD/home/Oracle)
$ VI. bashrc or (gedit/. bashrc)

Then add the following.
Java_home =/usr/Java/jdk1.6.0 _ 18
Path = $ java_home/bin: $ path
Classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export java_home
Export path
Export classpath

Jdk1.6.0 _ 18 is the directory generated after installation, that is, the version number. You can modify it according to your installed version. Of course, you must follow the name of this directory. If you use the same installation file as me, you do not need to modify it.
6) edit the/etc/profile file.
Edit the # gedit/etc/profile file and set the Oracle environment variables. Add the following parts:
To grant the installation permission for this directory orcale. It is best to set the permission for the Oracle user in the directory where the database installation file is located.
The method for setting permissions is described in the preceding method for creating the orcale directory.
Export oracle_base =/u01/APP/Oracle
Export ORACLE_HOME = $ oracle_base/10.2.0/db_1
Export oracle_sid = orcl
Export Path = $ path: $ ORACLE_HOME/bin
Export Path = $ path: $ home/bin: $ ORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
Export lc_ctype = en_US.UTF-8

If [$ user = "oracle"]; then
If [$ shell = "/bin/KSh"]; then
Ulimit-P 16384
Ulimit-N 65536
Else
Ulimit-u 16384-N 65536
Fi
Fi

8. Start installation.
After step 7 is completed, the system is configured, restarted, and the Oracle user is logged on to the system.
For example, if the Oracle Installation File is in/downloads, decompress it and the database directory appears.
$ CD/downloads/Database
$ Lang = C
$./Runinstaller

The installation interface and steps in windows are basically the same. If the checking network configuration requirement check fails during Java pre-compilation, you can modify the/etc/hosts file:
# Vi/etc/hosts
# Add the first part of the file
192.168.6.152 Superman
#192.168.6.152 indicates the static IP address of the local host, and Superman indicates the Host Name of the local host.

Do not ignore the past. Otherwise, an error occurs during the completing database creation, resulting in installation failure and the database cannot be used properly, as shown in:


When the installation is about to end, you will be prompted to perform the following operations:
$ Su Root
#/Home/Oracle/oralnventory/orainstroot. Sh
#/Oracle/product/10.2.0/db_1/root. Sh

9. Test and run the installed ORACLE System.
1) Start the listener.
$ LSNRCTL start
2) Start and close the database.
$ Sqlplus/nolog
SQL> connect/As sysdba
Connected to an idle instance.
SQL> startup
SQL> Shutdown
 


3) set auto-start.
# Vi/etc/oratab
Tsh1:/Oracle/product/10.2.0/db_1: Y

References: http://blog.csdn.net/tyqhang/archive/2009/10/05/4633854.aspx
The author of online communication, MSN: defonds@hotmail.com.

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.