.系統(tǒng)級(jí)別準(zhǔn)備工作 1. 安裝如下軟件 [root@ www.linuxidc.com ~]# yum install binutils elfutils-libelf glibc libaio libgcc l
.系統(tǒng)級(jí)別準(zhǔn)備工作
1. 安裝如下軟件
[root@ ~]# yum install binutils elfutils-libelf glibc libaio libgcc libstdc++ make compat-libstdc++ elfutils-libelf-devel-* glibc-headers glibc-devel libgomp gcc gcc-c++ libaio-devel libstdc++-devel unixODBC unixODBC-devel sysstat fonts-chinese
2. 微調(diào)內(nèi)核參數(shù)
如果省去此步驟,那么Oracle在系統(tǒng)環(huán)境監(jiān)測(cè)時(shí)會(huì)提示錯(cuò)誤。
修改/etc/sysctl.conf配置文件,加入如下內(nèi)容:
kernel.shmmni = 8192
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
設(shè)置完之后將其生效。
[root@ ~]# sysctl -p
解釋如下:
kernel.sem:表示系統(tǒng)信號(hào)量和系統(tǒng)調(diào)用操作數(shù)
kernel.shmmax:表示最大共享內(nèi)存值。當(dāng)物理內(nèi)存較小時(shí),建議設(shè)置成536870912,如果內(nèi)存超過(guò)4GB,,建議設(shè)置為4294967295.計(jì)算方法為共享內(nèi)存*1024*1024.共享內(nèi)存一般為物理內(nèi)存的一半。
kernel.shmmmni:表示最小共享內(nèi)存值,一般建議為4096.如果內(nèi)存超過(guò)4G,建議設(shè)置為8096.
kernel.shmall:表示所有內(nèi)存值,也就是物理內(nèi)存的值,一般設(shè)置為2684356
kernel.msgmax:表示最大消息數(shù)。保持默認(rèn)即可。
kernel.msgmnb:表示最小消息數(shù),保持默認(rèn) 即可。
fs.file-max:表示打開(kāi)文件的最大值。建議設(shè)置為65536.
3. 修改系統(tǒng)資源使用限額
(1)配置資源限額,設(shè)置Oracle用戶(hù)的資源使用量,修改/etc/security/limits.conf配置文件,在末尾添加如下內(nèi)容:
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
(2)修改/etc/pam.d/login配置文件,在末尾增加如下內(nèi)容,使其系統(tǒng)資源限額設(shè)置生效。
session required pam_limits.so
4. 關(guān)閉SElinux
[root@ ~]# vim /etc/sysconfig/selinux
修改參數(shù)SELINUX=disabled,將值改為disabled。
[root@ ~]# setenforce 0 (即時(shí)生效)
5. 將服務(wù)器ip地址設(shè)置為靜態(tài)的,如下:
[root@ ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
HWADDR=48:5b:39:0d:fa:ec
IPADDR=192.168.1.248
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
6.重啟服務(wù)器。
[root@ ~]# reboot
Copyright ? 2019- 91gzw.com 版權(quán)所有 湘ICP備2023023988號(hào)-2
違法及侵權(quán)請(qǐng)聯(lián)系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市萬(wàn)商天勤律師事務(wù)所王興未律師提供法律服務(wù)