Oracle 10 Gb supports Silent Installation on the command line, which greatly facilitates Linux systems that do not have a graphical interface installed.
The following uses Fedora Core 6 as an example to describe how to install oracleoracle 10 GB on the command line.
1. Preparations before installation
You must log on as the root user for preparation.
1.1 select the language of the installation environment
During Oracle Installation, you can use the environment variable Lang to specify the installation language. If the Linux Command Line cannot display Chinese characters, you must set the language environment to English.
Example: Export lang = en_US.UTF-8
1.2 modify gennttab
Oracle 10 Gb installation may be interrupted in some Linux systems.
$ ORACLE_HOME/install/make. Log
You can see the following error message
/Bin/SED:-e expression #1, char 7: unterminated's 'COMMAND
To solve this problem, you must edit the gennttab file.
Decompress stage/components/oracle. Network. RSF/10.2.0.1.0/1/datafiles/filegroup6.jar in the Oracle installation directory.
Decompress the package with jar: jar-XF filegroup6.jar bin/gennttab
Unzip: unzip filegroup6.jar bin/gennttab
Use a text editor (such as VI) to open the decompressed gennttab and
Lib = '$ echo $ {ttolib} | $ SED's ////
/G' | $ grep "^ $ {t}:" | $ awk-F: '{print $2 }''
INI = '$ echo $ {ttoini} | $ SED's ////
/G' | $ grep "^ $ {t}:" | $ awk-F: '{print $2 }''
Bas = '$ echo $ {ttobas} | $ SED's ////
/G' | $ grep "^ $ {t}:" | $ awk-F: '{print $2 }''
Change
Lib = '$ echo $ {ttolib} | $ SED's // n/G' | $ grep "^ $ {t}:" | $ awk-F:
'{Print $2 }''
INI = '$ echo $ {ttoini} | $ SED's // n/G' | $ grep "^ $ {t}:" | $ awk-F:
'{Print $2 }''
Bas = '$ echo $ {ttobas} | $ SED's // n/G' | $ grep "^ $ {t}:" | $ awk-F:
'{Print $2 }''
Save and then update gennttab to filegroup6.jar. You can use either of the following methods to update
Use jar to update: jar-UVF filegroup6.jar bin/gennttab
Use zip to update: Zip-vu filegroup6.jar bin/gennttab
1.3 modify Kernel Parameters
Edit the/etc/sysctl. conf file and modify the following items. If not, add them by yourself.
Kernel. Shmall = 2097152
# The total amount of shared memory that can be used.
Kernel. shmmax = 2147483648
# Maximum size of shared memory segments.
Kernel. shmmni = 4096
# The maximum number of shared memory segments of the entire system.
Kernel. SEM = 250 32000 100 128
# The maximum number of signal objects in each signal object set; the maximum number of signal objects in the system range; the maximum number of operations supported by each signal object; and the maximum number of signal object sets in the system range.
FS. File-max = 65536
# Maximum number of file handles allowed in the system.
Net. ipv4.ip _ local_port_range
= 1024 65000 # IPv4 port range available for the application.
Net. Core. rmem_default = 1048576
# Default value of the socket receiving buffer size
Net. Core. rmem_max = 1048576
# Maximum size of the socket receiving buffer
Net. Core. wmem_default = 262144
# Default value of the socket sending buffer size
Net. Core. wmem_max = 262144
# Maximum size of the socket sending Buffer
Note: The kernel parameters do not have to be modified. They can be modified based on your actual situation.
1.4 create DBA groups and users for Oracle
To install Oracle, you must specify a group with DBA permissions and a user who runs oracle.
Create group: groupadd oradba
Create user: useradd-G oradba Oracle
Note: The group name and user name can be specified at will, and you do not have to copy this article.
1.5 create a target directory for Oracle Installation
Create an ORACLE System Directory: mkdir/Oracle
Create an ORACLE Server Home Directory: mkdir/Oracle/10g
Set the directory owner to Oracle:
Chown Oracle/Oracle-R
Edit/etc/profile and append the following two lines
Export oracle_base =/Oracle
Export ORACLE_HOME =/Oracle/10g
Note: The target directory for installing oracle can be specified at will, but users who install and run Oracle must have the permission to completely modify this directory.
2 Installation
2.1 edit the response file required for Installation
For Silent Installation, you must specify a response file to complete all the parameters required for installation.
In the response subdirectory of the Oracle installation directory, Enterprise. RSP has three response files: Enterprise. RSP, standard. RSP, and custom. RSP, which correspond to the Enterprise Edition, Standard Edition, and custom installation.
Take enterprise. RSP as an example. Use any text editor to edit the values of the following items.
ORACLE_HOME
The location of the main directory of the Oracle server, which must be an absolute path.
ORACLE_HOME
_ Name: name of the Oracle server, which must start with a letter.
Component_ages
The language supported by the Oracle server. By default, only English is supported. You can add multiple languages.
S_namefordbagrp
The Linux User Group name used for ORACLE System Management. Users in this group have the permission to manage the Oracle server. In this example, set it to oradba.
S_nameforopergrp
The name of the Linux User Group used for routine Oracle database operations. Users in this group have the permissions to perform routine Oracle database operations. In this example, set the user group name to Oracle.
N_configurationoption
Installation type (1 is to create a database after installation, 2 is to create an Automatic Storage Management instance after installation, 3 is to install only the server software), select 3 in this example.
You can use the default values for other projects, or modify the values as needed.
NOTE: If Oracle is installed from a CD, you must copy the response file to the hard disk before modification.
2.2 Installation started
Now everything is ready and can be installed.
Log On As an oracle user and run the following command in the Oracle installation directory:
./Runinstaller-ignoresysprereqs-silent-responsefile <absolute path of the response File>
The next step is to wait until the installation is complete.
The meanings of installation parameters are as follows:
Ignoresysprereqs
Let Oracle ignore the system check. Because Oracle officially declares that only Linux Server products are supported, this parameter must be specified for installation on non-Server Linux products.
Silent
Run the installer in silent mode.
Responsefile
Specify a response file.
3. What to do after installation
3.1 Oracle system initialization
Log on as the root user, and run $ ORACLE_HOME/root. Sh to initialize the Oracle system. Generally, you can use the default value for returning the vehicle.
3.2 install a network listener
Without a network listener, the client cannot connect to the oralce server over the network. To install the network listener on the command line, you can only use the silent mode.
Edit the response file netca. RSP under the response subdirectory in the Oracle installation directory and modify the following items.
Install_type = "" Custom ""
Installation type
Listener_number = 1
Listener quantity
Listener_names = {"listener "}
Listener Name List
Listener_protocols = {"TCP; 1521 "}
List of communication protocols used by listeners
Listener_start = "" listener ""
Listener startup name
Then run
$ ORACLE_HOME/bin/netca/silent/responsefile <absolute path of the response File>
3.3 modify dbstart
Open $ ORACLE_HOME/bin/dbstart in any text editor and set
Oracle_home_listner =/Ade/vikrkuma_new/Oracle
Change
Oracle_home_listner = $ ORACLE_HOME
Otherwise, the network listener may not be automatically started.
3.4 install database instances
Edit the response file dbca. RSP under the response subdirectory in the Oracle installation directory and modify the following items.
Gdbname
Global Database Name
Sid
Database Sid
Syspassword
Sys user's initial password
Systempassword
System User's initial password
Characterset
Database character set (Chinese: zhs16gbk)
Nationalcharacterset
Database country Character Set
Then run
$ ORACLE_HOME/bin/dbca-silent-responsefile <absolute path of the response File>-clonetemplate
After the database is created successfully, you must register some information to run
$ Oracle_base/orainventory/orainstroot. Sh
Edit/etc/oratab
Set
<SID of Oracle>: <main directory of Oracle>: N
Change
<SID of Oracle>: <main directory of Oracle>: Y
Enable the database instance to start automatically.
3.5 run Oracle as a service
Create the/etc/init. d/Oracle file and enter the following content:
#! /Bin/sh
#
Export ORACLE_HOME = <absolute path of the Oracle server home directory>
Export oracle_home_listner = $ ORACLE_HOME
Export Oracle = Oracle
./Etc/init. d/functions
Export path =$ {path}: $ ORACLE_HOME/bin
Start ()
{
Daemon -- User $ Oracle $ ORACLE_HOME/bin/dbstart
Daemon -- User $ oracle "$ oracle_home_listner/bin/LSNRCTL start"
}
Stop ()
{
Daemon -- User $ oracle "$ oracle_home_listner/bin/LSNRCTL stop"
Daemon -- User $ Oracle $ ORACLE_HOME/bin/dbshut
}
Case $1 in
'Start ')
Start
Retval =$?
;;
'Stop ')
Stop
Retval =$?
;;
'Restart ')
Stop
Start
Retval =$?
;;
*)
Echo "Usage: $0 {START | stop | restart }"
Exit
;;
Esac
#
Exit
Then grant the executable permission to the file to run
Chmod A + x/etc/init. d/Oracle
Enable Oracle services to run automatically during Linux Startup
Ln-S/etc/init. d/Oracle/etc/rc. d/rc3.d/s99oracle
Ln-S/etc/init. d/Oracle/etc/rc. d/rc5.d/s99oracle
In this way, you can use the service to start and stop oracle.
Appendix 1 Oracle 10 Gb hardware environment requirements
Physical memory
Basic-512 MB
Recommended-1024 MB
Memory swap partition to physical memory ratio
Physical memory MB ~ 2048 MB-150%
Physical memory: 2049mb ~ 8192 MB-100%
Physical memory greater than 8192 MB-75%
Disk Space
The/tmp directory must contain at least MB of free disk space.
Based on the installation type, the partitions for installing the Oracle server software must have at least GB to GB of free disk space.
GB disk space is used for Database Pre-configuration file system storage (optional)
Appendix 2 Oracle 10 Gb Requirements for the software environment
Operating System
Red Hat Enterprise Linux as/es 3.0 (Update 4 or later)
Red Hat Linux 4.0
SuSE Linux Enterprise Server 9.0 with SP 2 or later
Asianux 1.0
Asianux 2.0
Software Package
Library related to X11 (the software package name depends on the operating system, so it is not listed one by one)
GCC (version 2.96-124)
Make (version at least 3.79)
Binutils (version at least 2.11)
Openmotif (version 2.1.30 or later)
Setarch (version at least 1.3)
Compat-dB (version 4.0.14.5 at least)
Compat-GCC (Version 7.3-2.96.122)
Compat-gcc-C ++ (Version: 7.3-2.96.122)
Compat-libstdc ++ (Version: 7.3-2.96.122)
Compat-libstdc ++-devel (Version 7.3-2.96.122)
Sysstat (version at least 5.0.5-1)
Libaio (version 0.3.103-3 at least)
Libaio-devel (version 0.3.103-3 at least)
Appendix 3 links
Install Oracle Database 10 GB on Linux x86
Automatic Installation of Oracle Database 10 GB and Red Hat Enterprise Linux
Oracle Database Installation Guide for Linux x86
Oracle Database Silent Installation practices
Global Oracle Support
Oracle 10g Document Library
4 Conclusion
Now that 10 Gb of Oracle has been installed, you can manage it by installing an Oracle client on any computer.
To uninstall Oracle, you only need to run
$./Runinstaller
-Silent-deinstall-removeallfiles-removeallpatches
"Remove_homes = {$ ORACLE_HOME}"-responsefile <response file used during installation>