在统信UOS操作系统1060上如何部署DNS服务器?01
原文链接:在统信UOS操作系统1060上如何部署DNS服务器?01
hello,大家好啊!今天我要给大家带来的是在统信UOS操作系统1060上部署DNS服务器系列的第一篇文章。在这个系列中,我们将一步步搭建一个完整的DNS服务器环境。而今天,我们的第一步是搭建一个测试用的HTTP服务器。这个过程相对简单,但它是构建测试DNS服务器的基础。让我们一起来看看具体步骤吧!
为什么需要搭建HTTP服务器?
在搭建DNS服务器之前,我们需要一个可以测试DNS解析的目标。HTTP服务器提供了一个简单的方式来验证DNS服务器是否正确地将域名解析到了正确的IP地址。
部署信息:
httpd服务器:
IP:192.168.80.111
网关:192.168.80.254
掩码:255.255.255.0
操作系统:统信UOS服务器操作系统1060
dns服务器:
IP:192.168.80.132
网关:192.168.80.254
掩码:255.255.255.0
操作系统:统信UOS服务器操作系统1060
终端:
IP:192.168.80.56
网关:192.168.80.254
掩码:255.255.255.0
操作系统:统信UOS桌面操作系统1060
1、查看httpd服务器系统信息
[root@pdsyw ~]# cat /etc/os-version
[Version]
SystemName=UOS Server
SystemName[zh_CN]=统信服务器操作系统
ProductType=Server
ProductType[zh_CN]=服务器
EditionName=e
EditionName[zh_CN]=e
MajorVersion=20
MinorVersion=1060
OsBuild=12038.101.100
[root@pdsyw ~]# uname -a
Linux pdsyw 4.19.90-2305.1.0.0199.56.uel20.x86_64 #1 SMP Fri May 12 19:23:49 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
[root@pdsyw ~]#
2、查看httpd服务器IP地址
[root@pdsyw ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
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: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:0c:29:a1:2b:16 brd ff:ff:ff:ff:ff:ff
inet 192.168.80.111/24 brd 192.168.80.255 scope global noprefixroute ens160
valid_lft forever preferred_lft forever
inet6 fe80::b36e:53e:a15:9f78/64 scope link noprefixroute
valid_lft forever preferred_lft forever
[root@pdsyw ~]#
3、安装httpd服务
[root@pdsyw ~]# yum install httpd -y
Last metadata expiration check: 0:00:25 ago on 2023年12月18日 星期一 19时38分39秒.
Dependencies resolved.
======================================================================================
Package Arch Version Repository Size
======================================================================================
Installing:
httpd x86_64 2.4.43-23.up1.uel20 UnionTechOS-Server-20-everything 1.3 M
Installing dependencies:
apr x86_64 1.7.0-5.uel20 UnionTechOS-Server-20-everything 108 k
apr-util x86_64 1.6.1-15.uel20 UnionTechOS-Server-20-everything 108 k
httpd-filesystem noarch 2.4.43-23.up1.uel20 UnionTechOS-Server-20-everything 9.3 k
httpd-help noarch 2.4.43-23.up1.uel20 UnionTechOS-Server-20-everything 2.4 M
httpd-tools x86_64 2.4.43-23.up1.uel20 UnionTechOS-Server-20-everything 68 k
mod_http2 x86_64 1.15.13-1.uel20 UnionTechOS-Server-20-everything 124 k
Transaction Summary
======================================================================================
Install 7 Packages
Total download size: 4.0 M
Installed size: 13 M
Downloading Packages:
(1/7): apr-util-1.6.1-15.uel20.x86_64.rpm 406 kB/s | 108 kB 00:00
(2/7): apr-1.7.0-5.uel20.x86_64.rpm 375 kB/s | 108 kB 00:00
(3/7): httpd-filesystem-2.4.43-23.up1.uel20.noarch.rp 191 kB/s | 9.3 kB 00:00
(4/7): httpd-tools-2.4.43-23.up1.uel20.x86_64.rpm 217 kB/s | 68 kB 00:00
(5/7): httpd-2.4.43-23.up1.uel20.x86_64.rpm 1.5 MB/s | 1.3 MB 00:00
(6/7): httpd-help-2.4.43-23.up1.uel20.noarch.rpm 2.6 MB/s | 2.4 MB 00:00
(7/7): mod_http2-1.15.13-1.uel20.x86_64.rpm 211 kB/s | 124 kB 00:00
--------------------------------------------------------------------------------------
Total 3.3 MB/s | 4.0 MB 00:01
UnionTechOS-Server-20-1060-everything 16 kB/s | 1.7 kB 00:00
Importing GPG key 0x8DF595ED:
Userid : "UnionTech <security@uniontech.com>"
Fingerprint: C822 503F 2F4C E25A 6EA0 65BE 9055 A64E 8DF5 95ED
From : https://euler-packages.chinauos.com/server-euler//fuyu/1060/everything/x86_64/RPM-GPG-KEY-UnionTech
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: apr-1.7.0-5.uel20.x86_64 1/7
Installing : apr-1.7.0-5.uel20.x86_64 1/7
Running scriptlet: apr-1.7.0-5.uel20.x86_64 1/7
Running scriptlet: apr-util-1.6.1-15.uel20.x86_64 2/7
Installing : apr-util-1.6.1-15.uel20.x86_64 2/7
Running scriptlet: apr-util-1.6.1-15.uel20.x86_64 2/7
Installing : httpd-tools-2.4.43-23.up1.uel20.x86_64 3/7
Running scriptlet: httpd-filesystem-2.4.43-23.up1.uel20.noarch 4/7
Installing : httpd-filesystem-2.4.43-23.up1.uel20.noarch 4/7
Installing : httpd-help-2.4.43-23.up1.uel20.noarch 5/7
Installing : mod_http2-1.15.13-1.uel20.x86_64 6/7
Installing : httpd-2.4.43-23.up1.uel20.x86_64 7/7
Running scriptlet: httpd-2.4.43-23.up1.uel20.x86_64 7/7
Verifying : apr-1.7.0-5.uel20.x86_64 1/7
Verifying : apr-util-1.6.1-15.uel20.x86_64 2/7
Verifying : httpd-2.4.43-23.up1.uel20.x86_64 3/7
Verifying : httpd-filesystem-2.4.43-23.up1.uel20.noarch 4/7
Verifying : httpd-help-2.4.43-23.up1.uel20.noarch 5/7
Verifying : httpd-tools-2.4.43-23.up1.uel20.x86_64 6/7
Verifying : mod_http2-1.15.13-1.uel20.x86_64 7/7
Installed:
apr-1.7.0-5.uel20.x86_64 apr-util-1.6.1-15.uel20.x86_64
httpd-2.4.43-23.up1.uel20.x86_64 httpd-filesystem-2.4.43-23.up1.uel20.noarch
httpd-help-2.4.43-23.up1.uel20.noarch httpd-tools-2.4.43-23.up1.uel20.x86_64
mod_http2-1.15.13-1.uel20.x86_64
Complete!
[root@pdsyw ~]#
4、编辑index页面
[root@pdsyw ~]# vi /var/www/html/index.html
[root@pdsyw ~]#
[root@pdsyw ~]# cat /var/www/html/index.html
hello bbs.pdsyw.cn
[root@pdsyw ~]#
[root@pdsyw ~]#
5、放开防火墙
[root@pdsyw ~]# firewall-cmd --permanent --add-service=http
success
[root@pdsyw ~]#
[root@pdsyw ~]# firewall-cmd --reload
success
[root@pdsyw ~]#
6、启动httpd服务
[root@pdsyw ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
[root@pdsyw ~]# systemctl start httpd
[root@pdsyw ~]#
[root@pdsyw ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: dis>
Active: active (running) since Mon 2023-12-18 19:40:18 CST; 4s ago
Docs: man:httpd.service(8)
Process: 27885 ExecStartPost=/usr/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
Main PID: 27884 (httpd)
Status: "Processing requests..."
Tasks: 213
Memory: 33.7M
CGroup: /system.slice/httpd.service
├─27884 /usr/sbin/httpd -DFOREGROUND
├─27886 /usr/sbin/httpd -DFOREGROUND
├─27887 /usr/sbin/httpd -DFOREGROUND
├─27888 /usr/sbin/httpd -DFOREGROUND
└─27889 /usr/sbin/httpd -DFOREGROUND
12月 18 19:40:18 pdsyw systemd[1]: Starting The Apache HTTP Server...
12月 18 19:40:18 pdsyw httpd[27884]: AH00558: httpd: Could not reliably determine the>
12月 18 19:40:18 pdsyw systemd[1]: Started The Apache HTTP Server.
[root@pdsyw ~]#
7、查看终端操作系统信息
dsyw@pdsyw-PC:~$ cat /etc/os-version
[Version]
SystemName=UOS Desktop
SystemName[zh_CN]=统信桌面操作系统
ProductType=Desktop
ProductType[zh_CN]=桌面
EditionName=Professional
EditionName[zh_CN]=专业版
MajorVersion=20
MinorVersion=1060
OsBuild=11018.100.100
pdsyw@pdsyw-PC:~$
pdsyw@pdsyw-PC:~$ uname -a
Linux pdsyw-PC 4.19.0-amd64-desktop #6030 SMP Tue Jun 27 15:58:51 CST 2023 x86_64 GNU/Linux
pdsyw@pdsyw-PC:~$
8、在浏览器输入IP成功访问网站
9、通过域名访问网站失败
通过以上步骤,你可以在统信UOS操作系统1060上成功搭建一个用于测试的HTTP服务器。这是搭建DNS服务器的重要一步,因为它为后续的DNS解析提供了一个实际的测试目标。
希望这篇文章能帮助到需要在统信UOS上部署DNS服务器的朋友们。如果你有任何问题或者更多的经验分享,请在评论区留言,我们一起讨论。
最后,如果你觉得这篇文章有用,请分享转发。点个关注和在看吧,让我们一起探索和学习更多关于Linux系统管理和网络服务部署的知识!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!