Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A simple installation script for Oracle 9.2.0.4 (with pre-installation patch p3006854)

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

#! / bin/bash

A simple installation script # # for echo "# oracle9R204"

#

# add oracle users and user groups to the system

#

Groupadd dba

Groupadd oinstall

Useradd-c "Oracle software owner"-g oinstall-G dba oracle

Passwd oracle

# create an installation directory for oracle

Mkdir / oracle/oracle

Mkdir / oracle/oracle/product

Mkdir / oracle/oracle/product/9.2.0

Chown-R oracle.oinstall / oracle/oracle

Mkdir / var/opt/oracle

Chown oracle.dba / var/opt/oracle

Chmod 755 / var/opt/oracle

# change the gcc,g++ version

Cd / usr/bin

Mv gcc gcc323

Mv gathers + galleys 323

Ln-s gcc296 gcc

Ln-s glossary 296 gags +

# set Oracle configuration file

Echo "oracle soft nofile 65536" > > / etc/security/limits.conf

Echo "oracle hard nofile 65536" > > / etc/security/limits.conf

# maximum number of processes

Echo "oracle soft nproc 16384" > > / etc/security/limits.conf

Echo "oracle hard nproc 16384" > > / etc/security/limits.conf

# modify configuration / etc/sysctl.conf

Echo "# #" > > / etc/sysctl.conf

Echo "kernel.shmall = 2097152" > > / etc/sysctl.conf

The # shmmax kernel parameter defines the maximum value of a single shared memory segment, if the parameter setting is less than the Oracle SGA setting

# then SGA will be allocated multiple shared memory segments. This can become a performance burden and cause system problems in busy systems.

# if the shmmax parameter is not modified, Oracle may report the following error during startup:

#

# Starting ORACLE instance (normal)

# Thu Nov 17 09:27:29 2005

# WARNING: EINVAL creating segment of size 0x0000000033400000

# fix shm parameters in / etc/system or equivalent

#

# here we set it to 2G

Echo "kernel.shmmax = 2147483648" > > / etc/sysctl.conf

# minimum value of a single shared memory segment

Echo "kernel.shmmni=4096" > > / etc/sysctl.conf

The four values in # kernel.sem refer to

# 1:SEMMSL (maximum number of semaphores per user)

# 2:SEMMNS (maximum number of system semaphores)

# 3:SEMOPM (operands per semop system call)

# 4:SEMMNI (minimum number of system semaphore sets)

Echo "kernel.sem = 32000 100128" > > / etc/sysctl.conf

# the maximum number of files allowed to be opened at the same time is 65536

Echo "fs.file-max = 65536" > > / etc/sysctl.conf

# range of ports available for local hosts under ipv4

Echo "net.ipv4.ip_local_port_range = 1024 65000" > > / etc/sysctl.conf

# make the / etc/sysctl.conf file effective

/ sbin/sysctl-p

#

# set user environment variables by editing / home/oracle/.bash_profile file

Echo "# everoment for oracle#" > > / home/oracle/.bash_profile

Echo "export LD_ASSUME_KERNEL=2.4.1" > > / home/oracle/.bash_profile

Echo "export THREADS_FLAG=native" > > / home/oracle/.bash_profile

Echo "export ORACLE_BASE=/oracle/oracle" > > / home/oracle/.bash_profile

Echo "export ORACLE_HOME=/oracle/oracle/product/9.2.0" > > / home/oracle/.bash_profile

Echo "export ORACLE_SID=orcl" > > / home/oracle/.bash_profile

Echo "export ORACLE_TERM=xterm" > > / home/oracle/.bash_profile

Echo "export ORACLE_OWNER=oracle" > > / home/oracle/.bash_profile

Echo "export NLS_LANG=AMERICAN;" > > / home/oracle/.bash_profile

Echo 'export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data' > > / home/oracle/.bash_profile

Echo 'LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib' > > / home/oracle/.bash_profile

Echo 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' > > / home/oracle/.bash_profile

Echo "export LD_LIBRARY_PATH" > > / home/oracle/.bash_profile

Echo 'export PATH=$PATH:$ORACLE_HOME/bin' > > / home/oracle/.bash_profile

# hit the p3006854 patch required before installation

USER= `whoami`

If [$USER! = root]; then

Echo "Must be root to run this script, please login as root and re-try"

Exit

Fi

# see if libcwait.so is already being loaded

If [- f "/ etc/ld.so.preload"] & & [- n "`grep libcwait / etc/ ld.so.preload`"]; then

Echo "Patch has already been applied"

Exit

Else

Echo "Applying patch..."

Fi

Cat > / etc/ld.so.preload

Echo "Patch successfully applied"

Echo "#"

When the echo "setting is over, you can switch to the oracle user, enter the decompressed directory of oracle and run oracle's runinstaller".

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report