-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path单机数据库安装.txt
76 lines (66 loc) · 2.61 KB
/
单机数据库安装.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
###############################
yum install -y binutils-2.*
yum install -y compat-libcap1-*
yum install -y compat-libstdc++-33*
yum install -y compat-libstdc++-33*
yum install -y gcc-4.4.4*
yum install -y gcc-c++-4.4*
yum install -y glibc-2.12*
yum install -y glibc-2.12*
yum install -y glibc-devel-2*
yum install -y glibc-devel-2*
yum install -y ksh*
yum install -y libgcc-4.*
yum install -y libgcc-4.*
yum install -y libstdc++-4.*
yum install -y libstdc++-4.4*
yum install -y libstdc++-devel-4.*
yum install -y libstdc++-devel-4.4*
yum install -y libaio-0.3.107*
yum install -y libaio-0.3.107*
yum install -y libaio-devel-0.3*
yum install -y libaio-devel-0.3.*
yum install -y make-3.81*
yum install -y sysstat-9*
yum install -y unixODBC-*
yum install -y unixODBC-devel-*
yum install -y elfutils-libelf-devel*
service iptables stop
chkconfig iptables off
groupadd -g 1000 oinstall
groupadd -g 1301 dba
groupadd -g 1302 oper
useradd -m -u 1101 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash oracle
echo "oracle:Ora-.4220"|chpasswd
mkdir -p /oracle/app/oracle/product/11.2.0
mkdir -p /oracle/soft/
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle
chown -R oracle:oinstall /oracle/app/oracle
chown -R oracle:oinstall /oracle/soft/
echo "oracle soft nofile 1024">>/etc/security/limits.conf
echo "oracle hard nofile 65536" >>/etc/security/limits.conf
echo "oracle soft nproc 2047" >>/etc/security/limits.conf
echo "oracle hard nproc 16384" >>/etc/security/limits.conf
echo "oracle soft stack 10240" >>/etc/security/limits.conf
echo "oracle hard stack 32768" >>/etc/security/limits.conf
echo 'fs.file-max = 6815744' >>/etc/sysctl.conf
echo 'kernel.sem = 250 32000 100 128' >>/etc/sysctl.conf
echo 'kernel.shmmni = 4096' >>/etc/sysctl.conf
echo 'net.core.rmem_default = 262144' >>/etc/sysctl.conf
echo 'net.core.rmem_max = 4194304' >>/etc/sysctl.conf
echo 'net.core.wmem_default = 262144' >>/etc/sysctl.conf
echo 'net.core.wmem_max = 1048576' >>/etc/sysctl.conf
echo 'fs.aio-max-nr = 5048576' >>/etc/sysctl.conf
echo 'net.ipv4.ip_local_port_range = 9000 65500' >>/etc/sysctl.conf
tmem=`cat /proc/meminfo|grep MemTotal|awk -F ":" '{print $2}'|awk '{print $1}'`
tmem1=$[tmem*1024/2]
echo 'kernel.shmmax = '${tmem1}>>/etc/sysctl.conf
sysctl -p
tmem=`cat /proc/meminfo|grep MemTotal|awk -F ":" '{print $2}'|awk '{print $1}'`
tmem2=`cat /proc/meminfo|grep MemTotal|awk -F ":" '{print $2}'|awk '{print $1}'`
tmem3=$[tmem/1024/1024]
if [ ${tmem3} -gt 120 ]; then
vmhg=$[tmem2/1024/2/2]
echo 'vm.nr_hugepages = '${vmhg}>>/etc/sysctl.conf
fi