Oracle Initial Install auto-install package

Source: Internet
Author: User

One, automatic installation of the required packages

configure well in advance Yum Warehouse

definitionPackage.txtPackage list file: by official websiteRHEL6For example, here arecompat-libstdc++There are two packages, if not added*,+number behind thecompat-libstdc++-33-3.2.3-69.el6.x86_64,compat-libstdc++-296-2.96-144.el6.i686These two packages cannot be directly identified and need to be*represents two packages, you can use the command if you encounter a missing package during installation:Yum whatprovides libstdc++.so.5, see the packages that depend on this library, install this package, here is the Package.txt file

binutilscompat-libcap1compat-libstdc++*gccgcc-c++glibcglibc-develkshlibgcclibstdc++libstdc++- Devellibaiolibaio-develmakesysstat

writing the installation script package.sh : Define the installation log to /root/package.log, easy to view installation status after installation is complete

#!/bin/bashfor i in ' cat/root/package.txt ' does rpm-q $i if [$?-eq 0];then echo "package $i is already intsalled ">>/root/package.log 2>&1 else yum install-y $i E Cho "package $i are now installed" >>/root/package.log 2>&1 Fidone

Second, automatically add users, user groups

      automatically add user groups, create directories, define Oracle passwords, and then add environment variables, kernel parameters, etc., Oracle password set to Oracle

#!/bin/bash for i in dbaoinstalldo        cat  /etc/group | grep  $i  > /dev/null2>&1         if [ $? -eq 0 ];then                 echo  "group  $i  is already exist "        else                 groupadd -r  $i          fidone id oracle >/dev/null 2>&1  && echo  " User oracle is already exist " | |  useradd -g oinstall -g dba oracle#set password for oracleecho " Oracle " | PASSWD --STDIN ORACLE#CREATE DICTIONARY FOR&NBsp;installmkdir -p /u01/appchown -r oracle:oinstall  /u01/appchmod 775  -r /u01/app


Oracle Initial Install auto-install package

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.