redhat7安装Oracle12c数据库过程

一、Linux系统安装前准备

Linux系统版本为

1.调整系统swap分区大小

root用户下

[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x833eb6d8.
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): e
Partition number (1-4, default 1): 4
First sector (2048-125829119, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-125829119, default 125829119): +20G
Partition 4 of type Extended and of size 20 GiB is set
Command (m for help): n
Partition type:
   p   primary (0 primary, 1 extended, 3 free)
   l   logical (numbered from 5)
Select (default p): l
Adding logical partition 5
First sector (4096-41945087, default 4096): “回车”
Using default value 4096
Last sector, +sectors or +size{K,M,G} (4096-41945087, default 41945087): “回车”
Using default value 41945087
Partition 5 of type Linux and of size 20 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# partprobe
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
[root@localhost ~]# mkswap /dev/sdb5
Setting up swapspace version 1, size = 20970492 KiB
no label, UUID=c985adf5-dbba-48e8-803b-cc34bd0c33b1

[root@localhost ~]# vim /etc/fstab 

添加如下:

UUID=c985adf5-dbba-48e8-803b-cc34bd0c33b1 swap swap defaults 0 0

[root@localhost ~]# swapon -a
[root@localhost ~]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   36G  6.2G   30G  18% /
devtmpfs               1.9G     0  1.9G   0% /dev
tmpfs                  1.9G  140K  1.9G   1% /dev/shm
tmpfs                  1.9G  8.8M  1.9G   1% /run
tmpfs                  1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sr0               3.5G  3.5G     0 100% /media/cdrom
/dev/sda1              497M  119M  379M  24% /boot
[root@localhost ~]# free -h
             total       used       free     shared    buffers     cached
Mem:          3.7G       853M       2.9G       9.7M       1.4M       252M
-/+ buffers/cache:       599M       3.1G

Swap:          23G         0B        23G

2.配置yum仓库(本地磁盘镜像iso)

[root@localhost ~] vim etc/yum.repos.d/update.repo
[update]
name=update
baseurl=file:///media/cdrom
enabled=1
gpgcheck=0

[root@localhost ~]mkdir /media/cdrom

[root@localhost ~]vim /etc/fstab

/dev/cdrom /media/cdrom iso9660 defaults 0 0

[root@localhost ~]mount -a

3.关闭防火墙和selinux

[root@localhost ~]# vim /etc/selinux/config 

SELINUX=disabled

[root@localhost ~]# systemctl stop iptables.service

二、Oracle安装

1.下载Oracle需要的依赖包

yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 glibc glbic-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel unixODBC-devel sysstat ksh unzip compat-libcap*

2.添加账号跟用户组

[root@localhost ~]# mkdir -p /u01/app/oracle/product/12.1.0/db_1
[root@localhost ~]# groupadd dba
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# tail -5 /etc/group
sshd:x:74:
tcpdump:x:72:
yaopeidong:x:1000:
dba:x:1001:
oinstall:x:1002:
[root@localhost ~]# useradd -g dba -G oinstall oracle
[root@localhost ~]# id oracle
uid=1001(oracle) gid=1001(dba) groups=1001(dba),1002(oinstall)
[root@localhost ~]# 

nging password for user oracle.
passwd: all authentication tokens updated successfully.
[root@localhost ~]# chown -R oracle:oinstall /u01

3.下载xshell 5  

  • 6
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值