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