一 Oracle简介
1.1 最流行的大型数据库
●由甲骨文公司出品,目前最新版本为Oracle19c(测试版本)
●官方网站:https://www.oracle.com/cn
●采用C/S模式,支持SQL查询语言
●在稳定性,高性能,安全性等方面优于其他数据库,因此常用于政府及企业
1.2 安装CentOS7操作系统要求
●防火墙的配置选项:禁用
●SELinux设置:禁用
●默认安装:软件开发
●内核:3.10.0.54.0.1.e17.x86_64及以上版本
1.3 系统及配置要求
●物理内存,不少于1GB
●交换分区:物理分区为1-2GB时,设置交换内存为物理内存的1.5-2倍;物理内存为2-16GB时,设置为与物理内存大小相同
●磁盘空间,不少于15GB
●拥有固定的FQDN名称,安装后不建议再更改
二 实验步骤及要求
2.1 关闭防火墙自启动,以及相关功能和增强性安全功能,更改用户名
[root@localhost ~]# iptables -F
[root@localhost ~]# setenforce 0
setenforce: SELinux is disabled
2.2 更改用户名以及域名解析
[root@localhost ~]# hostnamectl set-hostname oracle //更改主机名Oracle
[root@localhost ~]# su
[root@oracle ~]# vi /etc/hosts
20.0.0.21 oracle
[root@oracle ~]# ping oracle
PING oracle (20.0.0.21) 56(84) bytes of data.
64 bytes from oracle (20.0.0.21): icmp_seq=1 ttl=64 time=0.066 ms
64 bytes from oracle (20.0.0.21): icmp_seq=2 ttl=64 time=0.029 ms
2.3 创建xfs文件系统并且进行挂载(不少于15G)
##添加一块硬盘
[root@oracle ~]# fdisk -l
Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 322.1 GB, 322122547200 bytes, 629145600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000ab94d
[root@oracle ~]# fdisk /dev/sdb //创建一个主分区
[root@oracle ~]# fdisk -l
Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x63f07f51
Device Boot Start End Blocks Id System
/dev/sdb1 2048 209715199 104856576 83 Linux
[root@oracle ~]# vi /etc/fstab