Environment configuration script before Oracle Installation

Source: Internet
Author: User

Silly, the simplest way to write

Oracle_database_linux32.zip indicates the installation package name.

 

#! /Bin/bash

################### Yum and rpm ################## #

Touch/etc/yum. repos. d/1. repo

Echo "[1]">/etc/yum. repos. d/1. repo

Echo "name = 1

Baseurl = file: // mnt/Server

Gpgcheck = 0 ">/etc/yum. repos. d/1. repo

Yum install-y gcc *

Yum-y install binutils compat-db control-center glibc libXp libstdc ++-devel make openmotif sysstat

 

#################### Language ################### ######

Echo 'lang = "zh_CN.UTF-8" '>/etc/sysconfig/i18n

Echo 'lang = "en_US.UTF-8" '>/etc/sysconfig/i18n

Echo 'sysfont = "latarcyrheb-sun16" '>/etc/sysconfig/i18n

 

############### Can shu ####################### #########

Sed-I '/kernel. shmall =/D'/etc/sysctl. conf

Sed-I '/kernel. shmmax =/D'/etc/sysctl. conf

Sed-I '/kernel. sem =/D'/etc/sysctl. conf

Sed-I '/fs. file-max =/D'/etc/sysctl. conf

Sed-I '/net. ipv4.ip _ local_port_range =/D'/etc/sysctl. conf

Sed-I '/net. core. rmem_default =/D'/etc/sysctl. conf

Sed-I '/net. core. rmem_max =/D'/etc/sysctl. conf

Sed-I '/net. core. wmem_default =/D'/etc/sysctl. conf

Sed-I '/net. core. wmem_max =/D'/etc/sysctl. conf

 

Echo "kernel. shmall = 2097152

Kernel. shmmax = 2147483648

Kernel. sem = 250 32000 100 128

Fs. file-max = 65536

Net. ipv4.ip _ local_port_range = 1024 65000

Net. core. rmem_default = 262144

Net. core. rmem_max = 262144

Net. core. wmem_default = 262144

Net. core. wmem_max = 262144"

Sed-I's/5.6/3/G'/etc/RedHat-release

####### Replace is used here, but it fails, so you can only delete it and then add it ######

/Sbin/sysctl-p

 

#################### Ren zheng mo kuai ################ ###

Echo 'oracle soft nproc 2047

Hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536 '>/etc/security/limits. conf

 

Echo 'session required/lib/security/pam_limits.so '>/etc/pam. d/login

 

################## Yong hu huan jing ################## #######

Groupadd oinstall

Groupadd dba

Useradd-g oinstall-G dba oracle

Passwd oracle <EOF

123

123

EOF

Hostname sq1

Echo "192.168.10.10 sq1">/etc/hosts

Mkdir-p/oracle/app

Chmod 777/oracle

Chown-R oracle. oinstall/oracle

 

Su-oracle <!

Echo "ORACLE_BASE =/oracle/app

ORACLE_HOME = $ ORACLE_BASE/oracle/product/10.2.0/db_1

ORACLE_SID = TEST

PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin

LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib

LANG = en_US.UTF-8

Export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH LANG ">. bash_profile

Source. bash_profile

Cd/tmp

Unzip oracle_database_linux32.zip

Exit

!

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.