Oracle Installation of Automatic Installation Software Package for the first time

Source: Internet
Author: User

Oracle Installation of Automatic Installation Software Package for the first time

1. install required software packages automatically in Oracle

Configure the yum repository in advance

Define the package.txt package list file: Take the official website RHEL6 as an example. Here, compat-libstdc ++ has two packages. If no * is added, the compat-libstdc ++-33-3.2.3-69.el6.x86_64, compat-libstdc ++-296-2.96-144.el6.i686 these two packages cannot be directly identified. You need to use * to represent the two packages. If a package is missing during installation, you can use the command: yum provides providers' File

Binutils
Compat-libcap1
Compat-libstdc ++ *
Gcc
Gcc-c ++
Glibc
Glibc-devel
Ksh
Libgcc
Libstdc ++
Libstdc ++-devel
Libaio
Libaio-devel
Make
Sysstat

Write the installation script package. sh: Define the Installation log to/root/package. log, and check the installation status after installation.

#! /Bin/bash
For I in 'cat/root/package.txt'
Do
Rpm-q $ I
If [$? -Eq 0]; then
Echo "Package $ I is already intsalled">/root/package. log 2> & 1
Else
Yum install-y $ I
Echo "Package $ I is now installed">/root/package. log 2> & 1
Fi
Done

Ii. automatically add users and user groups

Automatically add user groups, create directories, define oracle passwords, add environment variables, kernel parameters, and set oracle passwords to oracle

#! /Bin/bash

For I in dbaoinstall
Do
Cat/etc/group | grep $ I>/dev/null2> & 1
If [$? -Eq 0]; then
Echo "Group $ I is already exist"
Else
Groupadd-r $ I
Fi
Done

Id oracle>/dev/null 2> & 1 & echo "User Oracle is already exist" | useradd-g oinstall-G dba oracle
# Set password for oracle
Echo "oracle" | passwd -- stdin oracle
# Create dictionary for install
Mkdir-p/u01/app
Chown-R oracle: oinstall/u01/app
Chmod 775-R/u01/app

  • 1
  • 2
  • Next Page

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.