Installation documents for oracle databases on linux

Source: Internet
Author: User

Official Oracle Installation documentation
Http://download.oracle.com/docs/cd/B28359_01/install.111/b32002/toc.htm
 
 
1. Install related packages
1.1 install the following 10g Package on redhat 4:
Required package versions (or later ):
Binutils-2.15.92.0.2-10.EL4
Compat-db-4.1.25-9
Control-center-2.8.0-12
Gcc-3.4.3-9.EL4
Gcc-c ++-3.4.3-9. EL4
Glibc-2.3.4-2
Glibc-common-2.3.4-2
Gnome-libs-1.4.1.2.90-44.1
Libstdc ++-3.4.3-9. EL4
Libstdc +-devel-3.4.3-9.EL4
Make-3.80-5
Pdksh-5.2.14-30
Sysstat-5.0.5-1
Xscreensaver-4.18-5.rhel4.2
Libaio-0.3.96
Openmotif21-2.1.30-11.RHEL4.2 (Required only to install Oracle demos. Installation of Oracle demos is not covered by this guide .)
 
1.2 redhat 5 need to install ipve 10g
# From RedHat AS5 Disk 1
Cd/media/cdrom/Server
Setarch-2 rpm-Uvh *
Rpm-Uvh make-3 *
Glibc-2 rpm-Uvh *
Libaio-0 rpm-Uvh *
Cd/
Eject
# From RedHat AS5 Disk 2
Cd/media/cdrom/Server
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 *
Cd/
Eject
# From RedHat AS5 Disk 3
Cd/media/cdrom/Server
Openmotif-2 rpm-Uvh *
Compat-db-4 rpm-Uvh *
Cd/
Eject
 
We can use the following command to check which package is installed when the package is missing:
Rpm-q binutils compat-db control-center gcc-c ++ glibc-common/
Gnome-libs libstdc ++-devel make pdksh sysstat xscreensaver libaio openmotif21
 
If any package is missing, find it in the installation disk and install it.
 
Rpm package installation:
Rpm-Uvh *. rpm -- force -- nodeps
 
 
2. Download Software
Official 10g and 11g websites:
Http://www.oracle.com/technology/software/products/database/index.html
 
3. Set kernel parameters (Add the following lines to the/etc/sysctl. conf file)
Kernel. shmall = 2097152
Kernel. shmmax = 4294967295
Kernel. shmmni = 4096
# Semaphores: semmsl, semmns, semopm, semmni
Kernel. sem = 250 32000 100 128
Fs. file-max = 101365
Net. core. rmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048586
Net. ipv4.ip _ local_port_range = 1024 65000
 
For 11gR2
Fs. aio-max-nr = 1048576
Fs. file-max = 6815744
Kernel. shmall = 2097152
Kernel. shmmax = 4294967295
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Net. ipv4.ip _ local_port_range = 9000 65500
Net. core. rmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048586
 
Note: If the existing value is greater than this value, do not modify it!
 
-- Then run the following command to make the preceding settings take effect.
#/Sbin/sysctl-p
 
Parameter description:
Kernel. shmall is the physical memory divided by pagesize;
Kernel. shmmax is half of the physical memory;
Fs. file-max is 512 multiplied by processes (for example, 128 processes );
Net. ipv4.ip _ local_port_range/net. core. rmem_default/net. core. rmem_max parameters are set differently from those in the official documentation, which was changed according to the latest requirements of metalink 343431.1;
Net. ipv4.tcp _ rmem/net. ipv4.tcp _ wmem parameters do not need to be set in general, unless they require a lot of network transmission for Dataguard/Streams;
Set other parameters as required in the official documentation.
 
For details, refer to my blog:
Linux Kernel Parameter and Oracle Parameter Adjustment
Http://www.bkjia.com/database/201202/119410.html
 
 
IV. Other resource settings
4.1 modify the/etc/security/limits. conf file
Vi/etc/security/limits. conf
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
 
 
For Oracle 11gR2:
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
 
 
4.2 Modify/etc/profile
/Etc/profile: This file sets the environment information for each user in the system. When the user logs on for the first time, this file is executed. and from/etc/profile. the configuration file in the d directory Collects shell settings.
 
For the Bourne, Bash, or Korn shell, add the following lines to the/etc/profile file:
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
 
 
5. Add the following line to the/etc/pam. d/login file:
Session required pam_limits.so
 
6. Disable SELINUX
Edit/etc/selinux/config and set SELINUX to SELINUX = disabled.
 
 
7. Add User Groups and users and Set passwords for oracle users
Creating the Oracle Inventory Group
#/Usr/sbin/groupadd oinstall
Creating the Oracle OSDBA Group
#/Usr/sbin/groupadd dba
Creating the Oracle OSASM Group
#/Usr/sbin/groupadd asmadmin
Creating the Oracle OSOPER Group
#/Usr/sbin/groupadd Partition
Creating the Oracle Database Software Owner
#/Usr/sbin/useradd-g oinstall-G dba, role, asmadmin oracle
Creating the Oracle ASM Software Owner
#/Usr/sbin/useradd-g oinstall-G dba, role, asmadmin osasm
 
If an oracle user exists, use the following statement to modify the user group:
### Change user group attribute
Usermod-g oinstall-G dba oracle
# Passwd oracle
 
 
# Groupadd oinstall
# Groupadd dba
# Groupadd rule
# Useradd-g oinstall-G dba oracle
-G is followed by only one parameter, that is, the specified user belongs to this group.
-G is followed by several parameters, that is, specifying that the user belongs to multiple groups and defining the value as the starting group of the user.
 
 
8. Create an Oracle Installation Folder
Mkdir-p/u01/app/oracle/product/10.2.0/db_1
Chown-R oracle: oinstall/u01
Chmod-R 777/u01
 
9. Modify the operating system version
Edit the/etc/redhat-release file and replace (Fedora Core release 6 (Zod) with the following content:
Redhat-4
 
Or add parameters during installation.
./RunInstaller-IgnoreSysPreReqs
 
10. Set oracle user environment variables
 
# Vi/home/oracle/. bash_profile
-- Add the following code to the. bash_profile file:
# Oracle Settings
COLUMNS = 132; export COLUMNS
LINES = 47; export LINES
EDITOR = vi; export EDITOR
 
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 = anqing; export ORACLE_SID
SHLIB_PATH = $ LD_LIBRARY_PATH; export SHLIB_PATH
NLS_LANG = American_America.zhs16gbk; export NLS_LANG
ORA_NLS10 = $ ORACLE_HOME/nls/data; export ORA_NLS10
TNS_ADMIN = $ ORACLE_HOME/network/admin; export TNS_ADMIN
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
 
PS1 = "'hostname': \ $ PWD>"; export PS1
Alias glance =/opt/perf/bin/glance: x
Alias gohome = 'CD/u01/app/oracle/product/10.2.0'
Alias cdb = 'CD/u01/app/oracle/admin/anqing/bdump'
Alias cdu = 'CD/u01/app/oracle/admin/anqing/udump'
 
The installation package of Oracle 10gis in the .cpio.gz format. The decompression method is as follows:
# Gunzip file name .cpio.gz
In this way, the file is decompressed to "file name. cpio", and then cpio is performed on it.
# Cpio-idmv <file name. cpio
This completely exposes the cpio file to us.
 
 
 
11. Use Xmanager to connect to the linux System
If Xmanager is not used and is directly installed in linux, you need to set several parameters.
Root User: export DISPLAY = IP: 0.0
Xhost +
The returned information is: access control disabled, clients can connect from any host.
Switch to the Oracle user: su-oracle
Export DISPLAY = IP: 0.0
 
Then run the program to open the interface. However, it is still convenient to use xmanager software.
 
 
12: Install the database in Xmanager (switch to the decompressed directory and run it :)
Export DISPLAY = IP: 0.0
$./RunInstaller
-- When installing the oracle database, you must run two script files as root:
 
Thirteen: Set the instance to start automatically
Modify/etc/oratab to change the instance to Y
TSH1:/u01/app/oracle/product/10.2.0/db_1: Y
 
 
14. Verification
$ Sqlplus/nolog
Conn sys/oracle as sysdba
Startup
Conn scott/tiger
Select * from v $ version;
 
 
 
 
Bytes -------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Email: dvd.dba@gmail.com

Related Article

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.