Basic configuration after CentOS Installation

Source: Internet
Author: User
Tags nameserver

1. Network Configuration

(1) command configuration

# Ifconfig eth0 192.168.0.2 netmask 255.255.255.0 // ip address, subnet mask

# Route add default gw 192.168.0.1 dev eth0 // Gateway

# Hostname centos // computer name

(2) file configuration

<1> modify an IP address

Modify the configuration file of the corresponding Nic IP Address

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

DEVICE = eth0 (describe the DEVICE alias for the NIC, for example, it is eth0 in the ifcfg-eth0 file)

BOOTPROTO = static, IP addresses obtained through the bootp protocol)

BROADCAST = 192.168.0.255 (corresponding subnet BROADCAST address)

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

IPADDR = 12.168.1.2 (if the ip address obtained by the NIC is set to static, the ip address corresponding to the NIC is specified in this field)

IPV6INIT = no (enable or disable IPv6; Disable no, enable yes)

IPV6_AUTOCONF = no (enable or disable automatic IPv6 Configuration; Disable no, enable yes)

NETMASK = 255.255.255.0 (network mask corresponding to the NIC)

NETWORK = 192.168.1.0 (NETWORK address corresponding to the NIC)

ONBOOT = yes (whether to set this network interface when the system starts. If it is set to yes, the device is activated when the system starts)

<2> modify a gateway

Modify the gateway configuration file of the corresponding Nic

# Vi/etc/sysconfig/network

NETWORKING = yes (indicates whether the system uses the network, which is generally set to yes. If it is set to no, the network cannot be used, and many system service programs cannot be started)

HOSTNAME = centos (set the Host Name of the local machine. The host name set here must correspond to the host name set in/etc/hosts)

GATEWAY = 192.168.1.1 (set the IP address of the GATEWAY connected to the local machine. For example, the gateway is 10.0.0.2)

<3> modify DNS

Modify the DNS configuration file of the corresponding Nic

# 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 network restart

Or

#/Etc/init. d/network restart

2. Software source configuration

Frequently Used update sources in China with fast speed are as follows:

Http://mirrors.163.com/centos/ 163-Netease

Http://mirrors.ta139.com/centos/china mobile (Shandong mobile)

Http://centos.ustc.edu.cn/centos/university of Science and Technology of China

Http://developer.neu.edu.cn/centos/northeastern University

Edit the yum configuration file:

# Vi/etc/yum. repos. d/CentOS-Base.repo

[Base]
Name = CentOS-$ releasever-Base
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = OS
# Baseurl = http://developer.centos.org/centos/?releasever/ OS /?basearch/
Baseurl = http://mirrors.163.com/centos/?releasever/ OS /?basearch/
Http://mirrors.ta139.com/centos/?releasever/ OS /?basearch/
Http://centos.ustc.edu.cn/centos/?releasever/ OS /?basearch/
Http://developer.neu.edu.cn/centos/?releasever/ OS /?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

# Released updates
[Updates]
Name = CentOS-$ releasever-Updates
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = updates
# Baseurl = http://developer.centos.org/centos/?releasever/updates/?basearch/
Baseurl = http://mirrors.163.com/centos/?releasever/updates/?basearch/
Http://mirrors.ta139.com/centos/?releasever/updates/?basearch/
Http://centos.ustc.edu.cn/centos/?releasever/updates/?basearch/
Http://developer.neu.edu.cn/centos/?releasever/updates/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

# Packages used/produced in the build but not released
[Addons]
Name = CentOS-$ releasever-Updates
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = addons
# Baseurl = http://developer.centos.org/centos/?releasever/addons/?basearch/
Baseurl = http://mirrors.163.com/centos/?releasever/addons/?basearch/
Http://mirrors.ta139.com/centos/?releasever/addons/?basearch/
Http://centos.ustc.edu.cn/centos/?releasever/addons/?basearch/
Http://developer.neu.edu.cn/centos/?releasever/addons/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

# Additional packages that may be useful
[Extras]
Name = CentOS-$ releasever-Extras
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = extras
# Baseurl = http://developer.centos.org/centos/?releasever/extras/?basearch/
Baseurl = http://mirrors.163.com/centos/?releasever/extras/?basearch/
Http://mirrors.ta139.com/centos/?releasever/extras/?basearch/
Http://centos.ustc.edu.cn/centos/?releasever/extras/?basearch/
Http://developer.neu.edu.cn/centos/?releasever/extras/?basearch/
Gpgcheck = 1
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

# Additional packages that extend functionality of existing packages
[Centosplus]
Name = CentOS-$ releasever-Plus
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = centosplus
# Baseurl = http://developer.centos.org/centos/?releasever/centosplus/?basearch/
Baseurl = http://mirrors.163.com/centos/?releasever/centosplus/?basearch/
Http://mirrors.ta139.com/centos/?releasever/centosplus/?basearch/
Http://centos.ustc.edu.cn/centos/?releasever/centosplus/?basearch/
Http://developer.neu.edu.cn/centos/?releasever/centosplus/?basearch/
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

# Contrib-packages by Centos Users
[Contrib]
Name = CentOS-$ releasever-Contrib
Using list = http://mirrorlist.centos.org /? Release = $ releasever & arch = $ basearch & repo = contrib
# Baseurl = http://developer.centos.org/centos/?releasever/contrib/?basearch/
Baseurl = http://mirrors.163.com/centos/?releasever/contrib/?basearch/
Http://mirrors.ta139.com/centos/?releasever/contrib/?basearch/
Http://centos.ustc.edu.cn/centos/?releasever/contrib/?basearch/
Http://developer.neu.edu.cn/centos/?releasever/contrib/?basearch/
Gpgcheck = 1
Enabled = 0
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

Run the following command to update to the latest system:

# Rpm-import/etc/pki/rpm-gpg-key *

# Yum upgrade

3. Install the Language Pack

Install from the installation disk and find the corresponding rpm package:

Fonts-chinese-3.02-9.6.el5.noarch.rpm

Fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm

You can use yum for installation. The installation method is as follows:

# Yum groupinstall <language>-support

In the preceding command, <language> is one of the following: assamese, bengali, chinese, gujarati, hindi, Japan, kannada, korean, malayalam, marathi, oriya, punjabi, sinhala, tamil, thai, or telegu.

4. decompression software

# Yum install unrar unzip p7zip-full

5. Chinese Input Method

# Yum install Fcitx SCIM Sunpinyin

Related Article

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.