总的分为三个大步骤
视频安装教程:https://www.bilibili.com/video/BV1a7411G7rq
推荐文章视频结合
一.配置linux系统
1--关闭防火墙
systemctl stop firewalld(临时关闭)
systemctl disable firewalld(永久关闭)
2--清空掉网络访问规则:
iptables -F
3--关闭SELinux:
临时关闭
sestatus or getenforce
setenforce 1/0
永久关闭
vi /etc/selinux/config(永久关闭)
SELINUX=disabled
4--设置主机名与IP地址对应:
vi /etc/hosts
192.168.192.180 dblib
192.168.192.181 dblib
重启网卡
ifdown ens33 && ifup ens33
5--安装YUM扩展包:epel-release
yum install epel-release
6--磁盘分区
fdisk -l fdisk /dev/sdb :磁盘分区
blkid :查看磁盘分区blkid
mkfs.xfs /dev/sdb1 : 分区格式化
mkdir /u02 : 创建挂载点
vim /etc/fstab : 修改配置文件
mount -a : 使得分区配置文件生效
df -h : 查看linux磁盘情况
二.配置ORACLE数据库
1.yum安装linux系统的oracle依赖包(ps:yum是linux的软件包管理器)
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
2.创建用户组
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 osoper
groupadd -g 54325 backupdba
groupadd -g 54326 dgdba
groupadd -g 54327 kmdba
groupadd -g 54328 asmdba
groupadd -g 54329 asmoper
groupadd -g 54330 asmadmin
groupadd -g 54331 racdba
3.创建用户
useradd -g oinstall -G dba,oper,osoper,backupdba,dgdba,kmdba,asmdba,asmoper,asmadmin,racdba oracle
passwd oracle 设置oracle用户密码
4.修改配置文件
(1)edit the file:/etc/security/limits.conf ,and add the following lines to the file:
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
------------------------------------------------------------------------------------
(2)edit the file:/etc/sysctl.conf, and add the following lines to the file:
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
sysctl -p --生效
---------------------------------------------------------------------------
(3)edit the file:/etc/pam.d/login, add the following lines to the file:
session required pam_limits.so
------------------------------------------------------------------------
(4)edit the file: /etc/profile , add the following lines to the file:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
mkdir -p /u02/app/oracle/product/12.2.0/db_1
-------------------------------------------------------------------------------------
(5)edit the file:/home/oracle/.bash_profile, add the following lines to the file:
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1
export ORACLE_SID=pri
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/oracm/lib:$ORACLE_HOME/ctx/lib:/lib:/usr/lib:/usr/local/lib
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias sggsci='rlwrap ggsci'
export DISPLAY=localhost:10.0
三.安装oracle数据库
1.上传安装包
mkdir -p /u01/soft/
cd /u01/soft/
upload the oracle database software
unzip linuxx64_12201_database.zip
2.通过OUI的方式安装数据库软件:
OUI-----oracle unverser installer
步骤1----先安装软件
在ORACLE 用户设置 DISPLAY环境变量
root:
xhost +
root:
xclock
su - oracle
export
DISPLAY=192.168.137.5:0.0
xclock
cd /u01/soft/database
./runInstaller
Oracle数据库安装与配置指南
本文详细介绍Oracle数据库在Linux系统上的安装与配置流程,包括系统环境准备、依赖包安装、用户组与用户创建、配置文件调整及Oracle数据库软件的安装步骤。
1708

被折叠的 条评论
为什么被折叠?



