Centos 7 64位 安装 Oracle 11g 详细过程总结
Oracle数据库安装过程总结 - Centos 7 64位 && Oracle 11g
环境说明:Centos 7 64位操作系统,内存约为17.5GB,/目录50G、/home150G,准备安装Oracle 11g数据库。
更多安装详情详细参阅 Oracle Database Quick Installation Guide for Linux x86-64
###I. 安装前准备
-
以root用户登录
-
配置交换分区
-
查看交换分区大小
[root@datanode1 ~]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 12517372 0 -1
- 1
- 2
- 3
-
查看内存大小
[root@datanode1 ~]# grep MemTotal /proc/meminfo MemTotal: 18315208 kB
- 1
- 2
-
增加交换分区(关键)
Oracle 官网上的文档给出了内存大小和对应要求交换空间大小的表格,如下:
Available RAM Swap Space Required Between 1 GB and 2 GB 1.5 times the size of the RAM Between 2 GB and 16 GB Equal to the size of the RAM More than 16 GB 16 GB 那么在我当前的环境下,交换空间至少要达到16GB。
-
确定要添加的交换分区大小
按照Oracle要求来即可,这里定的目标是超过内存大小。
18315208-12517372=5797836,所以补充6000000KB交换空间。
-
添加交换文件
[root@datanode1 swaps]# dd if=/dev/zero of=/home/swaps/swapfile bs=1024 count=6000000 6000000+0 records in 6000000+0 records out 6144000000 bytes (6.1 GB) copied, 174.731 s, 35.2 MB/s
-
格式化为交换文件系统
[root@datanode1 swaps]# mkswap /home/swaps/swapfile Setting up swapspace version 1, size = 5999996 KiB no label, UUID=0ba4a9f6-c14f-49d4-a926-c0f490353b15
-
启用交换文件
[root@datanode1 swaps]# swapon /home/swaps/swapfile swapon: /home/swaps/swapfile: insecure permissions 0644, 0600 suggested.
-
查看效果
[root@datanode1 swaps]# swapon -s Filename Type Size Used Priority /dev/dm-1 partition 12517372 0 -1 /home/swaps/swapfile file 5999996 0 -2
-
使交换分区在引导时启用
[root@datanode1 swaps]# vi /etc/fstab # # /etc/fstab # Created by anaconda on Mon Mar 19 16:39:39 2018 # # 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=6ff20dbe-4789-4936-adcc-857215605628 /boot xfs defaults 0 0 /dev/mapper/cl-home /home xfs defaults 0 0 /dev/mapper/cl-swap swap swap defaults 0 0 /home/swaps/swapfile swap swap defaults 0 0
-
-
-
修改内核参数
[root@datanode1 swaps]# vi /etc/sysctl.conf # sysctl settings are defined through files in # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. # # Vendors settings live in /usr/lib/sysctl.d/. # To override a whole file, create a new file with the same in # /etc/sysctl.d/ and put new settings there. To overri