CentOS7.9环境Oracle12c静默安装

本文详细介绍了在CentOS7.9系统中如何进行Oracle12c数据库的静默安装过程,包括系统配置、创建安装目录、新建用户和环境变量设置、安装步骤以及可能出现的问题解决方法,如安装依赖、JDK配置和内核参数调整等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、系统配置 

查看系统架构

[root@oracle ~]# uname -m
x86_64

查看安装版本

[root@oracle ~]# more /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

更改本机名

[root@oracle ~]# vi /etc/hostname #按I修改修改保存好后ESC :wq
[root@oracle ~]# cat /etc/hostname
oracle

添加本机hosts文件

#输入ifconfig,确认主机地址
[root@oracle ~]# ifconfig   #ip addr 也可以看见主机的IP地址
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.3  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2409:8a1b:44f:e3a0:84:a369:fb6d:e908  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::1938:80b4:8f89:10ae  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:c9:7e:14  txqueuelen 1000  (Ethernet)
        RX packets 371  bytes 32821 (32.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 225  bytes 21296 (20.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[root@oracle ~]# 
[root@oracle ~]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.3 oralce
#  esc 退出编辑模式 :wq 保存并退出

关闭selinux和防火墙(根据需要来做)

[root@oracle ~]# vi /etc/selinux/config 


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled   #原值为SELINUX=enforcing
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
#检查防火墙状态
systemctl status firewalld
#关闭防火墙
systemctl stop firewalld
#禁用防火墙
systemctl disable firewalld

[root@oracle ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since 一 2022-11-28 10:19:36 CST; 1h 6min ago
     Docs: man:firewalld(1)
 Main PID: 776 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─776 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid

11月 28 10:19:34 oracle systemd[1]: Starting firewalld - dynamic firewall daemon...
11月 28 10:19:36 oracle systemd[1]: Started firewalld - dynamic firewall daemon.
11月 28 10:19:37 oracle firewalld[776]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It wi... it now.
Hint: Some lines were ellipsized, use -l to show in full.

#检查小⚪如为绿色或者Active: active (running)代表防火墙开启,
[root@oracle ~]# systemctl stop firewalld
[root@oracle ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since 一 2022-11-28 11:29:22 CST; 36s ago
     Docs: man:firewalld(1)
  Process: 776 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 776 (code=exited, status=0/SUCCESS)

11月 28 10:19:34 oracle systemd[1]: Starting firewalld - dynamic firewall daemon...
11月 28 10:19:36 oracle systemd[1]: Started firewalld - dynamic firewall daemon.
11月 28 10:19:37 oracle firewalld[776]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It wi... it now.
11月 28 11:29:20 oracle systemd[1]: Stopping firewalld - dynamic firewall daemon...
11月 28 11:29:22 oracle systemd[1]: Stopped firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l 
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值