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

Oracl installation script

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

#!/ bin/bash

ip=`ifconfig|grep 'inet addr:'|grep -v '127.0.0.1'|cut -d: -f2 |awk '{ print $1}'`

hostname=`echo $HOSTNAME`

echo "$ip $hostname ">>/etc/hosts

mem=`grep MemTotal /proc/meminfo|awk '{print $2}'`

shmmax=$(($mem/2*1024))

ora_dir=/database/

sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config

setenforce 0

#install packages

yum -y install unzip binutils*x86_64* glibc*x86_64* compat-libstdc++*x86_64* elfutils-libelf*x86_64* gcc*x86_64* ksh-*x86_64* libaio*x86_64* libgcc*x86_64* libstdc++*x86_64* make*x86_64* numactl-devel*x86_64* sysstat-9*x86_64* compat-libstdc++*i686* compat-libcap* libXp* libaio*

unzip/linux.x64_11gR2_database_1of2.zip//You must download the installation file to the appropriate directory before you can extract it.

unzip /linux.x64_11gR2_database_2of2.zip

groupadd oinstall

groupadd dba

useradd -g oinstall -G dba oracle

echo oracle123|passwd oracle --stdin

mkdir -p /u01/app

chown -R oracle.oinstall /u01

chown -R oracle.oinstall $ora_dir

#chmod +x $ora_dir/runInstaller

#chmod 777 $ora_dir/install/.oui

#chmod 777 $ora_dir/install/unzip

#Modify the kernel parameters

sed -i -e "s/kernel.shmall.*/ kernel.shmall = 2097152/" -e "s/kernel.shmmax.*/ kernel.shmmax = $shmmax/" /etc/sysctl.conf

cat >>/etc/sysctl.conf /etc/security/limits.conf

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