Installing Oracle in Linux

Source: Internet
Author: User
1. download Oracle10g to describe my environment in detail. The system is RedHatEnterpriseLinuxAS5.4, and the database is OracleDatabase10gRelease2 (10.2.0.1 ). Oracle go to the official website download, click to download http://www.2cto.co...

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

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.