CentOS 7 靜默安裝 Oracle 11g 11.2.0.2 數據庫系統(二)

OS環境準備,主要操作過程:

主機信息
[root@localhost binary]# cd ~
[root@localhost ~]# rpm -q centos-release
centos-release-7-6.1810.2.el7.centos.x86_64
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@localhost ~]# uname -r
3.10.0-957.10.1.el7.x86_64
[root@localhost ~]# hostnamectl status
Static hostname: localhost.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: b33aaca4ab774ea7b1dc7f90085cfa34
Boot ID: 651e8a3f90ef43e68784e4d76791a8b2
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.10.1.el7.x86_64
Architecture: x86-64
[root@localhost ~]#
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 50G 14G 36G 28% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 12K 1.9G 1% /dev/shm
tmpfs 1.9G 8.6M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/vda1 1014M 186M 829M 19% /boot
/dev/mapper/centos-home 47G 33M 47G 1% /home
tmpfs 379M 0 379M 0% /run/user/0
[root@localhost ~]# ls
anaconda-ks.cfg zabbix-release-3.4-1.el7.centos.noarch.rpm zabbix-release-4.0-1.el7.noarch.rpm
src zabbix-release-3.4-2.el7.noarch.rpm
[root@localhost ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=49 time=46.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=49 time=59.7 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 46.964/53.357/59.750/6.393 ms
[root@localhost ~]# yum install -y tree
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
..................................................................................................................
Package tree-1.6.0-10.el7.x86_64 already installed and latest version
Nothing to do
[root@localhost ~]#
[root@localhost ~]# cd src/
[root@localhost src]# ls
binary tar
[root@localhost src]# cd binary/
[root@localhost binary]#
[root@localhost binary]# yum install -y lrzsz
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
.....................................................................................................................
Package lrzsz-0.12.20-36.el7.x86_64 already installed and latest version
Nothing to do
[root@localhost binary]#

上傳Oracle安裝介質到 目錄 /root/src/binary 中

[root@localhost binary]# pwd -P
/root/src/binary
[root@localhost binary]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring linux.x64_11gR2_database_1of2.zip...
100% 1210223 KB 3758 KB/sec 00:05:22 0 Errors

[root@localhost binary]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring linux.x64_11gR2_database_2of2.zip...
100% 1085367 KB 2083 KB/sec 00:08:41 0 Errors

[root@localhost binary]# ls
linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip
[root@localhost binary]#

設置主機名爲 oracle11g
[root@localhost ~]# hostnamectl set-hostname oracle11g
[root@localhost ~]# echo "127.0.0.1 oracle11g" >>/etc/hosts
[root@localhost ~]# hostnamectl status
Static hostname: oracle11g
Icon name: computer-vm
Chassis: vm
Machine ID: b33aaca4ab774ea7b1dc7f90085cfa34
Boot ID: 651e8a3f90ef43e68784e4d76791a8b2
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-957.10.1.el7.x86_64
Architecture: x86-64
[root@localhost ~]# cat -n /etc/hosts
1 127.0.0.1 oracle11g
[root@localhost ~]#
設置OS的 SWAP分區
[root@localhost ~]#dd if=/dev/zero of=/home/swap bs=1024 count=2097152
097152+0 records in
2097152+0 records out
2147483648 bytes (2.1 GB) copied, 10.7366 s, 200 MB/s
[root@localhost ~]# mkswap /home/swap
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=5e349230-57af-4eae-8eb8-f16ba3fc22a6
[root@localhost ~]# swapon /home/swap
swapon: /home/swap: insecure permissions 0644, 0600 suggested.
[root@localhost ~]# free -m
total used free shared buff/cache available
Mem: 3789 521 116 8 3152 2980
Swap: 2047 1 2046
[root@localhost ~]#

關閉防火牆及SELinux
[root@localhost ~]# systemctl stop firewalld && systemctl disable firewalld
[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
[root@localhost ~]# sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config && setenforce 0
setenforce: SELinux is disabled
[root@localhost ~]# sestatus
SELinux status: disabled
[root@localhost ~]#

孟伯,20200426

交流聯繫:微信 1807479153 ,QQ 1807479153

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章