Minimize the configuration required after installing CentOS 6. X

Time:2021-10-18

1、 / boot partition backup

2、 Network configuration

Modify host name:

Copy code

The code is as follows:

#vi /etc/sysconfig/network
NETWORKING=yes
#HOSTNAME=localhost.localdomain
HOSTNAME=CentOS-1
#You can also set up a gateway here
#GATEWAY=192。168.30.1

Set network to DHCP get

Copy code

The code is as follows:

vi /etc/sysconfig/network-scrip/ifcfg-eth0
DEVICE=”eth0″
BOOTPROTO=”dhcp”
HWADDR=”08:00:27:A7:AB:97″
NM_CONTROLLED=”no”
ONBOOT=”no”
TYPE=”Ethernet”
UUID=”9622f9e1-6218-4c56-9f45-7ae29b477e89″

Set static IP

Copy code

The code is as follows:

vi /etc/sysconfig/network-scrip/ifcfg-eth0
[[email protected] ssh]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=08:00:27:e2:62:9b
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.30.223
NETMASK=255.255.255.0
GATEWAY=192.168.30.1
DNS=8.8.8.8
USERCTL=no
IPV6INIT=no

3、 Install WGet tool

Copy code

The code is as follows:

yum install wget

4、 Source configuration

Copy code

The code is as follows:

cd /etc/yum.repos.d
mv CentOS-Base.repo bak-CentOS-Base.repo
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
yum clean all
yum makecache

5、 SSH key configuration

https://www.jb51.net/os/RedHat/63316.html

6、 Sudo configuration

7、 Installation of compilation environment and tools

Copy code

The code is as follows:

yum groupinstall “Development Libraries” “Development Tools”

Recommended Today

OC basis

IOS development interview essential skills chart.png What are objects and what are the objects in OC? An object is an instance of a class; Is an instance created through a class, which is generally called an instance object; Common objects in OC include instance objects, class objects, and metaclass objects; What is a class? What […]