Before installation, you must first Enable tcp on port 1521.
Linux partition scheme (all file systems are ext3 ):
The 9 GB disk on the first controller (/dev/sda) contains the following partitions for storing all Linux and Oracle software:
-100 MB/boot Partition
-1,500 MB swap partition-set the partition size to at least twice the system RAM size, but not more than 2 GB (32-bit systems do not support swap files larger than 2 GB ). If you need a swap space larger than 2 GB, create multiple swap partitions.
-7,150 MB root partition-This partition will be used for all directories, including/usr,/tmp,/var,/opt, And/home. This is purely for the purpose of explaining this guide and simplifying the installation. A more reliable partitioning scheme is to divide these directories into separate file systems.
1. install the software package required by oracle (Log On As root)
1. binutils-2.17.50.0.6-12.el5
2. compat-db-4.2.52-5.1 --- no Base System-Legacy Software Support by default
3. control-center-2.16.0-16.el5
4. gcc-4.1.2-46.el5_4.1 --- default none
5. gcc-c ++-4.1.2-46. el5_4.1 --- none by default
6. glibc-2.5-42
7. glibc-common-2.5-42
8. libstdc ++-4.1.2-46. el5_4.1
9. libstdc ++-devel-4.1.2-46.el5_4.1
Make-3.81-3.el5
11. pdksh-5.2.14-36.el5 --- default none
12. sysstat-7.0.2-3.el5 --- no Base System-System Tools by default
13. libaio-0.3.106-3.2
14. openmotif22-2.2.3-18 --- default does not have the same 2
LibXp-1.0.0-8.1.el5
16. rpm-ivh compat-libstdc ++-33-3.2.3-61.x86_64.rpm -- none by default
17. libaio-devel-0.3.106-5 (x86_64)
18. glibc-devel-2.3.4-2.41.i386.rpm
Check whether the software package has been installed:
# Rpm-q binutils compat-db control-center gcc-c ++ glibc-common libstdc ++-devel make pdksh sysstat libaio openmotif libXp
Install the missing software package:
# Yum install yum-fastestmirror-y
# Yum install compat-db pdksh sysstat openmotif libXp
2. Oracle group and User Account (Login as root)
#/Usr/sbin/groupadd oinstall
#/Usr/sbin/groupadd dba
#/Usr/sbin/useradd-m-g oinstall-G dba oracle
# Id oracle
Set the password for the oracle account:
# Passwd oracle
3. Create a directory for storing Oracle 10g software and database files (Log On As root)
# Mkdir-p/oracle (recommended for partitioning)
# Mkdir-p/oradata (recommended for partitioning)
# Chown-R oracle: oinstall/oracle/oradata
# Chmod-R 775/oracle/oradata
4. Set oracle user environment variables (oracle logon)
# Vi/home/oracle/. bash_profile
Add ORACLE_BASE to the end of the logon configuration file (. bash_profile or. profile ):
ORACLE_BASE =/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/10g; export ORACLE_HOME
ORACLE_SID = zjoil; export ORACLE_SID
PATH = $ ORACLE_HOME/bin: $ PATH; export PATH
TNS_ADMIN = $ ORACLE_HOME/network/admin; export TNS_ADMIN
NLS_LANG = 'simplified chinese '_ china. ZHS16GBK; export NLS_LANG
Save. bash_profile and exit, and then
$ Source/home/oracle/. bash_profile
Make the configuration take effect
5. Configure Linux kernel parameters (Log On As root)
When you execute the following command, first compare the requirements in the document.
# Vi/etc/sysctl. conf
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 = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
Save and exit to make the matching value take effect
#/Sbin/sysctl-p
6. Security restrictions (Login as root)
# Vi/etc/security/limits. conf
Add
# Use for oracle
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
# Vi/etc/pam. d/login
Add
# Use for oracle
Session required/lib/security/pam_limits.so
# Vi/etc/profile
Add
# Use for oracle
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
7. Modify the release version
Many articles have said that the release version should be changed,
That is # vi/etc/redhat-release CentOS release 5.4 (Final) modified to the redhat-4, the main fear of oracle cannot identify the linux version,
However, CentOS 5.3 and 5.4 can be installed without modification, so you do not need to modify them here.
If other release versions cannot be identified, You 'd better change them and then modify them back.
Modify the content of the Installation File: Add redhat-5
/Database/install/oraparamsilent. ini
Find
[Certified Versions] Linux = redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1, asianux-2
8. decompress the Installation File (oracle logon)
# Mkdir/home/oracle/10g_db
Save the cpio file to the Created directory.
Decompress the file
# Cpio-idmv <filename. cpio
9. Install oracle (oracle logon xhost +)
$ Cd/opt/database
$./RunInstaller
> If the installation Interface contains Chinese garbled characters, execute vi/etc/sysconfig/i18n and change LANG = "zh_CN.UTF-8" to LANG = "en_US.UTF-8" to restart the installer
1. Advanced Installation
2./oradata oinstall
3. Enterprise Edition
4. OraDb10g/oracle/10g
5. Create a database
6. General Purpose
7. Global Database Name: zjoil Sid: zjoil SimplifiedChinese ZHS16GBK
8. Database file location:/oradata
Invalid value null for parameter port
Remember the information on the last page and perform the following steps.
10. Installation Complete
Step 9: Use the root user
Execute the command root. sh and orainstRoot. sh, and follow the full path shown in the prompt.
# Sh/oracle/oraInventory/orainstRoot. sh
# Sh/oracle/10G/root. sh
Modify vi/oracle/10g/bin/dbstart
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER =/ade/vikrkuma_new/oracle
Change to export ORACLE_HOME_LISTNER = $ ORACLE_HOME
Modify vi/oracle/10g/network/admin/listener. ora to add
(SID_DESC =
(GLOBAL_DBNAME = zjoil)
(ORACLE_HOME =/oracle/10g)
(SID_NAME = zjoil)
)
Modify
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.8) (PORT = 1521 ))
Modify/etc/oratab
Modify zjoil:/oracle/10g: Y in the oratab File
Modify the vi/oracle/10g/network/admin/tnsnames. ora File
Note: if an error TNS-01201 is reported: Listener cannot find executable
Remove the/oracle/10g/network/admin/listener. ora file.
Mv listener. ora listener. ora. bak
11. Configure after installation
1. oracle is not started by default. Once restarted, oracle needs to be started manually.
Database commands (started in order)
$ Dbstart [start | status | stop]
$ Lsnrctl [start | status | stop]
$ Emctl [start | status | stop] dbconsole
$ Sqlplus/nolog
> Connect system/passwd as sysdba
Start iSQL * Plus
$ Isqlplusctl start
You can access http: // IP: 5560/isqlplus, or http: // IP: 5560/isqlplus/dba
Note that startup. log and shutdown. log are recommended to check whether their owner is oracle.
# Chown oracle. oinstall $ ORACLE_HOME/startup. log
# Chown oracle. oinstall $ ORACLE_HOME/shutdown. log
2. Of course, oracle also has the startup script dbstart and disable the script dbshut.
# Modify the last line of vi/etc/oratab to change N to Y
Modify the $ ORACLE_HOME/bin/dbstart content
ORACLE_HOME_LISTNER = $ ORACLE_HOME
Dbstart can start oracle. This is only the basic service for starting oracle databases and listening, without three web pages,
Equivalent to the above sqlplus and lsnrctl start operations, dbshut can stop oracle.
12. Create a database
Run xhost + as the root user to allow all users to access Xserver)
# Dbca (Open Database Configuration Assistant)
XIII. Import and export data
You can directly execute the exp/imp command in the oracle user environment.
Author: "situ Jianming"