暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oracle11g安装

Ann. 2024-11-05
63

二.安装准备

1.确定是root用户登录


2. 修改主机名

(注意:2.3和2.4这两步,可做可不做,贴出来主要是想让大家了解一下如何改主机名)

修改/etc/sysconfig/network配置文件中的HOSTNAME变量

[root@localhost ~]# hostnamectl set-hostname oracledb

####永久性修改

[root@localhost ~]#vim /etc/sysconfig/network

NETWORKING=yes

HOSTNAME= oracledb

[root@localhost ~]# hostname oracledb
复制

3 .添加主机名与IP对应记录

[root@localhost ~]# vi /etc/hosts
"你的服务器地址" oracledb
复制

4 .关闭Selinux

[root@oracledb ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config  
[root@oracledb ~]# setenforce 0
复制

5.关闭防火墙

先查看默认情况下系统防火墙的状态,发现是开户状态。执行

systemctl stop firewalld.service
复制

命令关闭防火墙 再执行查看状态命令

rac1

[root@localhost network-scripts]# cat ifcfg-enp0s3 DEVICE=enp0s3 BOOTPROTO=static IPADDR=10.10.10.1 NETMASK=255.255.255.0 ONBOOT=yes

DEVICE=enp0s8 BOOTPROTO=static IPADDR=192.168.56.100 NETWASK=255.255.255.0 GATEWAY=192.168.56.1 ONBOOT=yes

rac2

[root@localhost network-scripts]# cat ifcfg-enp0s3 BOOTPROTO=static DEVICE=enp0s3 ONBOOT=yes IPADDR=10.10.10.2 NETMASK=255.255.255.0 [root@localhost network-scripts]# cat ifcfg-enp0s8 DEVICE=enp0s8 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.56.101 NETMASK=255.255.255.0 GATEWAY=192.168.56.1

配置系统内核参数

vi /etc/sysctl.conf
复制

net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 4294967295 kernel.shmall = 268435456 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586

接着 限制shell命令

[root@testrac1 ~]# vi /etc/security/limits.conf testrac1**和testrac2修改**

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

grid soft stack 10240

接着 给session相关的限制模块打开

**[root@testrac1 ~]# vi /etc/pam.d/login   testrac1****和****testrac2****修改**



session required /lib/security/pam_limits.so
复制

接着 给oracle 用户的shell的一个限制

#vi /etc/profile testrac1**和testrac2都要修改**

if [ $USER = "oracle" ]||[ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

给另外一个节点传输文件

[root@testrac1 app]# scp /etc/profile 192.168.56.101:/etc/profilerac1

[root@localhost network-scripts]# cat ifcfg-enp0s3 DEVICE=enp0s3 BOOTPROTO=static IPADDR=10.10.10.1 NETMASK=255.255.255.0 ONBOOT=yes

DEVICE=enp0s8 BOOTPROTO=static IPADDR=192.168.56.100 NETWASK=255.255.255.0 GATEWAY=192.168.56.1 ONBOOT=yes

rac2

[root@localhost network-scripts]# cat ifcfg-enp0s3 BOOTPROTO=static DEVICE=enp0s3 ONBOOT=yes IPADDR=10.10.10.2 NETMASK=255.255.255.0 [root@localhost network-scripts]# cat ifcfg-enp0s8 DEVICE=enp0s8 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.56.101 NETMASK=255.255.255.0 GATEWAY=192.168.56.1

配置系统内核参数

vi /etc/sysctl.conf
复制

net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 4294967295 kernel.shmall = 268435456 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586

接着 限制shell命令

[root@testrac1 ~]# vi /etc/security/limits.conf testrac1**和testrac2修改**

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

grid soft stack 10240

接着 给session相关的限制模块打开

**[root@testrac1 ~]# vi /etc/pam.d/login   testrac1****和****testrac2****修改**



session required /lib/security/pam_limits.so
复制

接着 给oracle 用户的shell的一个限制

#vi /etc/profile testrac1**和testrac2都要修改**

if [ $USER = "oracle" ]||[ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

给另外一个节点传输文件

[root@testrac1 app]# scp /etc/profile 192.168.56.101:/etc/profile

最后修改时间:2024-12-03 13:53:20
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论