仅用于测试环境
-
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
-
-
阅读(6624) | 评论(0) | 转发(0) |