oracle11g Silent Installation----> pre-Work Preparation script "one"

Source: Internet
Author: User
Tags chmod dba gpg

In some cases, the server will not be able to open graphics, it is necessary to use the silent installation of this way, this script is my previous for the store silent installation oracle11g, the transformation of!!


Attention:

This script is written under redhat6.4, the script red place, can be modified according to their own environment, the dependency package is installed through the local Yum!



————————————— script starts —————————————


#!/bin/sh


Cat <<eof >/etc/sysconfig/network

Networking=yes

Hostname=DB88

Eof


Hostname DB88


Cat <<eof >/etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.8.88 DB88

Eof


' Sed-i ' s/onboot=yes/onboot=no/g '/etc/sysconfig/network-scripts/ifcfg-eth0 '



Service Iptables Stop

Setenforce 0


' Sed-i ' s/selinux=enforcing/selinux=disabled/g '/etc/selinux/config '


Mount-o loop/dev/cdrom/mnt


rm-rf/etc/yum.repos.d/*


Cat <<eof >/etc/yum.repos.d/server.repo

[Server]

Name=server

Baseurl=file:///mnt/server

Enabled=1

Gpgcheck=0

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release

Eof






Yum-y install binutils-* \

compat-libstdc++-* \

compat-libcap1-* \

elfutils-libelf-* \

elfutils-libelf-devel-* \

gcc* \

gcc-c++-* \

glibc* \

glibc-common-* \

glibc-devel-* \

glibc-headers-* \

ksh-* \

libaio-* \

libaio-devel-* \

libgcc-* \

libstdc++-* \

libstdc++-devel* \

make-* \

sysstat-* \

unixodbc-* \

unixodbc-devel-* \

numactl-devel-* \

pdksh-* \

kernel-headers* \

Wget


Groupadd Oinstall


Groupadd dba


USERADD-G oinstall-g dba Oracle


echo "Oracle" | passwd--stdin Oracle


echo "Umask 022" >>/home/oracle/.bash_profile

echo "Stty Erase ^h" >>/home/oracle/.bash_profile

echo "path=\ $PATH: \ $HOME/bin" >>/home/oracle/.bash_profile

echo "Tmp=/tmp" >>/home/oracle/.bash_profile

echo "Tmpdir=\ $TMP" >>/home/oracle/.bash_profile

echo "Oracle_base=/home/oracle/app/oracle" >>/home/oracle/.bash_profile

echo "oracle_home=\ $ORACLE _base/product/11.2.0/db_1" >>/home/oracle/.bash_profile

echo "Oracle_sid=ecom" >>/home/oracle/.bash_profile

echo "Oracle_term=xterm" >>/home/oracle/.bash_profile

echo "path=\ $PATH: \ $HOME/bin:\ $ORACLE _home/bin" >>/home/oracle/.bash_profile

echo "ld_library_path=\ $ORACLE _home/lib:/lib:/usr/lib" >>/home/oracle/.bash_profile

echo "classpath=\ $ORACLE _home/jre:\ $ORACLE _home/jlib:\ $ORACLE _home/rdbms/jlib" >>/home/oracle/.bash_ Profile

Echo ' nls_date_format= ' yyyy-mm-dd HH24:MI:SS "' >>/home/oracle/.bash_profile

echo "Nls_lang=american_america. ZHS16GBK ">>/home/oracle/.bash_profile

echo "Export Editor=vi" >>/home/oracle/.bash_profile

echo "Export TMP TMPDIR oracle_term CLASSPATH nls_date_format oracle_base oracle_home oracle_sid PATH ld_library_path Nls_ LANG EDITOR ">>/home/oracle/.bash_profile



Mkdir-p/home/oracle/app/oracle


Chmod-r 777/home/oracle/app/oracle


Chown-r oracle.oinstall/home/oracle

Cd/tmp


Unzip P10404530_112030_linux-x86-64_1of7.zip


Unzip P10404530_112030_linux-x86-64_2of7.zip


RM-RF P10404530_112030_linux-x86-64_1of7.zip P10404530_112030_linux-x86-64_2of7.zip


Chmod-r 777/tmp/database


Chown-r Oracle.oinstall/tmp/database



Cat <<eof >/etc/orainst.loc

nventory_loc=/home/oracle/app/oracle/orainventory

Inst_group=oinstall

Eof


Chown Oracle:oinstall/etc/orainst.loc

chmod 664/etc/orainst.loc


cp/tmp/database/response/*/home/oracle/etc/


echo "Now modify the/etc/security/limits.conf,but backup it named/etc/security/limits.conf.bak before"

Cp/etc/security/limits.conf/etc/security/limits.conf.bak

echo "Oracle soft Nproc 2047" >>/etc/security/limits.conf

echo "Oracle hard Nproc 16384" >>/etc/security/limits.conf

echo "Oracle Soft nofile 1024x768" >>/etc/security/limits.conf

echo "Oracle hard Nofile 65536" >>/etc/security/limits.conf

echo "Grid soft Nproc 2047" >>/etc/security/limits.conf

echo "Grid hard Nproc 16384" >>/etc/security/limits.conf

echo "Grid soft nofile 1024x768" >>/etc/security/limits.conf

echo "Grid hard Nofile 65536" >>/etc/security/limits.conf

echo "Modifing the/etc/security/limits.conf has been succeed."


echo "Now modify the/etc/pam.d/login,but with a backup Named/etc/pam.d/login.bak"

Cp/etc/pam.d/login/etc/pam.d/login.bak


echo "Session required/lib/security/pam_limits.so" >>/etc/pam.d/login

echo "Session required pam_limits.so" >>/etc/pam.d/login


echo "Modifing The/etc/pam.d/login has been succeed."

echo "Now modify the/etc/profile,but with a backup Named/etc/profile.bak"

Cp/etc/profile/etc/profile.bak

Echo ' if [$USER = ' Oracle ']| | [$USER = "Grid"]; Then ' >>/etc/profile

Echo ' if [$SHELL = '/bin/ksh ']; Then ' >>/etc/profile

Echo ' ulimit-p 16384 ' >>/etc/profile

Echo ' ulimit-n 65536 ' >>/etc/profile

Echo ' Else ' >>/etc/profile

Echo ' ulimit-u 16384-n 65536 ' >>/etc/profile

Echo ' fi ' >>/etc/profile

Echo ' fi ' >>/etc/profile

echo "Modifing The/etc/profile has been succeed."

echo "Now modify the/etc/sysctl.conf,but with a backup Named/etc/sysctl.bak"

Cp/etc/sysctl.conf/etc/sysctl.conf.bak


echo "FS.AIO-MAX-NR = 1048576" >>/etc/sysctl.conf

echo "Fs.file-max = 6815744" >>/etc/sysctl.conf

echo "Kernel.shmall = 2097152" >>/etc/sysctl.conf

echo "Kernel.shmmax = 1054472192" >>/etc/sysctl.conf

echo "Kernel.shmmni = 4096" >>/etc/sysctl.conf

echo "Kernel.sem = 32000" >>/etc/sysctl.conf

echo "Net.ipv4.ip_local_port_range = 9000 65500" >>/etc/sysctl.conf

echo "Net.core.rmem_default = 262144" >>/etc/sysctl.conf

echo "Net.core.rmem_max = 4194304" >>/etc/sysctl.conf

echo "Net.core.wmem_default = 262144" >>/etc/sysctl.conf

echo "Net.core.wmem_max = 1048586" >>/etc/sysctl.conf

echo "Net.ipv4.tcp_wmem = 262144 262144 262144" >>/etc/sysctl.conf

echo "Net.ipv4.tcp_rmem = 4194304 4194304 4194304" >>/etc/sysctl.conf


echo "Modifing the/etc/sysctl.conf has been succeed."

echo "Now make the changes take effect ..."

Sysctl-p


This article is from "Allen Lee Oracle" blog, please make sure to keep this source http://lipengfei666666.blog.51cto.com/6384154/1635657

oracle11g Silent Installation----> pre-Work Preparation script "one"

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.