Red Hat Enterprise Linux7的安装与oracle 12c的安装

时间:2023-03-08 21:18:12

Red Hat Enterprise Linux7的安装与oracle 12c的安装

本文档中用到的所有参数均位于文末附录

Red Hat Enterprise Linux7的安装

新建完虚拟机后,挂载CD,启动虚拟机,进入到安装界面

选择语言

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入到安装概要界面

Red Hat Enterprise Linux7的安装与oracle 12c的安装

首先关闭kdump

Red Hat Enterprise Linux7的安装与oracle 12c的安装

打开以太网,更改主机名,点击应用

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入安装目标位置,选择我要配置分区,点击完成

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择‘点这里自动创建他们’

Red Hat Enterprise Linux7的安装与oracle 12c的安装

将root分区改为150G

Red Hat Enterprise Linux7的安装与oracle 12c的安装

软件选择 选择以下选项

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入安装进程,点击ROOT密码,进入后设置ROOT密码

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择重启

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择接受许可协议

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择语言

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择键盘

Red Hat Enterprise Linux7的安装与oracle 12c的安装

不勾选位置服务

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择时区

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择跳过

Red Hat Enterprise Linux7的安装与oracle 12c的安装

输入一个用户

Red Hat Enterprise Linux7的安装与oracle 12c的安装

设定密码

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入系统

Red Hat Enterprise Linux7的安装与oracle 12c的安装

新建一个文件夹,将光盘挂载到这个文件夹下

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入这个文件,将以下参数复制进去

[kingsql]

name=kingsql

baseurl=file:///kingsql

enabled=1

gpgcheck=0

gpgkey=file:///kingsql/RPM-GPG-KEY-redhat-release

Red Hat Enterprise Linux7的安装与oracle 12c的安装

执行yum安装

Red Hat Enterprise Linux7的安装与oracle 12c的安装

关闭服务

Red Hat Enterprise Linux7的安装与oracle 12c的安装

查询进程

Red Hat Enterprise Linux7的安装与oracle 12c的安装

关闭进程

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入文件

Red Hat Enterprise Linux7的安装与oracle 12c的安装

写入NOZEROCONF=yes

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入文件

Red Hat Enterprise Linux7的安装与oracle 12c的安装

将enforcing改为disabled

Red Hat Enterprise Linux7的安装与oracle 12c的安装

关闭防火墙,禁用防火墙

Red Hat Enterprise Linux7的安装与oracle 12c的安装

执行命令firewall -cmd --state

Red Hat Enterprise Linux7的安装与oracle 12c的安装

建立用户和组

Red Hat Enterprise Linux7的安装与oracle 12c的安装

更改密码

Red Hat Enterprise Linux7的安装与oracle 12c的安装

新建目录,改变用户权限和组

Red Hat Enterprise Linux7的安装与oracle 12c的安装

查看/u01的用量

Red Hat Enterprise Linux7的安装与oracle 12c的安装

切换到oracle用户,进入.bash_profile文件

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入文件

Red Hat Enterprise Linux7的安装与oracle 12c的安装

复制以下参数进去

Red Hat Enterprise Linux7的安装与oracle 12c的安装

执行/sbin/sysctl -p将新写入的参数从硬盘刷新到内存

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入文件

Red Hat Enterprise Linux7的安装与oracle 12c的安装

加入参数

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入文件

Red Hat Enterprise Linux7的安装与oracle 12c的安装

加入参数

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入/etc/hosts文件

Red Hat Enterprise Linux7的安装与oracle 12c的安装

写入IP地址和主机名

Red Hat Enterprise Linux7的安装与oracle 12c的安装

将12c的安装包从主机传到虚拟机

Red Hat Enterprise Linux7的安装与oracle 12c的安装

oracle 12c的安装

切换到oracle用户重新登入

Red Hat Enterprise Linux7的安装与oracle 12c的安装

解压压缩包

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入安装文件夹,执行安装

Red Hat Enterprise Linux7的安装与oracle 12c的安装

进入图形化安装界面,选择不接受更新

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择仅安装数据库

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择单实例数据库

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择企业版

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

打开终端输入这两行命令

Red Hat Enterprise Linux7的安装与oracle 12c的安装

启动监听

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

启动数据库配置

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择创建一个数据库

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择跳过配置

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

输入VDEDU,选择创建一个空的数据库

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择字符集UTF-8

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

输入密码

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择下一步

Red Hat Enterprise Linux7的安装与oracle 12c的安装

选择安装

Red Hat Enterprise Linux7的安装与oracle 12c的安装

附录

mkdir /kingsql
su -
mount /dev/cdrom /kingsql

[root@localhost ~]# vi /etc/yum.repos.d/kingsql.repo
[kingsql]
name=kingsql
baseurl=file:///kingsql
enabled=1
gpgcheck=0
gpgkey=file:///kingsql/RPM-GPG-KEY-redhat-release

yum -y install binutils elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel pdksh compat-libcap1 libXext* libXtst* libX11* libXau* libxcb* libXi* nscd* libXp* xorg* xterm* unzip* readline* compat*

systemctl disable avahi-daemon.service 关闭进程

[root@localhost ~]# chkconfig avahi-daemon off
注意:正在将请求转发到“systemctl disable avahi-daemon.service”。
Removed symlink /etc/systemd/system/multi-user.target.wants/avahi-daemon.service.
Removed symlink /etc/systemd/system/sockets.target.wants/avahi-daemon.socket.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.Avahi.service.

[root@localhost ~]# ps -ef | grep avahi
avahi 823 1 0 10:06 ? 00:00:00 avahi-daemon: running [linux.local]
avahi 859 823 0 10:06 ? 00:00:00 avahi-daemon: chroot helper
root 16790 16206 0 10:27 pts/0 00:00:00 grep --color=auto avahi

[root@localhost ~]# kill -9 823
[root@localhost ~]# ps -ef | grep avahi
root 16794 16206 0 10:27 pts/0 00:00:00 grep --color=auto avahi

[root@localhost ~]# vi /etc/sysconfig/network
# Created by anaconda
NOZEROCONF=yes

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
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,

# mls - Multi Level Security protection.

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

[root@db12c ~]# firewall-cmd --state

not running

groupadd -g 2100 oinstall

groupadd -g 2300 dba

groupadd -g 2301 oper

useradd -m -u 1101 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle

passwd oracle

mkdir -p /u01/app/oracle

chown -R oracle:oinstall /u01

chmod -R 775 /u01

ls -lR /u01

su - oracle

vi .bash_profile

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1

export ORACLE_SID=VDEDU

export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATHexport PATH=/u01/app/ogg:$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=/u01/app/ogg:$ORACLE_HOME/lib:/lib:/usr/lib:$LD_LIBRARY_PATH

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

export LANG=C
export ORACLE_UNQNAME=kingsql

su - root

#vi /etc/sysctl.conf//加入下面参数
fs.file-max = 6815744

kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104

kernel.panic_on_oops = 1

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2

net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

#/sbin/sysctl -p 从硬盘刷到内存里

#vi /etc/security/limits.conf
//加入下面参数

oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384

oracle hard nproc 16384

oracle soft stack 10240

oracle hard stack 32768

oracle hard memlock 134217728

oracle soft memlock 134217728

[root@meihailetest1 ~]#vi /etc/pam.d/login
//加入下面参数

session required pam_limits.so

vi /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1
localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.242.133 dbora12c

vi /etc/hostname
dbora12c