zl程序教程

您现在的位置是:首页 >  系统

当前栏目

CentOS7网络配置和服务管理

2023-09-11 14:20:53 时间
一、配置网络 在使用Vmware Workstation10.2测试过程中,发现可能部分物理机100M网卡不能正常识别,换到了1000M网卡上测试能正常识别虚拟网卡 Centos7系统的网卡设备命名有所变化,可参考CentOS 7下网络设备命名,个人感觉既然学习新系统,完全没必要换成传统的识别名方式,要勇于接受新知识~ 1.通过编辑文件修改网络配置
nameserver 192.168.117.2 2.通过文本工具nmtui修改网络配置(RHEL7/CentOS7默认安装,前提需要开启NetworkManager.service才可以使用) yum -y install NetworkManager-tui nmtui-edit eno16777736  修改网卡配置 nmtui-connect eno16777736 重启网络 systemctl  restart network systemctl  status network 修改主机名: vim /etc/hostname centos7.simlinux.com 退出重新登录即可生效
二、关闭不必要的服务 最小化安装的Centos7系统并没有nano、vim、wget、curl、ifconfig、lsof命令,这里首先安装一下: yum -y install nano vim wget curl net-tools lsof 可以通过netstat和lsof查看系统都运行了哪些服务,将不必要的进行关闭
systemctl list-unit-files    查看正在运行服务的状态报告 systemctl start httpd.service    启动服务 systemctl stop  httpd.service    关闭服务 systemctl restart  httpd.service 重启服务 systemctl reload   httpd.service 重新加载服务 systemctl disable  httpd.service 开机不启动 systemctl enable   httpd.service 开机启动 systemctl status   httpd.service 查看服务运行状态 systemctl show     httpd.service 显示服务或任务的属性 systemctl list-dependencies  httpd.service  检查服务依赖关系 systemctl is-enabled  httpd.service  检查服务是否开机启动及级别 systemctl -H 192.168.117.128 start httpd.service   启动192.168.117.128机器上的httpd服务
Linux-CentOS-指令修改网络自动获取IP 今天尝试使用虚拟机安装完成了CentOS的迷你版本,进去就是命令界面,没有图形界面,但是了,又不能上网,如下图所示
centOS7.0网络配置 因为最近要使用docker,所以打算在centOS7上操作,本文记录下centOS7上的网络配置的内容。首先需要安装好centOS7的虚拟机,我这安装的是 CentOS-7-x86_64-Minimal-1810.iso精简版的。