RedHat Linux Fedora Core 5 successfully installed Oracle 10g

Source: Internet
Author: User
Tags stop script
RedHat Linux Fedora Core 5 successfully installed Oracle 10g

Host Configuration:
Intel P4 CPU 3.0 GHz
512 MB memory
80 GB hard drive

1. Prepare the host and operating system:

1. Physical memory: 512 MB

2. 2 GB swap space
Note: During the installation of CMDL, the installation process will prompt that the teaching space should be at least 3068 MB, which is different from the 2G mentioned here. It does not matter. Direct installation will not be a problem, the actual swap space I used during the installation was 1086 MB, and I couldn't connect to 2 GB, but it was successful;

3. Disable Secure Linux
There are many ways to disable Secure Linux. You can disable it during Linux installation or in the system. You can disable Secure Linux by editing the/etc/SELinux/config file, confirm that the SELinux tag is as follows: SELinux = disabled. You can also use the GUI tool (Applications> system Settings> Security Level) and select SELinux to disable this attribute;

4. The following packages have been installed:
A, X Window System
B. GNOME Desktop Environment
C. Editors
D. graphical Internet
E. Text-based Internet
F. server configuration tools
G. Development Tools
H. Administration Tools
I, System Tools

2. Preparations before installation
1. Download Software
Oracle Database 10g Release 2 (10.2.0.1) software download location:
Http://otn.oracle.com/software/products/database/oracle10g/index.html
Be sure to download the version number of the Installation File. Do not make a mistake (registration is required for download)
Openmotif21-2.1.30-14.i386.rpm
Ftp://fr.rpmfind.net/linux/fedora/core/4/i386/ OS /Fedora/RPMS/openmotif21-2.1.30-14.i386.rpm

2. decompress the software
(1) decompress the command:
Unzip 10201_database_linux32.zip
(2) decompress the package and generate a directory database containing the installation file.
Note: It is best to create a folder on the root to store the installation files of Oracle. However, before installing Oracle, you need to change the owner of this folder to the user's oracle. It is best to change the folder permission to 777 to avoid problems during the installation process.

3. Modify the host file
View the/etc/hosts file must contain a fully qualified name for the server

4. Set Kernel Parameters
(1) Add the following lines (in bytes) to the/etc/sysctl. conf file ):
Kernel. Shmall = 2097152
Kernel. shmmax = 2147483648 (some articles say that it is set to half of the physical memory)
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

(2) run the following command to make the parameter configuration take effect:
/Sbin/sysctl-P

(3) Add the following lines to the/etc/security/limits. conf file:
* Soft nproc 2047
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536

(4) Add the following lines to the/etc/PAM. d/login file, if not:
Session required/lib/security/pam_limits.so

5. parameter configuration
(1) check whether the following packages are installed. If not, install them first:
# From Fedora Core 5 DVD
CD/Media/DVD/Fedora/RPMS
Rpm-uvh setarch -*
Rpm-uvh -- force TCL -*
Openmotif-2 rpm-uvh *
Rpm-uvh compat-db -*
Rpm-uvh compat-libstdc ++-33 *
Rpm-uv h compat-libf2c-32 -*
Rpm-uv h compat-gcc-32 -*
Rpm-uvh libaio -*
Rpm-uvh compat-gcc-32-c ++ -*
Rpm-uvh compat-libstdc ++-296 *
Compat-libgcc-296 rpm-uvh *
Rpm-uvh rsh -*

Note: The command for installing the content of the CD:
Mkdir/mnt/CDROM
Mount-T iso9660/dev/CDROM/mnt/CDROM
View CD/mnt/CDROM

# From download
Rpm-uvh openmotif21-2.1.30-14.i386.rpm

(2) create the following groups and users
Groupadd oinstall
Groupadd DBA
Groupadd rule

Useradd-G oinstall-g dba Oracle
Passwd Oracle (the user is required to enter the password twice during command execution)

(3) create a directory for installing Oracle
Mkdir-P/opt/Oracle/product/10.2.0/db_1
Chown-r oracle. oinstall/OPT

(4) use root to log on and execute the following commands:
Xhost +

(5) use Oracle to log on and add the following lines. at the end of the bash_profile file, replace oracle_sid with your instance name :(. the bash_profile file is located in/opt/Oracle /. bash_profile)
Command: VI $ home/. bash_profile
 
# Oracle settings
TMP =/tmp; export TMP
Tmpdir = $ TMP; export tmpdir

Oracle_base =/opt/Oracle; export oracle_base
ORACLE_HOME = $ oracle_base/product/10.2.0/db_1; export ORACLE_HOME
Oracle_sid = orcl; export oracle_sid (about the Instance name)
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_libr
Classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export classpath
Umask 022
Export lc_all = en. US (you can also set it on the terminal)

If [$ user = "oracle"]; then
If [$ shell = "/bin/KSh"]; then
Ulimit-P 16384
Ulimit-N 65536
Else
Ulimit-u 16384-N 65536
Fi
Fi

 

(There are also the following)

Export oracle_base =/u/APP/Oracle
Export ORACLE_HOME = $ oracle_base/product/10.1.0/db_1
Export oracle_sid = test
Export Path = $ path: $ home/bin: $ ORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib

Then execute
$ Source. bash_profile
Make environment variables take effect./u/APP/Oracle and other directories should be established and appropriate authorization should be made.

(6) modify all permissions for the Oracle Installation File and Its Directory
Take my practice as an example. Create a folder named software under/home, copy the Oracle Installation File to this folder, and modify the ownership and permissions of the software folder on the terminal, the specific method is as follows:
Chmod 777/home/software/Database
Chown-r oracle. oinstall/home/software/Database

3. Install oralce
You must modify the oralce10g bug before installation.
Original Foreigner:
There are two problems preventing oracle from installing on fc5: one is that the platform is not (yet) supported, the other that the installer (both server and client) will hang while linking ntcontab.
The first problem is easily dealt with by appending the following option when starting the installer
Code:

./Runinstaller-ignoresysprereqs

The second one is trickier: There is a bug in the gennttab script that prevents the installer to execute a sed command; this bug is already ented here (thanks to admjal ). this is true for both the new version of the installer (10.2.0.1.0) as well as the previous one (10.2.0 ). see also here.

The following instructions can be used to prepare an Oracle installation CD which will work on fc5, in case you need one to perform multiple installations (this is for the Client installation ):
1) download the server or client. ZIP file for your platform from Oracle
2) unzip it in a directory of your choice, say "oracle"
3) CD to Oracle/client/stage/components/oracle. Network. RSF/10.2.0.1.0/1/datafiles
4) extract the files contained in the filegroup6.jar Archive
Code:

Jar XF filegroup6.jar

Change directory to bin and patch the gennttab Script: Change the lines
Code:

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 }''

With the lines
Code:

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 }''

5) recreate the archive with the patched file and delete the bin directory
Code:

CD ..
Jar CMF filegroup6.jar bin /*
Rm-RF Bin

Now you're ready to create the ISO to burn your patched Oracle installation CD.

P.s. If you get a 'permission denied 'when running runinstaller, create a new mountpoint for the CDROM, chmod it (777) and manually mount the CDROM.
1. log on with an oracle user. If the X mode is used, set the display as follows:
Display =: 0.0; export display

2. Because Oracle10g has requirements for the Linux version, you can use the following parameters to skip the 10g check for supported systems. Run the following command in the/software/database directory to start installation:
./Runinstaller-ignoresysprereqs
If no parameter is specified, you must modify the ETC/RedHat-release file. Comment out # Fedora Core Release 5 (Bordeaux) and enter RedHat 4

3. Enter the appropriate ORACLE_HOME and Instance name during installation. The detailed process will not be mentioned. You just need to enter the prompt. The management endpoint and sqlplus endpoint are displayed.

4. The installation process consumes a lot of time. Please wait. In addition, all the prompts during the installation process are in Chinese. When the installation is about to complete, two programs or scripts will be prompted to run, and then you can.

Iv. Post-installation configuration (refer to the original article of foreigners)
Edit the/etc/oratab file and set the restart flag of each instance to "Y ":
ORACLE:/opt/Oracle/product/10.2.0/db_1: Y

Original Foreigner:
Edit the/etc/RedHat-release file restoring the original release information:

Fedora Core Release 5 (Bordeaux)

Finally edit the/etc/oratab file setting the restart flag for each instance to 'y ':

Tsh1:/u01/APP/Oracle/product/10.2.0/db_1: Y

Create a file called/etc/init. d/dbora containing the following:

#! /Bin/sh
# Chkconfig: 345 99 10
# Description: Oracle auto start-stop script.
#
# Change the value of ORACLE_HOME to specify the correct Oracle Home
# Directory for your installation.

ORACLE_HOME =/opt/Oracle/product/10.2.0/db_1
#
# Change the value of Oracle to the login name of
# Oracle owner at your site.
#
Oracle = Oracle

Path =$ {path}: $ ORACLE_HOME/bin
Host = 'hostname'
Platform = 'uname'
Export ORACLE_HOME path
#
If [! "$2" = "ora_db"]; then
If ["$ platform" = "HP-UX"]; then
Remsh $ host-L $ Oracle-n "$0 $1 ora_db"
Exit
Else
Rsh $ host-L $ Oracle $0 $1 ora_db
Exit
Fi
Fi
#
Case $1 in
'Start ')
$ ORACLE_HOME/bin/dbstart $ ORACLE_HOME &
;;
'Stop ')
$ ORACLE_HOME/bin/dbshut $ ORACLE_HOME &
;;
*)
Echo "Usage: $0 {START | stop }"
Exit
;;
Esac
#
Exit

Set the appropriate group and access permissions:

Chgrp DBA/etc/init. d/dbora
Chmod 750/etc/init. d/dbora

Associate the dbora service with the appropriate run levels and set it to auto-start:

Chkconfig -- level 345 dbora on

The relevant instances shocould now startup/shutdown automatically at system startup/shutdown.

V. installation detection
After the installation is complete, open the terminal and run the dbca command under the Oracle user. A wizard appears, indicating that the installation is successful.

 

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.