本文共 1682 字,大约阅读时间需要 5 分钟。
CentOS系统的默认用户名为centos,密码为xxx。由于网络环境使用了动态IP,每次开机时IP地址可能会发生变化。
xxx.xxx.xxx.2)。> su root
ifcfg-eno16777736: > cd /etc/sysconfig/network-scripts> nano ifcfg-eno16777736
填写IP地址、网关和DNS服务器地址:
IPADDR=192.168.43.200GATEWAY=192.168.43.2DNS=192.168.43.2
> su root> service network restart
/etc/resolv.conf,添加名称服务器: > nano /etc/resolv.conf
添加以下内容:
nameserver 192.168.43.22
> su root> service network restart
> ping www.baidu.com
CentOS 6.5及之前版本:
> sudo service firewalld stop> sudo service firewalld start> sudo service firewalld status
CentOS 7及以上版本:
> sudo systemctl enable firewalld.service> sudo systemctl disable firewalld.service> sudo systemctl start firewalld.service> sudo systemctl stop firewalld.service> sudo systemctl status firewalld.service
> curl -o /etc/yum.repos.d/ali.repo http://mirrors.aliyun.com/repo/Centos-7.repo
> mv /etc/yum.repos.d/Centos-7.repo /etc/yum.repos.d/Centos-7.repo.bak> yum clean cache> yum makecache
> yum list
> yum list installed
> yum search nano
> yum remove nano
> yum -y install nano
> mkdir /home/centos/rpms
> sudo yum install --downloadonly --downloaddir=/home/centos/rpms wget
> su root> yum search ifconfig
> yum -y install net-tools
公司常用工具包括:
putty.exe文件。通过以上步骤,可以实现 CentOS 7 系统的基本配置和网络管理。如果有其他问题,请根据具体情况进行调整。
转载地址:http://zwrfk.baihongyu.com/