CentOS 6.0 schematic Installation Tutorial: Basic configuration after installation

Source: Internet
Author: User
Keywords installation installation tutorials CentOS
Tags 192.168.0.1 address aliyun basic centos configuration default domain name

1. Network configuration

(1) Command configuration

# ifconfig eth0 192.168.0.2 netmask 255.255.255.0 address, subnet mask

# route add default GW 192.168.0.1 dev eth0/Gateway

# hosthttp://www.aliyun.com/zixun/aggregation/11696.html ">name CentOS//Computer name

(2) file configuration

<1> Modify IP Address

Modify the configuration file for the IP address of the corresponding network card

# Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0 (describes the device alias for the NIC, for example, it is eth0 in Ifcfg-eth0 file)

Bootproto=static (set up the network card to obtain IP address, possible options for STATIC,DHCP or BOOTP, respectively, corresponding to the static specified IP address, the IP address obtained through the DHCP protocol, the IP address obtained through the BOOTP protocol)

broadcast=192.168.0.255 (corresponding subnet broadcast address)

HWADDR=00:07:E9:05:E8:B4 (corresponding network card physical address)

ipaddr=12.168.1.2 (This field specifies the IP address of the network adapter if you set the network card to obtain an IP address as a static designation)

Ipv6init=no (turn on or off IPv6;

Ipv6_autoconf=no (turn on or off IPv6 automatic configuration;

netmask=255.255.255.0 (Network mask corresponding to network card)

network=192.168.1.0 (network address for NIC)

Onboot=yes (whether this network interface is set when the system is started, when set to Yes, activate the device when the system starts)

<2> Modify Gateway

Modify the configuration file of the gateway for the corresponding network card

# vi/etc/sysconfig/network

Networking=yes (Indicates whether the system is using the network, typically set to Yes.) If set to no, the network cannot be used, and many system services programs will not start.

Hostname=centos (sets the host name for this machine, where the host name is set to correspond to the hostname set in hosts)

gateway=192.168.1.1 the IP address of the gateway that sets the local connection. For example, the gateway is 10.0.0.2)

<3> Modify DNS

To modify the DNS profile of the corresponding network adapter

# vi/etc/resolv.conf

NameServer 202.101.224.68 (domain name server)

NameServer 202.101.224.69 (domain name server)

<4> Restart Network configuration

# Service Receptacle Restart

Or

#/etc/init.d/network Restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.