【Linux】时间同步设置+防火墙设置+SELinux设置
| 时间同步设置 |
在大数据集群环境中,要求每台集群的时间必须是同步的,这样我们就会要求每台集群的时间必须和一台服务的时间是同步的。接下来介绍一下步骤:
1,设置ntp客户端
yum -y install ntp 安装ntp时间同步软件
systemctl enable ntpd 使软件可用
systemctl start ntpd 启动ntp软件
2,编辑/etc/ntp.conf文件
vi /etc/ntp.conf
重点修改以下内容
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#server 0.centos.pool.ntp.org iburst
server 192.168.243.133 ------->(此处需要修改,以哪台为准就写那台的IP)
restrict 192.168.243.133 nomodify notrap noquery------->(此处需要修改,以哪台为准就写那台的IP)
server 192.168.243.*** ------->(本机IP是多少就写多少)
fudge 192.168.243.*** ------->(本机IP是多少就写多少) stratum 10
3,重启ntpd服务:
systemctl restart ntpd
4,启动后,查看同步情况:
ntpq -p
ntpstat
| 防火墙设置 |
关闭firewall:
临时关闭防火墙: systemctl stop firewalld
永久关闭防火墙: systemctl disable firewalld.service
关闭iptables:
关闭命令: service iptables stop
永久关闭防火墙:chkconfig iptables off
检查防火墙状态:service iptables status
查看防火墙状态:
检查firewall的状态:systemctl status firewalld.service
检查iptables状态:service iptables status
| SELinux设置 |
1,临时关闭SELinux:
setenforce 0
2,永久关闭SELinux:
vi /etc/selinux/config
将配置文件中SELINUX=enforcing改为SELINUX=disabled
注:修改配置文件需要重启机器,但我们已临时关闭SELinux,等下次机器重启后,配置文件自动生效
修改前:
修改后:
【Linux】时间同步设置+防火墙设置+SELinux设置的更多相关文章
- Linux CentOS 7 防火墙与端口设置操作
CentOS升级到7之后用firewall代替了iptables来设置Linux端口, 下面是具体的设置方法: []:选填 <>:必填 [<zone>]:作用域(block.d ...
- NO13 Linux的基础优化-关闭SELinux功能-Linux的7种运行级别-防火墙设置-中文显示设置
壹 安装Linux系统后调优及安全设置: 1 关闭SELinux功能: [root@localhost data]# sed 's#SELINUX=enforcing#SELINUX=disable ...
- 网卡配置文件详解 用户管理与文件权限篇 文件与目录权限 软连接 tar解压命令 killall命令 linux防火墙 dns解析设置 计划任务crond服务 软件包安装 阿里云 yum源 安装
Linux系统基础优化及常用命令 Linux基础系统优化 引言没有,只有一张图. Linux的网络功能相当强悍,一时之间我们无法了解所有的网络命令,在配置服务器基础环境时,先了解下网络参数设定命令. ...
- Centos 7 安装 设置 IP地址,DNS,主机名,防火墙,端口,SELinux (实测+笔记)
环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 安装步骤: 1.虚拟系统安装 1.1 使 ...
- centos7防火墙以设置以及关闭selinux
一.CentOS 7.X 关闭SELinux 1.查看 getenforce permissive 或者 enforcing模式 2.临时设置 setenforce 1 成为permissive模式 ...
- Linux对外提供服务 网络操作 端口操作 1.开启服务监听端口 2.设置防火墙,放行访问端口的包 iptables&netfilter 四表五链和通堵策略
主题: Linux服务器上软件提供服务 1.网络操作 2.端口操作 1.网络操作 本机必须能够ping通目标主机(本地虚拟机或者远程主机) 2.端口操作 1.开启服务监听端口 2.设置防火墙,放行访问 ...
- Linux防火墙firewalld安全设置
背景描述 防火墙是具有很好的保护作用.入侵者必须首先穿越防火墙的安全防线,才能接触目标计算机.在公司里数据安全是最重要的,要求安全部门进行全公司进行服务器防火墙安全搭建,在原有的基础上进行安全的防火墙 ...
- CentOS设置防火墙开放端口
1. iptables是linux下的防火墙,同时也是服务的名称. service iptables status service iptables start service iptables st ...
- CentOS6.5 服务器+apache5.3绑定多个域名+SELinux设置
下面简单的介绍了如何通过设置Apache的http.conf文件,进行多个域名以及其相关的二级域名的绑定(假设我们要绑定的域名是minidx.com和ntt.cc,二级域名是blog.minidx.c ...
随机推荐
- python: 反射机制;
import comma def run(): inp = input('请输入要调用的函数').strip(); if hasattr(comma,inp): fun = getattr(comma ...
- httprouter使用pprof
httprouter使用pprof 参考:https://github.com/feixiao/httpprof 性能分析参考:https://github.com/caibirdme/hand-to ...
- js中Date与timestamp(时间戳)的相互转换
#时间(Date)转时间戳(Timestamp): 1.var timestamp1 = (new Date()).valueOf(); // 结果:1535374762785,通过valueOf() ...
- SQL Server 表值函数
表值函数还是很有意思的,我现在想实现一个功能.就是我查询出来的内容,我要对结果进行再次查询,也要输入参数,我想了想 1.存储过程 不能对执行后的结果进行再次查询,需要创建临时表,太麻烦 2.视图 ...
- Hadoop问题:There are 0 datanode(s) running and no node(s) are excluded in this operation.
问题描述: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /tmp/hadoop-yarn/staging/hado ...
- STM32学习笔记:【003】GPIO
版本:STM32F429 Hal库v1.10 在STM32中,最常用到的功能莫过于GPIO(General Purpose Input Output .通用输入/输出)了,在STM32中,除了除去AD ...
- 当php邂逅windows通用上传缺陷
早上逛乌云发现了PKAV大牛的一篇文章,针对php和windows文件上传的分析,思路很YD,果断转之与大家分享. 虽然此文可能有许多的限制条件,但是如果你认真阅读会发现,其实还是比较实用的. 另外一 ...
- wxpython绘制音频
#-*- coding: utf-8 -*- ############################################################################# ...
- Nginx 学习笔记(六)引入线程池 性能提升9倍
原文地址:https://www.cnblogs.com/shitoufengkuang/p/4910333.html 一.前言 1.Nignx版本:1.7.11 以上 2.NGINX采用了异步.事件 ...
- MySQL随记(一)
数据类型 Insert Update Delete 函数