Installing Oracle in linux is usually a headache,
If we only want to deploy CMS, there is no need to have a detailed understanding of Oracle parameters.
Is there a way to simplify the installation process?
The following is an sh script executed in Linux. It can automatically prepare relevant Oracle parameters, environment variables, and users.
This can accelerate CMS deployment and reduce errors.
In fact, from my personal point of view, these things should actually be done by the Oracle installer.
But there is no way. Who is Oracle?
#! /Bin/sh
Oracle_passwd = oracle
# Oracle user password
Setup_file_path =/oracle/app
#10g installer directory
Install_to_path =/oracle
# Installation path
#----------------------------------------
Grep oracle/etc/passwd &>/dev/null
# Check whether the installation is complete
If [$? -Eq 0]
Then
Clear
Echo "oracle user is already exist! "
Exit 1
Fi
################### Adjust Kernel Parameters ################## ###########
Cat>/etc/sysctl. conf <!
Kernel. sem = 250 32000 100 128
Fs. file-max = 65546
Net. ipv4.ip _ local_port_range = 1024 65000
Net. core. rmem_default = 1048576
Net. core. rmem_max = 1048576
Net. core. wmem_default = 1048576
Net. core. wmem_max = 1048576
!
Sysctl-p
# Submit configuration parameters
################### Create and install users and groups ################ #########
# Off Selinux
Groupadd dba & groupadd oinstall
Useradd-g oinstall-G dba-m oracle
Echo $ oracle_passwd | passwd oracle -- stdin
Mkdir-p $ install_to_path
Chown-R oracle. oinstall $ install_to_path
##=================================================== ========
Cat>/etc/pam. d/login <!
# Add content for oracle install
Session required pam_limits.so
!
# Turn on limits for oracle 10g
Cat>/etc/security/limits. conf <!
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 4096
Oracle hard nofile 65535
!
##=================================================== ========
# Echo 'Red Hat Enterprise Linux Server release 4 (Tikanga) '>/etc/RedHat-release
Echo'
#--------------------------------------
# Set for Oracle10g Install;
#--------------------------------------
Trap "" 0 1 2 3 5 9 15
Trap clear 0
Export TMP =/tmp
Export TMPDIR = $ TMP
'>/Home/oracle/. bash_profile
#================
Echo "export ORACLE_BASE = $ install_to_path">/home/oracle/. bash_profile
#================
Echo'
Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1
Export ORACLE_SID = orcl
Export ORACLE_TERM = oinstall
Export PATH = $ ORACLE_HOME/bin: $ PATH
Export LANG = en_US
'>/Home/oracle/. bash_profile
# User ROOT login on the Character Interface
Clear
Echo "you can su-oracle in X and run runInstaller to install oracle now! "
# Su-oracle
# Startx --: 1
#./RunInstaller
# Start ORACLE Installation
Here is a pure Linux file. You no longer need to use the vi editor to delete unnecessary garbled characters in Windows:
Click here to download: init_oracle.zip