centos7需要的安装包,可以在Oracle上查看:https://docs.oracle.com/cd/E11882_01/install.112/e47689/pre_install.htm#LADBI1085
我的版本当然对应的是这个版本:Oracle Linux 7 and Red Hat Enterprise Linux 7
它没有要求说要安装elfutils和unixODBC包,但是等安装Oracle检查安装前准备时,会提示说缺少这两个包,所以一并安装
有时候使用yum安装的时候,会提示another app is currently holding the yum lock,这个时候打开另外一个terminal,在root用户下输入
#rm -f /var/run/yum.pid
强制关掉yum进程
5.关闭防火墙
1 [root@localhost data]# systemctl status firewalld.service #查看防火墙状态(运行中)
2 ● firewalld.service - firewalld - dynamic firewall daemon
3 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
4 Active: active (running) since Wed 2017-09-13 09:23:08 CST; 25min ago
5 Docs: man:firewalld(1)
6 Main PID: 641 (firewalld)
7 CGroup: /system.slice/firewalld.service
8 └─641 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
9
10 Sep 13 09:22:58 localhost.localdomain systemd[1]: Starting firewalld - dynami...
11 Sep 13 09:23:08 localhost.localdomain systemd[1]: Started firewalld - dynamic...
12 Hint: Some lines were ellipsized, use -l to show in full.
13 [root@localhost data]# systemctl stop firewalld.service #关闭防火墙
14 [root@localhost data]# systemctl status firewalld.service #查看防火墙状态(已关闭)
15 ● firewalld.service - firewalld - dynamic firewall daemon
16 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
17 Active: inactive (dead) since Wed 2017-09-13 09:48:55 CST; 10s ago
18 Docs: man:firewalld(1)
19 Process: 641 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
20 Main PID: 641 (code=exited, status=0/SUCCESS)
21
22 Sep 13 09:22:58 localhost.localdomain systemd[1]: Starting firewalld - dynami...
23 Sep 13 09:23:08 localhost.localdomain systemd[1]: Started firewalld - dynamic...
24 Sep 13 09:48:54 localhost.localdomain systemd[1]: Stopping firewalld - dynami...
25 Sep 13 09:48:55 localhost.localdomain systemd[1]: Stopped firewalld - dynamic...
26 Hint: Some lines were ellipsized, use -l to show in full.
27 [root@localhost data]# systemctl disable firewalld.service #禁止使用防火墙(重启也是禁止的)
28 Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
29 Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
6.关闭selinux(需重启生效)
1 [root@localhost data]# vi /etc/selinux/config
2 [root@localhost data]# cat /etc/selinux/config
/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 #此处修改为disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
7、修改内核参数(加入斜体部分)
1 [root@local++host data]# vi /etc/sysctl.conf
2 [root@localhost data]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.rp_filter = 1 fs.file-max = 6815744 #设置最大打开文件数
fs.aio-max-nr = 1048576 kernel.shmall = 2097152 #共享内存的总量,8G内存设置:2097152*4k/1024/1024
kernel.shmmax = 2147483648 #最大共享内存的段大小
kernel.shmmni = 4096 #整个系统共享内存端的最大数
kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 #可使用的IPv4端口范围
net.core.rmem_default = 262144 net.core.rmem_max= 4194304 net.core.wmem_default= 262144 net.core.wmem_max= 1048576
OS Kernel Parameter 下的semmni的缺失是Oracle没有检测到,其实有,选中缺失的依赖包,如果下方详情栏里Expected value中有括号中标注(i386)或(i686),是在提示缺少32位的依赖包,但是实际上已经安装了64位的依赖包,忽略它们,pdksh包已经安装,就是之前安装的ksh依赖包。
vim ~/.vimrc #或者vim /home/oracle(用户名)/.vimrc #添加如下代码 set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1 set enc=utf8 set fencs=utf8,gbk,gb2312,gb18030