下载界面:
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
chkconfig iptables off
chkconfig ip6tables off
chkconfig cups off
chkconfig firstboot off
chkconfig wpa_supplicant off
chkconfig postfix off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
sed -i 's/^GSSAPIAuthentication yes$/GSSAPIAuthentication no/' /etc/ssh/sshd_config
sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config
下载界面:
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle12c-linux-12201-3608234.html
# wget https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oraclelinux-release-el7-1.0-5.el7.x86_64.rpm
# rpm -ivh oraclelinux-release-el7-1.0-5.el7.x86_64.rpm
#wget https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-server-12cR2-preinstall-1.0-4.el7.x86_64.rpm
# yum -y localinstall oracle-database-server-12cR2-preinstall-1.0-4.el7.x86_64.rpm
Installed:
oracle-database-server-12cR2-preinstall.x86_64 0:1.0-4.el7
Dependency Installed:
bind-libs.x86_64 32:9.9.4-73.el7_6 bind-utils.x86_64 32:9.9.4-73.el7_6
compat-libcap1.x86_64 0:1.10-7.el7 compat-libstdc++-33.x86_64 0:3.2.3-72.el7
gssproxy.x86_64 0:0.7.0-21.el7 kernel-uek.x86_64 0:4.14.35-1844.2.5.el7uek
keyutils.x86_64 0:1.5.8-3.el7 ksh.x86_64 0:20120801-139.0.1.el7
libICE.x86_64 0:1.0.9-9.el7 libSM.x86_64 0:1.2.2-2.el7
libX11.x86_64 0:1.6.5-2.el7 libX11-common.noarch 0:1.6.5-2.el7
libXau.x86_64 0:1.0.8-2.1.el7 libXext.x86_64 0:1.3.3-3.el7
libXi.x86_64 0:1.7.9-1.el7 libXinerama.x86_64 0:1.1.3-2.1.el7
libXmu.x86_64 0:1.1.2-2.el7 libXrandr.x86_64 0:1.5.1-2.el7
libXrender.x86_64 0:0.9.10-1.el7 libXt.x86_64 0:1.1.5-3.el7
libXtst.x86_64 0:1.2.3-1.el7 libXv.x86_64 0:1.0.11-1.el7
libXxf86dga.x86_64 0:1.1.4-2.1.el7 libXxf86misc.x86_64 0:1.0.3-7.1.el7
libXxf86vm.x86_64 0:1.1.4-1.el7 libaio-devel.x86_64 0:0.3.109-13.el7
libbasicobjects.x86_64 0:0.1.1-32.el7 libcollection.x86_64 0:0.7.0-32.el7
libdmx.x86_64 0:1.1.3-3.el7 libevent.x86_64 0:2.0.21-4.el7
libini_config.x86_64 0:1.3.1-32.el7 libnfsidmap.x86_64 0:0.25-19.el7
libpath_utils.x86_64 0:0.2.1-32.el7 libref_array.x86_64 0:0.1.5-32.el7
libstdc++-devel.x86_64 0:4.8.5-36.0.1.el7 libtirpc.x86_64 0:0.2.4-0.15.el7
libverto-libevent.x86_64 0:0.2.5-4.el7 libxcb.x86_64 0:1.13-1.el7
lm_sensors-libs.x86_64 0:3.4.0-6.20160601gitf9185e5.el7 mailx.x86_64 0:12.5-19.el7
nfs-utils.x86_64 1:1.3.0-0.61.0.1.el7 oraclelinux-release.x86_64 7:7.6-1.0.15.el7
psmisc.x86_64 0:22.20-15.el7 quota.x86_64 1:4.01-17.el7
quota-nls.noarch 1:4.01-17.el7 redhat-release-server.x86_64 1:7.6-4.0.1.el7
rpcbind.x86_64 0:0.2.0-47.el7 smartmontools.x86_64 1:6.5-1.el7
sysstat.x86_64 0:10.1.5-17.el7 tcp_wrappers.x86_64 0:7.6-77.el7
xorg-x11-utils.x86_64 0:7.5-23.el7 xorg-x11-xauth.x86_64 1:1.0.9-1.el7
Dependency Updated:
bind-libs-lite.x86_64 32:9.9.4-73.el7_6 bind-license.noarch 32:9.9.4-73.el7_6
libstdc++.x86_64 0:4.8.5-36.0.1.el7
Complete!
Transaction check error:
file /usr/lib/systemd/system-preset/90-default.preset from install of redhat-release-server-1:7.6-4.0.1.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/os-release from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/redhat-release from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/rpm/macros.dist from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/system-release from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
file /etc/system-release-cpe from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-6.1810.2.el7.centos.x86_64
Error Summary
-------------
[root@node4 soft]# mv /usr/lib/systemd/system-preset/90-default.preset /usr/lib/systemd/system-preset/90-default.preset.bak
[root@node4 soft]# mv /etc/os-release /etc/os-release.bak
[root@node4 soft]# mv /etc/redhat-release /etc/redhat-release.bak
[root@node4 soft]# mv /etc/rpm/macros.dist /etc/rpm/macros.dist.bak
[root@node4 soft]# mv /etc/system-release /etc/system-release.bak
[root@node4 soft]# mv /etc/system-release-cpe /etc/system-release-cpe.bak
# rpm -qa | grep -i centos-release
centos-release-7-6.1810.2.el7.centos.x86_64
# rpm -e --nodeps centos-release-7-6.1810.2.el7.centos.x86_64
# systemctl reboot
此包会自动建立oracle用户,及调整内核参数。在执行前,请确保没有oracle用户,如果有,则删除:
# userdel -r oracle
# id oracle
# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01
# du -sh database/
3.6G database/
# yum -y install xorg-x11-server-utils
提供的xhost命令
# su - oracle
Last login: Wed Sep 26 09:10:32 EDT 2018 on pts/1
$ echo $DISPLAY
$ export DISPLAY=:0.0
$ export DISPLAY=197.168.27.217:0.0
$ xhost +
access control disabled, clients can connect from any host
$ cd /mnt/database
$ ./runInstaller
$ ./runInstaller
# /data/app/oraInventory/
[root@node4 ~]# /data/app/oraInventory/orainstRoot.sh
Changing permissions of /data/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /data/app/oraInventory to oinstall.
The execution of the script is complete.
[root@node4 ~]#
[root@node4 ~]# /data/app/oracle/product/12.2.0/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /data/app/oracle/product/12.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :
yes
Installing Oracle Trace File Analyzer (TFA).
Log File: /data/app/oracle/product/12.2.0/dbhome_1/install/root_node4.example.com_2019-02-20_23-03-37-421370017.log
Finished installing Oracle Trace File Analyzer (TFA)
# df -h /data/
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 13G 7.2G 65% /data
# cat /etc/oraInst.loc
inventory_loc=/data/app/oraInventory
inst_group=oinstall
# ls -l /data/app/oraInventory
total 8
drwxrwx--- 2 oracle oinstall 60 Feb 20 23:01 ContentsXML
drwxrwx--- 2 oracle oinstall 139 Feb 20 22:49 logs
-rw-rw---- 1 oracle oinstall 57 Feb 20 23:01 oraInst.loc
-rwxrwx--- 1 oracle oinstall 1629 Feb 20 23:01 orainstRoot.sh
drwxrwx--- 2 oracle oinstall 22 Feb 20 22:49 oui
-- 设置oracle的环境变量:
[root@node4 soft]# source /home/oracle/.bash_profile
[root@node4 soft]# cat /home/oracle/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
oracle
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export ORACLE_BASE=/data/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
Select a different install type or provide a different Oracle Home having all dependencies. Check http://www.oracle.com/pls/topic/lookup?ctx=fmw122120&id=installhome for details about compatible products and install types.
JPEG图片:
-- 安装完成之后登陆数据库:
[oracle@node4 ~]$ export ORACLE_SID=orcl
[oracle@node4 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Feb 21 00:13:41 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
参考:
https://blog.csdn.net/stevensxiao/article/details/82858221