#!/bin/bash#writedbysery2012-05-16##########################################installdependingpackages##########################################yum-yin.
#!/bin/bash
#writed by sery 2012-05-16
#########################################
#install depending packages #
#########################################
yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio
-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh numactl-devel glibc-headers
########################################
#add groups,user and create dir #
########################################
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 507 asmoper
useradd -u 1000 -g oinstall -G dba,asmdba oracle
useradd -u 1006 -g oinstall -G asmadmin,asmdba,asmoper grid
mkdir /u01/app/
chown -R grid:oinstall /u01/app/
chmod -R 775 /u01/app/
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
mkdir -p /u01/app/grid
mkdir -p /u01/app/oracle
chown -R grid:oinstall /u01/app/grid
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
chmod -R 775 /u01/app/grid
##############################################
#modify sysctl.conf #
##############################################
cat >> /etc/sysctl.conf
fs.file-max = 6815744
kernel.shmall = 2097152
#kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
done
sysctl -p
###############################################
#modify /etc/security/limits.conf #
###############################################
cat >> /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
done
################################################
#modify /etc/pam.d/login #
################################################
echo "session required pam_limits.so">>/etc/pam.d/login
################################################
# setting user oracle env #
################################################
cat >> /home/oracle/.bash_profile
export ORACLE_SID=db4zch_2
export ORACLE_UNQNAME=db4zch_2
export ORACLE_base=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0
export PATH=$ORACLE_HOME/bin:$PATH
done
###############################################
#setting user grid env #
###############################################
cat >> /home/grid/.bash_profile
export ORACLE_SID=+asm2
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/grid
export PATH=$ORACLE_HOME/bin:$PATH
done
本文出自 “sery” 博客,香港服务器,网站空间,请务必保留此出处
,香港服务器租用
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号