仅用于测试环境
-
mount mount /dev/cdrom /mnt
or
mount -o loop /xxx/rhel6.9.iso /mnt
cat > /etc/yum.repos.d/yum.repo <
name=yumserver
baseurl=file:///mnt
gpgcheck=0
EOF
yum install -y elfutils* gcc* glibc* libaio* libgcc* libgomp* libstdc* libstdc++-devel* sysstat unixODBC* *libcap* libXp* dstat* compat-* bc unzip smartmontools* mlocate* psmisc* -y
groupadd -g 1200 oinstall
groupadd -g 1201 dba
groupadd -g 1202 oper
groupadd -g 1203 backupdba
groupadd -g 1204 dgdba
groupadd -g 1205 kmdba
groupadd -g 1206 racdba
useradd -m -d /home/oracle -u 1201 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,racdba oracle
echo 'oracle' | passwd oracle --stdin
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01/app
cat >> ~/.bash_profile <
umask 022
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export TMP=/tmp
export TMPDIR=$TMP
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export EDITOR=vi
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG="AMERICAN_CHINA.ZHS16GBK"
setty erase ^H
EOF
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
echo "session required pam_limits.so" >> /etc/pam.d/login
cat >> /etc/security/limits.conf <
#ORACLE SETTING
* soft memlock unlimited
* hard memlock unlimited
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft stack 10240
EOF
cat >> /etc/sysctl.conf <
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
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
net.ipv4.ip_local_port_range = 9000 65500
EOF
cd $ORACLE_HOME
unzip -q LINUX.X64_193000_db_home.zip
runInstaller
netca
dbca
-
-
阅读(6907) | 评论(0) | 转发(0) |