English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
centos 7 Many changes
During the installation process, the operation methods change greatly, and the mini installation also does not have the base option, which leads to many changes in centos6The commands inside7It is not possible to use in the middle.
Moreover, there are many commands that are also gradually stepping out of the stage of CentOS, although they can be installed using yum, but they are indeed old (ifconfig became ip addr, route became ip -route, arp became ip neighbor, ifconfig eth1 up became ip l set eth1 up, ifconfig eth1 down became ip l set eth1 down, netstat became ss).
Firstly, make the system bootable disk
Make the system bootable disk, the USB flash drive needs to be formatted, so first copy out the important files
Firstly, download a CentOS-7-x86_64-Minimal-1511.iso image file, this is the download addresshttps://www.centos.org/download/]![Download minimal ISO for mini]
Click on the 'download minimal ISO' for mini and enter, then choose to download according to the actual situation of your computer, as my computer is64position!
I am athttp://mirrors.sina.cn/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso I feel it's faster. After the download is complete, it should be like this!
Then download a large cabbage (a tool for making USB bootable disks) download address: https://www.oldtoolbag.com/softs/503297.html Here I use the installation version. After the download is complete, install it. Then, click UltraISO.exe, and then select Continue using. After entering, select the upper left corner of the file -> Open and select the mirror file you just downloaded. After adding, click Start -> Write hard disk image, click format your USB drive, then click Write, and after the writing is complete, the bootable disk is ready.
Then insert the USB drive into the computer where you want to install it. Since computer models vary, the way each person enters the installation page is different, so you need to check first which key to press to enter the installation page. Mine is the 'Del' page, desktop computers Award BIOS: press 'Del' key;
This is just one way for some computers. It depends on personal actual conditions. Then go into misi and select your own USB drive and press F10Select 'OK', save and restart. Then you will enter the installation page and start installing CentOS 7
Install CentOS 7
The installation steps are as follows.
Select the installation language, English is the default in this document.
Select the time zone, here we select Asia, Shanghai. There is a Network Time in the upper right corner that needs to be set before it can be used.
Select the software to be installed, for servers. Select Minimal Install and click Done in the upper right corner.
In CentOS7Inside, there is no base package, so the commands have changed, see the following for details.
Select the hard disk, click I will configure partioning (manual partition) below and then click Done in the upper right corner.
Click the lower left corner+
Input/ Click add mount point
Partition reference, this part is best to understand the installation according to the actual situation, try not to copy it completely.
After the operation is completed, click Done in the upper corner.
Click Accept Changes to apply the partition table.
The automatic backup function has been disabled.
Set the network and computer name.
Set the root password during the installation process, click ROOT PASSWD.
Set the password, click Done in the upper left corner.
Installation completed, click Reboot to restart.
Complete the installation of the operating system.
The following are the steps for simple optimization of commands and operating systems:
———————————-Hello everyone, I am a separator, although I am not very beautiful ———————————-
Reference for network commands
ip [options] operation object {link|addr|route…}
## ip link show # Display network interface information ## ip link set eth0 upi # Enable the network card ## ip link set eth0 down # Disable the network card ## ip link set eth0 promisc on # Enable the promiscuous mode of the network card ## ip link set eth0 promisc offi # Disable the promiscuous mode of the network card ## ip link set eth0 txqueuelen 1200 # Set the queue length of the network card ## ip link set eth0 mtu 1400 # Set the maximum transmission unit of the network card ## ip addr show # Display network card IP information ## ip addr add 192.168.0.1/24 dev eth0 # Set the IP address of eth0 network card192.168.0.1 ## ip addr del 192.168.0.1/24 dev eth0 # Delete the IP address of eth0 network card ## ip route list # Display routing information ## ip route add 192.168.4.0/24 via 192.168.0.254 dev eth0 # Set192.168.4Gateway for the .0 network segment is192.168.0.254, data through eth0 interface ## ip route add default via 192.168.0.254 dev eth0 # Set default gateway to192.168.0.254 ## ip route del 192.168.4.0/24 # Delete192.168.4Gateway for the .0 network segment ## ip route del default # Delete default route
View network interface information
[root@test ~]# ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000 link/ether 00:0c:29:e9:5d:7f brd ff:ff:ff:ff:ff:ff
View network interface information
[root@test ~]# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:e9:5d:7f brd ff:ff:ff:ff:ff:ff inet 192.168.23.131/24 brd 192.168.23.255 scope global dynamic eno16777736 valid_lft 1383sec preferred_lft 1383sec inet6 fe80::20c:29ff:fee9:5d7f/64 scope link valid_lft forever preferred_lft forever
View routing table
[root@test ~]# ip route list default via 192.168.23.2 dev eno16777736 proto static metric 100 192.168.23.0/24 dev eno16777736 proto kernel scope link src 192.168.23.131 metric 100
Add static IP (static)
After installing the default ones, the network connection is not automatically enabled!
Configuration
cd /etc/sysconfig/network-scripts/ # Enter the network configuration file directory
Due to each person's eno16777736This name is different, but the prefix is the same, and it is usually/etc/sysconfig/network-scripts/The first one in this directory
vi ifcfg-eno16777736 # Edit the configuration file and add or modify the following content
These are determined according to individual circumstances
IPADDR0=192.168.21.128 # Set IP address PREFIXO0=24 # Set subnet mask GATEWAY0=192.168.21.2 # Set gateway DNS1=8.8.8.8 # Set primary DNS DNS2=8.8.4.4 # Set backup DNS Modify BOOTPROTO to static BOOTPROTO=static # enable static IP address Modify this ONBOOT to yes, so that your computer can connect to the network when it starts up ONBOOT=yes # enable automatic network connection
HWADDR=00:0C:29:8D:24:73 TYPE=Ethernet BOOTPROTO=static # enable static IP address DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=eno16777736 UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11 ONBOOT=yes # enable automatic network connection IPADDR0=192.168.21.128 # Set IP address PREFIXO0=24 # Set subnet mask GATEWAY0=192.168.21.2 # Set gateway DNS1=8.8.8.8 # Set primary DNS DNS2=8.8.4.4 # Set backup DNS :wq! # save and exit
service network restart # restart the network ping www.baidu.com # test if the network is normal
ip addr # view IP address
If the ip you just configured appears, it means you have succeeded
Enter
That's all for this article, I hope it will be helpful to everyone's learning, and I also hope everyone will support the Yelling Tutorial more.
Statement: The content of this article is from the Internet, the copyright belongs to the original author, the content is contributed and uploaded by Internet users spontaneously, this website does not own the copyright, does not undergo manual editing, and does not assume relevant legal responsibility. If you find any content suspected of copyright infringement, please send an email to: notice#oldtoolbag.com (When reporting, please replace # with @ and provide relevant evidence. Once verified, this site will immediately delete the content suspected of infringement.)