centos7+Oracle12单数据库单实例安装

centos7+Oracle12单数据库单实例安装

上次博文中对单Oracle实例进行安装过程演示以及记录。如果不清楚的朋友可以移步,博文《Vmware15pro+CentOS7+Oracle12安装步骤》

本文针对的是单数据库单实例安装进行演示。安装过程只是在安装过程中选择的不同,具体如下图所示:
在这里插入图片描述
其它过程是一样的。

在数据库安装完成后,下面开始本片博文内容的过程记录。

1.环境要求

本片博文,配置的环境主要点大体如下

1.1 centos

/boot 200m

/swap 8000m

硬盘:50G

内存:4G

CPU:2核

1.2 内核配置参数

net.ipv4.tcp_timestamps = 0

net.ipv4.tcp_sack =1

net.ipv4.tcp_window_scaling = 1

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 4101144576

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 = 1048576

net.ipv4.tcp_fin_timeout = 15

net.ipv4.tcp_keepalive_time = 120

net.ipv4.tcp_keepalive_intvl = 2

net.ipv4.tcp_keepalive_probes = 1

net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_tw_reuse = 1

net.ipv4.tcp_tw_recycle = 1

vm.overcommit_memory = 1

vm.swappiness = 0

kernel.watchdog_thresh=30

2.安装过程

[oracle@localhost database]$ dbca

在这里插入图片描述
点击下一步
在这里插入图片描述
此次设置内容如下:
在这里插入图片描述
这里看到提示,密码要求长度至少是8位,然后需要至少一个大写字母,按照提示的要求写密码就行了,点击下一步
在这里插入图片描述
点击完成,进行安装就可以了
在这里插入图片描述
等待安装完成。
在这里插入图片描述

3.验证

[oracle@localhost ~]$ pwd
/home/oracle
[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 12.1.0.2.0 Production on Sun May 10 01:00:46 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

SQL> exit;

[oracle@localhost ~]$ sqlplus / as sysdba;

SQL*Plus: Release 12.1.0.2.0 Production on Sun May 10 01:01:13 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> select sysdate from dual;
select sysdate from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


SQL> exit;
[oracle@localhost ~]$
## 查看监听状态
[oracle@localhost ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 10-MAY-2020 01:02:02

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
## 尝试启动
[oracle@localhost ~]$ sqlplus / as sysdba;

SQL*Plus: Release 12.1.0.2.0 Production on Sun May 10 01:02:40 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/opt/oracle/product/12.2.0.1/db_1/dbs/initoradb.ora'
SQL> exit;
## 针对报错问题进行解决
[oracle@localhost ~]$ cp /opt/oracle/admin/orcl/pfile/init.ora.410202004420 /opt/oracle/product/12.2.0.1/db_1/dbs/initoradb.ora
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun May 10 01:05:36 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;   
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit;
Disconnected
[oracle@localhost ~]$
## 针对报错问题进行解决
[root@localhost etc]# vim /etc/sysctl.conf
[root@localhost etc]# 
[root@localhost etc]# 
[root@localhost etc]# sysctl -p
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_window_scaling = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
## 修改该参数
kernel.shmmax = 12884901888
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 = 1048576
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 120
net.ipv4.tcp_keepalive_intvl = 2
net.ipv4.tcp_keepalive_probes = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
vm.overcommit_memory = 1
vm.swappiness = 0
kernel.watchdog_thresh = 30
[root@localhost etc]# vim /etc/fstab 

#
# /etc/fstab
# Created by anaconda on Sat May  9 10:55:31 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/cl-root     /                       xfs     defaults        0 0
UUID=5127baa2-e80c-439d-ad72-269e1aac3241 /boot                   xfs     defaults        0 0
/dev/mapper/cl-swap     swap                    swap    defaults        0 0
### 添加下面的内容
tmpfs                   /dev/shm                tmpfs   defaults,size=2000M    0 0
[root@localhost etc]# mount -o remount,size=2000M /dev/shm
[root@localhost ~]# umount /dev/shm/
umount: /dev/shm: target is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
[root@localhost ~]# vim /etc/profile.d/autologout.sh
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# chmod +x /etc/profile.d/autologout.sh
[root@localhost ~]# cat /etc/profile.d/autologout.sh
TMOUT=10
readonly TMOUT
export TMOUT
[root@localhost ~]# reboot

3.1 Sqlplus验证

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Sun May 10 06:08:11 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> 
SQL> 
SQL> select sysdate from dual;

SYSDATE
------------------
10-MAY-20

SQL> 
SQL> 
SQL> exit;
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@localhost ~]$ 

以上就是整个安装配置过程。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值