最后要说的就是安装前数据库会有环境检查,需要很多的包,本次所有的包都已经打包好了见附件;有依赖关系的rpm –ivh XXX.rpm --nodeps
有高版本的rpm –ivh XXX.rpm –force或者rpm –ivh XXX.rpm –nodeps
--force强制安装;
FAQ:监听启动不了或者失败
/etc/resolve.conf
注释nameserver当有网卡有DNS配置时,数据库不能连接到DNS导致监听出错,取消掉DNS,重启网卡,监听正常
配置ntp服务小节:
主要是配置主server的服务,其他的client只需要开启ntp服务然后ntpdate命令同步即可:
[root@localhost ~]# cat /etc/ntp.conf |awk '{if($0 !~ /^$/ && $0 !~ /^#/) {print $0}}' restrict default ignore //默认不允许修改或者查询ntp,并且不接收特殊封包 restrict 127.0.0.1 //给于本机所有权限 restrict 192.168.1.0 mask 255.255.255.0 notrap nomodify //给于局域网机的机器有同步时间的权限 server time.nist.gov prefer //设置时间服务器,加prefer表示优先 server 0.asia.pool.ntp.org server 1.asia.pool.ntp.org server 2.asia.pool.ntp.org server 127.127.1.0 # local clock
10. fudge 127.127.1.0 stratum 10
11. driftfile /var/lib/ntp/drift
12. keys /etc/ntp/keys
13. [root@localhost ~]# netstat -upnl |grep ntpd //查看时程
14.
15. [root@localhost ~]# ntpq -pn //查看同步的服务器IP
16. remote refid st t when poll reach delay offset jitter
17. ==============================================================================
18. 50.77.217.185 .INIT. 16 u - 64 0 0.000 0.000 0.000
19. 202.90.158.4 .INIT. 16 u - 64 0 0.000 0.000 0.000
20. 202.71.100.89 .INIT. 16 u - 64 0 0.000 0.000 0.000
21. 202.134.1.10 .INIT. 16 u - 64 0 0.000 0.000 0.000
22. *127.127.1.0 .LOCL. 10 l 18 64 377 0.000 0.000 0.001
23.
24. [root@localhost ~]# ntpstat //同步的结果
25. synchronised to local net at stratum 11
26. time correct to within 12 ms
27. polling server every 512 s
1、server中的配置需要三点:server ip prefer
server time.nist.gov prefer //设置时间服务器,加prefer表示优先
server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.asia.pool.ntp.org
2、网关和路由内的ip设置一般配置的格式;
restrict 192.168.1.0 mask 255.255.255.0 notrap nomodify //给于局域网机的机器有同步时间的权限
3、本地没有联网的话只能配置本地同步server的地址127.127.1.0设置;
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
4、关闭或者解除123端口限制
service iptables stop;或者配置防火墙策略
查看状态:
iptables -L -n
下面添加对特定端口开放的方法:
使用iptables开放如下端口
/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT
保存
/etc/rc.d/init.d/iptables save
重启服务
service iptables restart
查看需要打开的端口是否生效?
/etc/init.d/iptables status
法2:
或直接编辑/etc/sysconfig/iptables
-A INPUT -p tcp -m tcp --dport 4000 -j ACCEPT
保存在前面部分
再重启:
service iptables restart
开放某端口给特定的ip方法:https://www.cnblogs.com/fengyefeiluo/p/5057617.html
编辑/etc/sysconfig/iptables,添加
-A INPUT -m state --state NEW -m tcp -p tcp -s 127.0.0.1 --dport 6379 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -s 126.212.173.185 --dport 6379 -j ACCEPT
以上加红地方就是只对本机和126.212.173.185开放6379端口,其他ip用telnet是无法连接的,
如果访问ip没有限制,就不需要添加-s ip地址了,例如
-A INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT
对了,一定要在最后添加
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
5、编辑/etc/sysconfig/ntpd添加SYNC_HWCLOCK=yes
6、C-S的ntp服务启动;
7、同步:/usr/sbin/ntpdate -u 192.168.13.17 && /sbin/hwclock –w
FAQ:
1、同步的时候提示:no server suitable for synchronization,如果上述配置都没有问题,则可能需要几分钟等待;
总结
以上所述是小编给大家介绍的Redhat6.5安装oracle11g的方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!