DA_linux網絡配置及其遠程連接
阿新 • • 發佈:2018-05-06
brush ipaddr PE TP zha hosts 遠程連接 prot art
一: 修改Linux的基本配置
直接運行:setup,根據提示修改
1.修改主機名:vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=shizhan1
2.修改ip地址:vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 TYPE=Ethernet ONBOOT=yes #是否開機啟用 BOOTPROTO=static #ip地址設置為靜態 IPADDR=192.168.232.200 NETMASK=255.255.255.0
service network restart
inconfig eth0 down/up
3.修改ip地址和主機名的映射關系:vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.232.200 shizhan1
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.101 server1.itcast.cn
DA_linux網絡配置及其遠程連接