标签 "centos7" 的相关文章

Centos7安装配置iptable

这几天配置主机时,遇到centos7下的iptable问题,上网搜了下,转载如下: CentOS7默认的防火墙不是iptables,而是firewalle. 安装iptable iptable-service 先检查是否安装了iptables service iptables status 安装iptables yum install -y iptables 升级iptables yum upda

Centos7 更换国内源

有时CentOS默认的yum源不是国内的,导致yum在线安装及更新速度不是很理想,这时候需要将yum源设置为国内镜像站点(网易或者阿里云等)。 更换yum国内源: 备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.rep

CentOS7 更改ssh默认端口

Linux服务器默认ssh端口为22,这样会造成有被暴力破解密码的风险,下面是更换ssh端口过程: 添加ssh端口 vi /etc/ssh/sshd_config 打开配置文件,找到#Port 22,将前面的#去掉,再起一行添加我们需要更改的端口号,比如我修改为2022,再下方添加的为#Port 2022 配置防火墙规则 firewall-cmd --zone=public --add-por

CentOS7修改主机名

其实主机名hostname无所谓,但强迫症的我看着就是不舒服,CentOS7下修改主机名挺简单的,下面两种方法都可以将主机名修改为myname: 一句命令就搞定 hostnamectl set-hostname  myname 修改/etc/hostname vi /etc/hostname 将里面文字修改为myname 当然,最后都要重启一下的 reboot 其实centos7的主机名有三个

局域网内CentOS7挂载网络磁盘方法

服务端 安装nfs-nfs-utils, rpcbind yum install nfs-utils rpcbind -y 设置rpcbind和nfs服务开机自动启动 systemctl enable nfs.service  systemctl enable rpcbind.service 启动rpcbind和nfs服务(顺序不要弄反,反了会出现类似program not registered

centos7 关闭防火墙

临时关闭,重启后失效 systemctl stop firewalld 永久关闭 systemctl disable firewalld 查看防火墙状态 systemctl status firewalld