oracle10g Pre-installation work preparation script

Source: Internet
Author: User

Every time I install oracle10g pre-duplication of work makes me very annoying, so I wrote a pre-preparation script, after running this script, you can install Oracle Media directly!!


Attention:

This script is written under redhat5.5, 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

Networking_ipv6=no

Hostname=DB

Eof


Hostname DB


Cat <<eof >/etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.1.200 DB


Eof


Cat <<eof >/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0

Bootproto=none

Onboot=yes

netmask=255.255.255.0

ipaddr=192.168.1.200

Type=ethernet

Eof


Chkconfig cups off

Chkconfig SendMail off

Service cups stop

Service SendMail Stop

Service Network restart



Cat <<eof >/etc/resolv.conf

NameServer 8.8.8.8

Eof


Iptables-f

Iptables-x

Iptables-z

Service Iptable Save

Service iptable Restart

Setenforce 0


Mount-o loop/dev/cdrom/mnt


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


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

[Base]

Name=base

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-db-* \

control-center-* \

gcc-* \

gcc-c++-* \

glibc-* \

libxp-* \

libstdc++-* \

libstdc++-devel-* \

make-* \

openmotif-* \

termcap* \

readline* \

libtermcap-devel* \

readline-devel* \

sysstat* \

Wget








Cd/tmp


Unzip Oracle10g_database_linux32.zip


RM-RF Oracle10g_database_linux32.zip



Groupadd Oinstall


Groupadd dba


USERADD-G oinstall-g dba Oracle


echo "Oracle" | passwd--stdin Oracle


Mkdir-p/oracle/app

chmod 777/oracle

Chown-r oracle.oinstall/oracle


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


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


echo "Net.ipv4.ip_local_port_range = 1024x768 65000" >>/etc/sysctl.conf


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


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


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


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


echo "" >/etc/redhat-release


echo "Red Hat Enterprise Linux Server Release 3 (tikanga)" >/etc/redhat-release


/sbin/sysctl-p


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 "Session required/lib/security/pam_limits.so" >>/etc/pam.d/login


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


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


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


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


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


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


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


echo "Export oracle_base oracle_home oracle_sid PATH ld_library_path Nls_lang" >>/home/oracle/.bash_profile


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

oracle10g Pre-installation work preparation script

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.