DA_linux network configuration and its remote connection

One: Modify the basic configuration of Linux 

Run directly: setup, modify according to the prompts

 

1. Modify the hostname: vi /etc/sysconfig/network

 

NETWORKING=yes
HOSTNAME=shizhan1

2. Modify the ip address: vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes #Whether it is enabled on boot
BOOTPROTO=static #ip address is set to static
IPADDR=192.168.232.200
NETMASK=255.255.255.0

service network restart

inconfig eth0 down/up

 3. Modify the mapping relationship between ip address and host name: 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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325366837&siteId=291194637