1. Download Oracle 10g
First, describe in detail my environment, system: Virtual Machine Red Hat Enterprise Linux AS 5.4, Database: Oracle Database 10g Release 2 (10.2.0.1 ). Oracle go to the official website download, click to download http://up.2cto.com/2011/0825/20110825105559233.txt
Http://up.2cto.com/2011/0825/20110825105600991.rar
. The downloaded file is 10201_database_linux32.zip.
Ii. configuration before 10 Gb of Oracle Installation
In fact, it is not difficult to install Oracle 10 Gb in Linux, mainly because the configuration before installation is a little cumbersome. But don't be afraid. You will be proficient once or twice after installation. Start, Follow me!
1. install the software packages required by Oracle
Run the rpm-qa | grep command to check whether the software package is installed. If no software package is installed, run the rpm-ivh command.
# From Red Hat Enterprise Linux AS5 disc 1
Cd/media/cdrom/Server
Rpm-ivh setarch-2 *
Rpm-ivh make-3 *
Rpm-ivh glibc-2 *
Rpm-ivh libaio-0 *
# From Red Hat Enterprise Linux AS5 CD 2
Cd/media/cdrom/Server
Rpm-ivh compat-libstdc ++-33-3 *
Rpm-ivh compat-gcc-34-3 *
Rpm-ivh compat-gcc-34-c ++-3 *
Rpm-ivh gcc-4 *
Rpm-ivh libXp-1 *
# From Red Hat Enterprise Linux AS5 CD 3
Cd/media/cdrom/Server
Rpm-ivh openmotif-2 *
Rpm-ivh compat-db-4 *
2. modify the system version
Vi/etc/redhat-release
Redhat-4
# Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Since oracle only supports RHEL4, You need to modify the version description. Comment out the Red Hat Enterprise Linux Server release 5.4 (Tikanga) line, followed by a line of redhat-4. Of course, you must modify it after installing oracle. The redhat-4 must be the first line of the redhat-release file, otherwise a warning is reported during installation.
3. Modify Kernel Parameters
# Vi/etc/sysctl. conf
Add the following content to the file:
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
I added them to the bottom, for example:
Run the following command to make the kernel parameters take effect:
/Sbin/sysctl-p
I will not explain the above parameters one by one. If you have any questions, please leave a message below. I will try my best to answer your questions.
4. Create users, groups, and directories required for Oracle Installation
(1) Add groups and users:
Groupadd oinstall
Groupadd dba
Groupadd rule
Useradd-g oinstall-G dba oracle
Passwd oracle
(2) create an Oracle installation directory and grant permissions to oracle users:
Mkdir-p/u01/app/oracle/product/10.2.0/db_1
Chown-R oracle. oinstall/u01
5. Set shell limit for oracle users
# Vi/etc/security/limits. conf
Add the following content to the/etc/security/limits. conf file:
* Soft nproc 2047
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536
Add the following content to the file/etc/pam. d/login to make the shell limit take effect:
Session required/lib/security/pam_limits.so
6. Configure static IP addresses
When installing RedHat Linux, it is best to use a static IP address. If DHCP is selected at that time, now you need to change the/etc/sysconfig/network-scripts/ifcfg-eth0 file:
DEVICE = eth0
BOOTPROTO = dhcp
HWADDR = 00: 0C: 29: 74: 5B: 62
ONBOOT = yes
HWADDR = 00: 0C: 29: 74: 5B: 62 # Your mac address
IPADDR = 192.168.89.130 # your IP address
NETMASK = 255.255.255.0 # your IP address
GATEWAY = 192.168.89.1 # Your GATEWAY
Because I configured a static IP address when installing Linux, I will not touch it here. For example:
7. Modify/etc/hosts
Change 127.0.0.1 to a specific IP address. Note that it is best to Remove useless IP addresses in the following format:
IP address-host name-localhost
8. Disable SeLinux.
Because SeLinux has an impact on oracle, setting Secure Linux as invalid. edit the file/etc/selinux/config:
SELINUX = disabled
Of course, you can also use the tool (system> Management> Security Level and firewall) in the graphic interface to select the SELinux page and set it to invalid.
9. Configure Oracle user environment variables
Log on to the oracle user and configure the environment variables. Edit the. bash_profile file in the/home/oracle directory.
Vi. bash_profile
Add the following content to the file. bash_profile.
# Oracle Settings
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 = orcl; export ORACLE_SID
ORACLE_TERM = xterm; export ORACLE_TERM
PATH = $ PATH: $ ORACLE_HOME/bin; export PATH
LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ ORACLE_HOME/lib; export LD_LIBRARY_PATH
CLASSPATH = $ ORACLE_HOME/JREORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export CLASSPATH
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
I also add it to the bottom of the file, for example:
If the SID is modified during database installation, you need to come back and modify the SID after installation. Use "source. bash_profile" to make the modification take effect.
10. Modify the text mode to log on
Without the following steps, oracle may encounter problems during installation. An error may occur when the oracle user starts the installation interface, and the graphical interface cannot be started.
# Vi/etc/inittab
Change id: 5: initdefault: to id: 3: initdefault. After oracle installation is complete, it can be changed back.
# Reboot (restart)
11. You can use a graphical interface to add your machine oracle.
In text mode, use root to log on, and then:
# Startx
# Xhost +
# Su-oracle
$ Export DISPLAY = "192.168.89.130: 0.0" # change it to your IP address.
$ Export LANG = en_US # Set the runtime Language
$ Cd/hqw/databases # enter the Oracle Installation Directory
$./RunInstaller # Start Installation
OK! Next is the real installation process. So many configurations are just preparations before installing Oracle in Linux. Isn't that depressing? Don't be depressed. In fact, you should also learn a lot about Linux systems through the above operations. Instead of installing Oracle, we should learn more about Linux during the installation process. I suddenly want to split Oracle Installation in Linux into two logs, which is too long to write in one article, because there will be a lot of Installation procedures below. Come here! I will write it again tomorrow.
Bytes ------------------------------------------------------------------------------------------------
On the basis of the configuration before installing Oracle in Linux yesterday, Oracle 10g is officially installed on Red Hat Enterprise Linux AS5 today. The following are all taken from Linux when I installed it myself. One site is hard. If you want to repost this article, please note that this site is original. Next we will illustrate how to install Oracle in Linux in the form of illustrated images.
1. Select the installation type. I select Advanced installation, for example:
2. Specify the certificate storage directory, for example:
3. Select the database type to be installed and the language supported by oracle. Here, select Enterprise Edition, and select English and simplified Chinese as the language. For example:
4. Specify the oracle environment variable and installation path. Because we have already declared it in. bash_profile, it will be automatically filled here. As shown in:
5. check before installing Oracle, for example:
6. Select Configuration options, such:
7. Select the created database mode, for example:
8. Specify related database configuration options (SID, Character Set, etc.), such:
The specified character set is the character set used by the database, and the Chinese character set is simplified Chinese zhs16gbk. If the character set is incorrect, it may cause garbled data in the future.
9. Select database management options, such:
10. Specify database storage options, such:
11. Specify Database Backup recovery options, such:
12. Specify the database-related user password, for example:
13. display the installation overview, such:
14. Start installation, for example:
15. After you click OK in the window above, the following page appears:
This means that you need the root permission to execute the following command:
#/Oracle/oraInventory/orainstRoot. sh
#/Oracle/product/10.2.0/db_1/root. sh
16. The installation is completed successfully, for example:
17. After the installation is complete, restore the default settings:
Restore the language environment and version information:
# Export LC_CTYPE = zh_CN.UTF-8
# Vi/etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Modify the environment variables of oracle users:
# Vi. bash_profile
Modify the SID and installation path you have modified during the installation process.
Modify the graphical interface Logon:
# Vi/etc/inittab
Change id: 3: initdefault: to id: 5: initdefault
In this way, we have successfully installed the Oracle database in Linux. After the installation, we will also explain some settings, such as how to start the Oracle listening service and how to start the Oracle database.
This article is from "not just passing"
Address: http://www.hack520.org/linux-oracle-install