Client --> hosts文件 --> Client DNS Service Local cache --> DNS Server(recursion递归) --> DNS Server Cache --> DNS iteration(迭代) --> 根 --> 顶级域名DNS --> 二级域名DNS...
[root@CentOS8 ~]#cp /etc/named.rfc1912.zones /etc/named.rfc1912.zones.bj
[root@CentOS8 ~]#chgrp named /etc/named.rfc1912.zones.bj
[root@CentOS8 ~]#cp -p /etc/named.rfc1912.zones.bj /etc/named.rfc1912.zones.sh
[root@CentOS8 ~]#cp -p /etc/named.rfc1912.zones.bj /etc/named.rfc1912.zones.other
[root@CentOS8 ~]#ll /etc/named.rfc1912.zones*
-rw-r----- 1 root named 1096 Jun 22 21:35 /etc/named.rfc1912.zones
-rw-r----- 1 root named 1208 Jun 26 23:13 /etc/named.rfc1912.zones.bj
-rw-r----- 1 root named 1208 Jun 26 23:13 /etc/named.rfc1912.zones.other
-rw-r----- 1 root named 1208 Jun 26 23:13 /etc/named.rfc1912.zones.sh
[root@CentOS8 ~]#vim /etc/named.rfc1912.zones.bj
zone "." IN {
type hint;
file "named.ca";
};
zone "magedu.org" {
type master;
file "magedu.org.zone.bj";
};
[root@CentOS8 ~]#vim /etc/named.rfc1912.zones.sh
zone "." IN {
type hint;
file "named.ca";
};
zone "magedu.org" {
type master;
file "magedu.org.zone.sh";
};
[root@CentOS8 ~]#vim /etc/named.rfc1912.zones.other
zone "." IN {
type hint;
file "named.ca";
};
zone "magedu.org" {
type master;
file "magedu.org.zone.other";
};
2.5.4 创建区域数据库文件
[root@CentOS8 named]#vim magedu.org.zone.bj
$TTL 1D
@ IN SOA master admin (
2021062701;
1D;
1H;
1W;
3H );
NS master
master A 10.0.0.8
www A 10.0.0.100
[root@CentOS8 named]#vim magedu.org.zone.sh
$TTL 1D
@ IN SOA master admin (
2021062701;
1D;
1H;
1W;
3H );
NS master
master A 10.0.0.8
www A 192.168.233.100
[root@CentOS8 named]#vim magedu.org.zone.other
$TTL 1D
@ IN SOA master admin (
2021062701;
1D;
1H;
1W;
3H );
NS master
master A 10.0.0.8
www A 127.0.0.1
[root@CentOS8 named]#systemctl stauts named
[root@CentOS8 named]#rndc reload
2.5.5 客户端验证
[root@client ~]#yum -y install bind-utils
[root@client ~]#host www.magedu.org 10.0.0.8
Using domain server:
Name: 10.0.0.8
Address: 10.0.0.8#53
Aliases:
www.magedu.org has address 192.168.233.100
[root@server1 ~]#host www.magedu.org 192.168.233.8
Using domain server:
Name: 192.168.233.8
Address: 192.168.233.8#53
Aliases:
www.magedu.org has address 10.0.0.100
[root@CentOS8 ~]#host www.magedu.org 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
www.magedu.org has address 127.0.0.1
3、编译、二进制安装MYSQL5.7
3.1 通用二进制格式安装 MYSQL
3.3.1 创建用户
[root@CentOS8 ~]#groupadd -r -g 306 mysql
[root@CentOS8 ~]#useradd -r -g 306 -u 306 -d /data/mysql mysql
[root@CentOS8 local]#mysqladmin -uroot -p'-mYNGF8YiqJg' password 123.com
[root@server1 local]#mysql -uroot -p123.com
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.33 MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)