Centos610安装Oracle
第一部分 依赖包
依赖包安全前先桌面安装
安装依赖包
yum -y install gcc gcc-c++ make binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static glibc glibc-common glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel numactl-devel sysstat unixODBC unixODBC-devel kernelheaders pdksh pcre-devel readline rlwrap glibc-kernheaders
修改 vi /etc/hosts 新加 127.0.0.1 机器名 ;
本例中则添加 127.0.0.1 lwx-centos610-nodesk 保存退出;
第二部分 安装环境
2.1.导入密钥
wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
2.2.添加yum 源
wget http://public-yum.oracle.com/public-yum-ol6.repo -O /etc/yum.repos.d/public-yum-ol6.repo
2.3.指定版本
安装指定版本的则编辑器打开public-yum-ol6.repo 启用特定版本,默认情况为最新版
[ol6_latest] name=Oracle Linux $releasever Latest ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/ gpgkey=http://yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1 [ol6_UEK_latest] name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch) baseurl=http://yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/ gpgkey=http://yum.oracle.com/RPM-GPG-KEY-oracle-ol6 gpgcheck=1 enabled=1
2.4.安装 oracle-rdbms-server-11gR2-preinstall
yum install -y oracle-rdbms-server-11gR2-preinstall
安装过程:
[root@lwx-centos610-nodesk ~]# clear [root@lwx-centos610-nodesk ~]# yum install -y oracle-rdbms-server-11gR2-preinstall 已加载插件:fastestmirror 设置安装进程 Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * centos-sclo-rh: mirrors.163.com * centos-sclo-sclo: mirrors.163.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com 解决依赖关系 --> 执行事务检查 ---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-15.el6 will be 安装 --> 处理依赖关系 xorg-x11-utils,它被软件包 oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64 需要 --> 处理依赖关系 bind-utils,它被软件包 oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64 需要 --> 处理依赖关系 kernel-uek,它被软件包 oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64 需要 --> 处理依赖关系 nfs-utils,它被软件包 oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64 需要 --> 处理依赖关系 smartmontools,它被软件包 oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64 需要 --> 执行事务检查 ---> Package bind-utils.x86_64 32:9.8.2-0.68.rc1.el6_10.3 will be 安装 --> 处理依赖关系 bind-libs = 32:9.8.2-0.68.rc1.el6_10.3,它被软件包 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 需要 --> 处理依赖关系 libdns.so.81()(64bit),它被软件包 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 需要 --> 处理依赖关系 libbind9.so.80()(64bit),它被软件包 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 需要 --> 处理依赖关系 libisc.so.83()(64bit),它被软件包 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 需要 --> 处理依赖关系 libisccc.so.80()(64bit),它被软件包 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 需要 --> 处理依赖关系 liblwres.so.80()(64bit),它被软件包 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 需要 --> 处理依赖关系 libisccfg.so.82()(64bit),它被软件包 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 需要 ---> Package kernel-uek.x86_64 0:2.6.39-400.315.1.el6uek will be 安装 --> 处理依赖关系 kernel-uek-firmware = 2.6.39-400.315.1.el6uek,它被软件包 kernel-uek-2.6.39-400.315.1.el6uek.x86_64 需要 ---> Package nfs-utils.x86_64 1:1.2.3-78.0.1.el6_10.1 will be 安装 --> 处理依赖关系 keyutils >= 1.4-4,它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libtirpc >= 0.2.1-11,它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 nfs-utils-lib >= 1.1.0-3,它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 python-argparse,它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 rpcbind,它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libgssglue,它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libgssglue.so.1(libgssapi_CITI_2)(64bit),它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libevent,它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libevent-1.4.so.2()(64bit),它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libnfsidmap.so.0()(64bit),它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libtirpc.so.1()(64bit),它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 --> 处理依赖关系 libgssglue.so.1()(64bit),它被软件包 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 需要 ---> Package smartmontools.x86_64 1:5.43-3.el6 will be 安装 --> 处理依赖关系 mailx,它被软件包 1:smartmontools-5.43-3.el6.x86_64 需要 ---> Package xorg-x11-utils.x86_64 0:7.5-14.el6 will be 安装 --> 处理依赖关系 libdmx.so.1()(64bit),它被软件包 xorg-x11-utils-7.5-14.el6.x86_64 需要 --> 处理依赖关系 libXxf86dga.so.1()(64bit),它被软件包 xorg-x11-utils-7.5-14.el6.x86_64 需要 --> 执行事务检查 ---> Package bind-libs.x86_64 32:9.8.2-0.68.rc1.el6_10.3 will be 安装 ---> Package kernel-uek-firmware.noarch 0:2.6.39-400.315.1.el6uek will be 安装 ---> Package keyutils.x86_64 0:1.4-5.0.1.el6 will be 安装 --> 处理依赖关系 keyutils-libs = 1.4-5.0.1.el6,它被软件包 keyutils-1.4-5.0.1.el6.x86_64 需要 ---> Package libXxf86dga.x86_64 0:1.1.4-2.1.el6 will be 安装 ---> Package libdmx.x86_64 0:1.1.3-3.el6 will be 安装 ---> Package libevent.x86_64 0:1.4.13-4.el6 will be 安装 ---> Package libgssglue.x86_64 0:0.1-11.el6 will be 安装 ---> Package libtirpc.x86_64 0:0.2.1-15.el6 will be 安装 ---> Package mailx.x86_64 0:12.4-10.el6_10 will be 安装 ---> Package nfs-utils-lib.x86_64 0:1.1.5-13.el6 will be 安装 ---> Package python-argparse.noarch 0:1.2.1-2.1.el6 will be 安装 ---> Package rpcbind.x86_64 0:0.2.0-16.el6 will be 安装 --> 执行事务检查 ---> Package keyutils-libs.x86_64 0:1.4-5.el6 will be 升级 --> 处理依赖关系 keyutils-libs = 1.4-5.el6,它被软件包 keyutils-libs-devel-1.4-5.el6.x86_64 需要 ---> Package keyutils-libs.x86_64 0:1.4-5.0.1.el6 will be an update --> 执行事务检查 ---> Package keyutils-libs-devel.x86_64 0:1.4-5.el6 will be 升级 ---> Package keyutils-libs-devel.x86_64 0:1.4-5.0.1.el6 will be an update --> 完成依赖关系计算 依赖关系解决 ======================================================================================================================= 软件包 架构 版本 仓库 大小 ======================================================================================================================= 正在安装: oracle-rdbms-server-11gR2-preinstall x86_64 1.0-15.el6 ol6_latest 21 k 为依赖而安装: bind-libs x86_64 32:9.8.2-0.68.rc1.el6_10.3 ol6_latest 892 k bind-utils x86_64 32:9.8.2-0.68.rc1.el6_10.3 ol6_latest 189 k kernel-uek x86_64 2.6.39-400.315.1.el6uek ol6_UEK_latest 28 M kernel-uek-firmware noarch 2.6.39-400.315.1.el6uek ol6_UEK_latest 3.8 M keyutils x86_64 1.4-5.0.1.el6 ol6_latest 39 k libXxf86dga x86_64 1.1.4-2.1.el6 base 18 k libdmx x86_64 1.1.3-3.el6 base 15 k libevent x86_64 1.4.13-4.el6 base 66 k libgssglue x86_64 0.1-11.el6 base 23 k libtirpc x86_64 0.2.1-15.el6 base 82 k mailx x86_64 12.4-10.el6_10 ol6_latest 235 k nfs-utils x86_64 1:1.2.3-78.0.1.el6_10.1 ol6_latest 337 k nfs-utils-lib x86_64 1.1.5-13.el6 base 71 k python-argparse noarch 1.2.1-2.1.el6 base 48 k rpcbind x86_64 0.2.0-16.el6 base 51 k smartmontools x86_64 1:5.43-3.el6 base 512 k xorg-x11-utils x86_64 7.5-14.el6 base 101 k 为依赖而更新: keyutils-libs x86_64 1.4-5.0.1.el6 ol6_latest 20 k keyutils-libs-devel x86_64 1.4-5.0.1.el6 ol6_latest 28 k 事务概要 ======================================================================================================================= Install 18 Package(s) Upgrade 2 Package(s) 总文件大小:35 M 下载软件包: warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle Importing GPG key 0xEC551F03: Userid: "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>" From : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle 运行 rpm_check_debug 执行事务测试 事务测试成功 执行事务 正在安装 : libgssglue-0.1-11.el6.x86_64 1/22 正在升级 : keyutils-libs-1.4-5.0.1.el6.x86_64 2/22 正在安装 : libtirpc-0.2.1-15.el6.x86_64 3/22 正在安装 : rpcbind-0.2.0-16.el6.x86_64 4/22 正在安装 : keyutils-1.4-5.0.1.el6.x86_64 5/22 正在安装 : mailx-12.4-10.el6_10.x86_64 6/22 正在安装 : 1:smartmontools-5.43-3.el6.x86_64 7/22 正在安装 : 32:bind-libs-9.8.2-0.68.rc1.el6_10.3.x86_64 8/22 正在安装 : 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 9/22 正在安装 : python-argparse-1.2.1-2.1.el6.noarch 10/22 正在安装 : kernel-uek-firmware-2.6.39-400.315.1.el6uek.noarch 11/22 正在安装 : kernel-uek-2.6.39-400.315.1.el6uek.x86_64 12/22 正在安装 : libdmx-1.1.3-3.el6.x86_64 13/22 正在安装 : libXxf86dga-1.1.4-2.1.el6.x86_64 14/22 正在安装 : xorg-x11-utils-7.5-14.el6.x86_64 15/22 正在安装 : libevent-1.4.13-4.el6.x86_64 16/22 正在安装 : 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 17/22 正在安装 : nfs-utils-lib-1.1.5-13.el6.x86_64 18/22 正在安装 : oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64 19/22 正在升级 : keyutils-libs-devel-1.4-5.0.1.el6.x86_64 20/22 清理 : keyutils-libs-devel-1.4-5.el6.x86_64 21/22 清理 : keyutils-libs-1.4-5.el6.x86_64 22/22 Verifying : oracle-rdbms-server-11gR2-preinstall-1.0-15.el6.x86_64 1/22 Verifying : nfs-utils-lib-1.1.5-13.el6.x86_64 2/22 Verifying : keyutils-libs-1.4-5.0.1.el6.x86_64 3/22 Verifying : rpcbind-0.2.0-16.el6.x86_64 4/22 Verifying : kernel-uek-2.6.39-400.315.1.el6uek.x86_64 5/22 Verifying : libevent-1.4.13-4.el6.x86_64 6/22 Verifying : libtirpc-0.2.1-15.el6.x86_64 7/22 Verifying : libXxf86dga-1.1.4-2.1.el6.x86_64 8/22 Verifying : 1:smartmontools-5.43-3.el6.x86_64 9/22 Verifying : libdmx-1.1.3-3.el6.x86_64 10/22 Verifying : kernel-uek-firmware-2.6.39-400.315.1.el6uek.noarch 11/22 Verifying : keyutils-libs-devel-1.4-5.0.1.el6.x86_64 12/22 Verifying : xorg-x11-utils-7.5-14.el6.x86_64 13/22 Verifying : python-argparse-1.2.1-2.1.el6.noarch 14/22 Verifying : 1:nfs-utils-1.2.3-78.0.1.el6_10.1.x86_64 15/22 Verifying : 32:bind-utils-9.8.2-0.68.rc1.el6_10.3.x86_64 16/22 Verifying : 32:bind-libs-9.8.2-0.68.rc1.el6_10.3.x86_64 17/22 Verifying : libgssglue-0.1-11.el6.x86_64 18/22 Verifying : keyutils-1.4-5.0.1.el6.x86_64 19/22 Verifying : mailx-12.4-10.el6_10.x86_64 20/22 Verifying : keyutils-libs-devel-1.4-5.el6.x86_64 21/22 Verifying : keyutils-libs-1.4-5.el6.x86_64 22/22 已安装: oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-15.el6 作为依赖被安装: bind-libs.x86_64 32:9.8.2-0.68.rc1.el6_10.3 bind-utils.x86_64 32:9.8.2-0.68.rc1.el6_10.3 kernel-uek.x86_64 0:2.6.39-400.315.1.el6uek kernel-uek-firmware.noarch 0:2.6.39-400.315.1.el6uek keyutils.x86_64 0:1.4-5.0.1.el6 libXxf86dga.x86_64 0:1.1.4-2.1.el6 libdmx.x86_64 0:1.1.3-3.el6 libevent.x86_64 0:1.4.13-4.el6 libgssglue.x86_64 0:0.1-11.el6 libtirpc.x86_64 0:0.2.1-15.el6 mailx.x86_64 0:12.4-10.el6_10 nfs-utils.x86_64 1:1.2.3-78.0.1.el6_10.1 nfs-utils-lib.x86_64 0:1.1.5-13.el6 python-argparse.noarch 0:1.2.1-2.1.el6 rpcbind.x86_64 0:0.2.0-16.el6 smartmontools.x86_64 1:5.43-3.el6 xorg-x11-utils.x86_64 0:7.5-14.el6 作为依赖被升级: keyutils-libs.x86_64 0:1.4-5.0.1.el6 keyutils-libs-devel.x86_64 0:1.4-5.0.1.el6 完毕!
安装日志
[root@lwx-centos610-nodesk oracle]# cat /var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.log Group oinstall - Already exists Group dba - Already exists User oracle is already present uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba) Creating oracle user passed Saving a copy of the initial sysctl.conf Verifying kernel parameters as per Oracle recommendations... Trying to remove instances of - setting for fs.file-max is Adding fs.file-max = 6815744 Trying to remove instances of - setting for kernel.sem is Adding kernel.sem = 250 32000 100 128 Trying to remove instances of - setting for kernel.shmmni is Adding kernel.shmmni = 4096 Trying to remove instances of - setting for kernel.shmall is kernel.shmall is higher than preinstall config. Retaining original values kernel.shmall = 4294967296 Trying to remove instances of - setting for kernel.shmmax is Changing kernel.shmmax to match preinstall config kernel.shmmax = 4398046511104 Trying to remove instances of - setting for kernel.panic_on_oops is Adding kernel.panic_on_oops = 1 Trying to remove instances of - setting for net.core.rmem_default is Adding net.core.rmem_default = 262144 Trying to remove instances of - setting for net.core.rmem_max is Adding net.core.rmem_max = 4194304 Trying to remove instances of - setting for net.core.wmem_default is Adding net.core.wmem_default = 262144 Trying to remove instances of - setting for net.core.wmem_max is Adding net.core.wmem_max = 1048576 Trying to remove instances of - setting for net.ipv4.conf.all.rp_filter is Adding net.ipv4.conf.all.rp_filter = 2 Trying to remove instances of - setting for net.ipv4.conf.default.rp_filter is Changing net.ipv4.conf.default.rp_filter to match preinstall config net.ipv4.conf.default.rp_filter = 2 Trying to remove instances of - setting for fs.aio-max-nr is Adding fs.aio-max-nr = 1048576 Trying to remove instances of - setting for net.ipv4.ip_local_port_range is Adding net.ipv4.ip_local_port_range = 9000 65500 Setting kernel parameters as per oracle recommendations... Altered file /etc/sysctl.conf Saved a copy of the current file in /etc/sysctl.d/99-oracle-rdbms-server-11gR2-preinstall-sysctl.conf Check /etc/sysctl.d for backups Verifying & setting of kernel parameters passed Setting user limits using /etc/security/limits.conf Verifying oracle user OS limits as per Oracle recommendations... Adding oracle soft nofile 1024 Adding oracle hard nofile 65536 Adding oracle soft nproc 16384 Adding oracle hard nproc 16384 Adding oracle soft stack 10240 Adding oracle hard stack 32768 Adding oracle hard memlock 134217728 Adding oracle soft memlock 134217728 Setting oracle user OS limits as per Oracle recommendations... Altered file /etc/security/limits.conf Original file backed up at /var/log/oracle-rdbms-server-11gR2-preinstall/backup/Oct-10-2019-16-37-33 Verifying & setting of user limits passed Saving a copy of /boot/grub/grub.conf file in /boot/grub/grub.conf-initial.orabackup Saving a copy of /boot/grub/grub.conf in /var/log/oracle-rdbms-server-11gR2-preinstall/backup/Oct-10-2019-16-37-33... Verifying kernel boot parameters as per Oracle recommendations... old boot params: kernel /vmlinuz-2.6.39-400.315.1.el6uek.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet new boot params: kernel /vmlinuz-2.6.39-400.315.1.el6uek.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off old boot params: kernel /vmlinuz-2.6.32-754.17.1.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet new boot params: kernel /vmlinuz-2.6.32-754.17.1.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off old boot params: kernel /vmlinuz-2.6.32-754.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet new boot params: kernel /vmlinuz-2.6.32-754.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off old boot params: kernel /vmlinuz-2.6.39-400.315.1.el6uek.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off new boot params: kernel /vmlinuz-2.6.39-400.315.1.el6uek.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off transparent_hugepage=never old boot params: kernel /vmlinuz-2.6.32-754.17.1.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off new boot params: kernel /vmlinuz-2.6.32-754.17.1.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off transparent_hugepage=never old boot params: kernel /vmlinuz-2.6.32-754.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off new boot params: kernel /vmlinuz-2.6.32-754.el6.x86_64 ro root=/dev/mapper/vg_lwxcentos610nodesk-lv_root rd_NO_LUKS rd_NO_MD rd_LVM_LV=vg_lwxcentos610nodesk/lv_root crashkernel=auto LANG=zh_CN.UTF-8 rd_LVM_LV=vg_lwxcentos610nodesk/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off transparent_hugepage=never Setting kernel boot parameters as per Oracle recommendations... Boot parameters will be effected on next reboot Altered file /boot/grub/grub.conf Copy of the changed file is in - /boot/grub/grub.conf-oracle-rdbms-server-11gR2-preinstall.orabackup Copy of the original file is in - /var/log/oracle-rdbms-server-11gR2-preinstall/backup/Oct-10-2019-16-37-33 Verifying & setting of boot parameters passed Trying to add NOZEROCONF parameter... Taking a backup of existing file to /etc/sysconfig/network.orabackup Successfully added parameter NOZEROCONF to /etc/sysconfig/network Setting /etc/sysconfig/network parameters passed Disabling Transparent Hugepages. Refer Oracle Note:1557478.1 Disabling defrag. Refer Oracle Note:1557478.1 Taking a backup of old config files under /var/log/oracle-rdbms-server-11gR2-preinstall/backup/Oct-10-2019-16-37-33
oracle-rdbms-server-11gR2-preinstall都干了啥?
(1)自动安装oracle所需的RPM包
(2)自动创建oracle用户和group组
(3)自动配置/etc/sysctl.conf内核参数
(4)自动配置/etc/security/limits.conf参数
(5)关闭NUMA=OFF (关闭非一致内存访问)
2.5oracle-linux 环境变量设置
以oracle身份登录,执行命令 vi ~oracle/.bash_profile
在export PATH之前插入下面代码
export ORACLE_BASE=/home/oracle/app/oracle export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export PATH=$ORACLE_HOME/bin:$PATH
export DISPLAY=:0.0
最终:
刷新生效source ~oracle/.bash_profile
以root身份先禁用 public-yum-ol6.repo,升级依赖包
cd /etc/yum.repos.d
mv public-yum-ol6.repo public-yum-ol6.repo.txt
yum upgrade (尽量不要使用yum update)
第三部分 DB安装
通过第一部分已经为Oracle安装做好了准备,现在开始安装
3.1安装文件
3.2.1下载并上传安装文件
下载链接:https://pan.baidu.com/s/196NODEjBvpri6xXo2JAFVw
提取码:l5ss
linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
ftp上传后把文件移动到上面所建目录
文件移动命令参考:
mv linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip /home/oracle/
注意:命令执行位置为FTP上传的ZIP文件所在目录
3.2.2解压安装文件
# unzip linux.x64_11gR2_database_1of2.zip
# unzip linux.x64_11gR2_database_2of2.zip
3.2.3切换root账号为oracle账号
su oracle
cd database
3.2.4执行安装
a.请先以oracle账号以桌面形式登录进入系统
cd /home/oralce/database
执行一下命令
export LANG=en_US
export DISPLAY=:0.0
./runInstaller
根据提示开始安装
根据提示操作正常进度会看到以下截图(注意在这前先决条件验证依赖包因为版本的关系会失败,此时选择忽略)
b.安装过程
注意上图提示:使用root登录 cd到截图中的目录 通过命令 sh 文件名.sh 执行 .sh文件,当执行结束时,点击Ok.
上图的2脚本解释下:
脚本orainstRoot.sh 以root身份cd到所属目录后 执行sh orainstRoot.sh 回车就成。
脚本root.sh 以root身份cd到所属目录后执行 sh root.sh 回车(中间有2次回车)。
上述2脚本执行完后点击上图【OK】
第三部分 DB配置
a.数据库配置
export LANG=en_US
dbca
a.监听配置
设置窗体语言
export LANG=en_US
netca
c.监听启动停止
lsnrctl
start(启动监听)
stop(停止监听)
status (监听状态)
lsnrctl reload(重启监听)
c.修改监听配置,其他IP访问oracle
以oracle账号登录 cd /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin 目录
vi listener.ora,修改监听IP
# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = ORCL) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.125.148)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /home/oracle/app/oracle
重启监听
lsnrctl reload
指令参考:
show parameter local_listener
alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.125.148)(PORT=1521)(SID=ORCL))';
alter system register;
lsnrctl status(监听状态)
状态显示为READY 说明OK.
d.重置账号密码
重置system,sys,scott账号使其可以登录连接
使用oracle账号通过xshell或者桌面形式进行登录
sqlplus /nolog
conn / as sysdba
startup #启动数据库示例
alter user system identified by manager;
alter user sys identified by manager;
alter scott sys identified by 123456;
f.连接测试
f.用户解锁
alter user user1 account unlock;
第四部分 开机启动
a.oratab配置
以root账号登录 vi /etc/oratab
红框处改为Y,保存退出。
b.rc.local配置
vi /etc/rc.d/rc.local
添加以下2行
su oracle -lc "/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su oracle -lc /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
注意:2行不可少 ,第一行因为和lsnrctl之后有空格所以需要添加引号
如果是centos7及上 则还需要执行 chmod +x /etc/rc.d/rc.local 添加执行权限
第一行表示启动监听,第二行表示启动服务
c.开机验证
通过xshell使用oracle账号连接oracle服务器
第五部分 客户端安装
下载链接:https://pan.baidu.com/s/196NODEjBvpri6xXo2JAFVw
提取码:l5ss
下载:linux.x64_11gR2_client.zip
上传Oracle服务器
并以root身份把文件移动到home/oracle/下面,命令:mv linux.x64_11gR2_client.zip /home/oracle/
解压文件 unzip linux.x64_11gR2_client.zip
cd /home/oracle/client
用oracle身份以桌面登录方式进入系统
export LANG=en_US
./runInstaller
注意:客户端 在服务机上一般不用安装
第六部分 禁用oracle-linux仓储
禁用目的:会导致其他软件安装失败,原因指向了无效的仓储地址
cd /etc/yum.repos.d
mv public-yum-ol6.repo public-yum-ol6.repo.txt
第七部分 恢复为无桌面模式
vi /etc/inittab
把 id:3这一行取消注释,另把id:5这一样注释掉。
reboot 重启 恢复无桌面模式。