Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the configuration method of IP setting in Linux centos system

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about how to configure the IP settings of the Linux centos system, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

Today, I installed a centos-4.7 on vmware server (free redhat, a cloned version of Little Red Riding Hood, which corresponds to Little Red Riding Hood's version), in which ip was not installed properly. Generally, the IP address of the network card of Linux centos is stored in a file, and this configuration file is under / etc/sysconfig/network-scripts.

The names are ifcfg-eth0,ifcfg-eth2.... If you have a network card, there is only one file ifcfg-eth0. If you have two or more network cards, there will be ifcfg-eth2, ifcfg-eth3 and other files.

File structure:

DEVICE=eth0 / / indicate the device name

Whether ONBOOT=yes// starts the application

BOOTPROTO=static / / Startup type static (default dhcp)

IPADDR=192.168.0.77 / / IP address

NETMASK=255.255.255.0// subnet mask

GATEWAY=192.168.0.1 / / Gateway

Steps:

1. Vi / etc/sysconfig/network-scripts/ifcfg-teh0 (can also be set through the administrative tool setup or netconfig command)

2. Restart the network service service network restart

To connect to the host: configure the xp host, set it to host-only mode on vmware, modify the IP address of vmnet1 to 192.168.0.1 and Linux centos IP to 192.168.0.77 in xp.

Shared Internet access settings: modify the network attribute of the first virtual network card in xp to shared internet (attribute-> Advanced-> check "allow other network users to connect through the Internet connection of this computer") will automatically change the vmnet1 to 192.168.0.1 Magi Linux centos to be able to access the Internet.

After reading the above, do you have any further understanding of the IP configuration method of the Linux centos system? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report