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