Sy9-dhcp/dns服务配置

news2024/11/14 17:26:35

前言、

课程需要(进入服务器综合配置使用阶段了),这里还是沿用桌面版的ubuntu来配置dhcp和dns,这里updated了新的版本。2024.5

server端环境:

Win11+VMS:192.168.105.1+192.168.105.128

(ubuntu2310)

Win11+VMS(centos8)

关于配置DHCP

第一种、

安装dhcpd组件,从官方文档vendor不再支持isc-dhcp-server,虽然目前任然可以使用其作为dhcp server。官方推荐使用kea代替。

root@testhost01:~# dhcpd

Command 'dhcpd' not found, but can be installed with:

apt install isc-dhcp-server       # version 4.4.3-P1-2ubuntu5, or

apt install isc-dhcp-server-ldap  # version 4.4.3-P1-2ubuntu5

root@testhost01:~# apt install isc-dhcp-server

How to install and configure isc-dhcp-server

Note:

Although Ubuntu still supports isc-dhcp-server, this software is no longer supported by its vendor. It has been replaced by Kea.

In this guide we show how to install and configure isc-dhcp-server, which installs the dynamic host configuration protocol daemon, dhcpd. For isc-kea instructions, refer to this guide instead.

Install isc-dhcp-server

At a terminal prompt, enter the following command to install isc-dhcp-server:

sudo apt install isc-dhcp-server

Note:

You can find diagnostic messages from dhcpd in syslog.

Configure isc-dhcp-server

You will probably need to change the default configuration by editing /etc/dhcp/dhcpd.conf to suit your needs and particular configuration.

Most commonly, what you want to do is assign an IP address randomly. This can be done with /etc/dhcp/dhcpd.conf settings as follows:

# minimal sample /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
   
subnet 192.168.1.0 netmask 255.255.255.0 {
 range 192.168.1.150 192.168.1.200;
 option routers 192.168.1.254;
 option domain-name-servers 192.168.1.1, 192.168.1.2;
 option domain-name "mydomain.example";
}

This will result in the DHCP server giving clients an IP address from the range 192.168.1.150 - 192.168.1.200. It will lease an IP address for 600 seconds if the client doesn’t ask for a specific time frame. Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also “advise” the client to use 192.168.1.254 as the default-gateway and 192.168.1.1 and 192.168.1.2 as its DNS servers.

You also may need to edit /etc/default/isc-dhcp-server to specify the interfaces dhcpd should listen to.

INTERFACESv4="eth4"

After changing the config files you need to restart the dhcpd service:

sudo systemctl restart isc-dhcp-server.service

来自 <https://ubuntu.com/server/docs/how-to-install-and-configure-isc-dhcp-server>

第二种、使用kea

How to setup Kea DHCPv4 Server with Ubuntu 23.10

In this article I will show you how to install and configure Kea DHCPv4 server on Ubuntu 23.10. Kea DHCP server is the successor of ISC DHCP server which recently got obsolete and is no longer maintained by ISC consortium.

S1Install kea dhcpv4 server

sudo apt update

sudo apt install kea-dhcp4-server

S2rename /etc/kea/kea-dhcp4.conf to kea-dhcp4.conf.bak 

sudo mv /etc/kea/kea-dhcp4.conf /etc/kea/kea-dhcp4.conf.bak

S3Create a new, empty configfile by using your favorite texteditor

sudo nano /etc/kea/kea-dhcp4.conf 

S4Copy/paste the content below and adjust the italic options as required

{

“Dhcp4”: {

“interfaces-config”: {

  “interfaces”: [ “ethx” ],

        “dhcp-socket-type”: “raw”

    },

    

    “control-socket”: {

        “socket-type”: “unix”,

        “socket-name”: “/run/kea/kea4-ctrl-socket”

    },

    

“authoritative”: true,

    

“lease-database”: {

    “type”: “memfile”,

        “persist”: true,

        “name”: “/var/lib/kea/kea-leases4.csv”,

    “lfc-interval”: 3600

},

        

    “renew-timer”: 15840,

    “rebind-timer”: 27720,

    “valid-lifetime”: 31680,

    “reservation-mode”: “out-of-pool”,

    

    “dhcp-ddns”: {

       “enable-updates”: true

    },

     

    “ddns-qualifying-suffix”: “smoky020.nl“,

    “ddns-override-client-update”: true,

    “ddns-override-no-update”: true,

    “ddns-replace-client-name”: “always”,

    “ddns-update-on-renew”: true,

     

    “option-data”: [

    {

      “name”: “domain-name-servers”,

      “data”: “ip address

    },

    {        

        “name”: “domain-search”,

        “data”: “smoky020.nl

    },

    {

      “name”: “domain-name”,

      “data”: “smoky020.nl

    }

  ],

    

        “loggers”: [ {

        “name”: “kea-dhcp4”,

        “output_options”: [ {

            “output”: “stdout”

    } 

    ],

        “severity”: “DEBUG”,

        “debuglevel”: 0

    } 

    ],

    “subnet4”: [

  {

    “id”: 1,

    “subnet”: “subnet/24“,

    

    “option-data”: [

    {

      “name”: “routers”,

      “data”: “ip address

    }

    ],

   

        “pools”: [

      {

        “pool”: “ip start – ip end

      }

    ],

        

        “reservations”: [

        {

            “hw-address”: “mac address“,

            “ip-address”: “ip address“,

            “hostname”: “hostname

        },   

        {

            “hw-address”: “mac address“,

            “ip-address”: “ip address“,

            “hostname”: “hostname

        } 

        ]

     }

     ]

  }

}

S5Save the .conf and restart kea dhcp4 server

sudo systemctl restart kea-dhcp4-server

来自 <How to setup Kea DHCPv4 Server with Ubuntu 23.10 – smoky020.nl>

第三种、ubuntu官方推荐的安装指导

How to install and configure isc-kea

In this guide we show how to install and configure isc-kea in Ubuntu 23.04

or greater. Kea is the DHCP server developed by ISC to replace isc-dhcp. It is newer and designed for more modern network environments.

For isc-dhcp-server instructions, refer to this guide instead.

配置指南中告诉你如何在Ubuntu 23.04中安装和配置isc-kea或更大Kea是ISC开发的DHCP服务器,用于取代isc-dhcp。这次更新,专为更现代的网络环境而设计。

S1、安装isc-kea

At a terminal prompt, enter the following command to install isc-kea:

在终端提示符下,输入以下命令安装isc-kea:

sudo apt install kea

这也将安装一些二进制包,包括

  • kea-dhcp4-server: The IPv4 DHCP server (the one we will configure in this guide).
  • kea-dhcp6-server: The IPv6 DHCP server.
  • kea-ctrl-agent: A REST API service for Kea.
  • kea-dhcp-ddns-server: A Dynamic DNS service to update DNS based on DHCP lease events.

由于kea-ctrl-agent服务对Kea具有一些管理权限服务,我们需要确保不允许普通用户使用没有许可API。Ubuntu通过要求用户身份验证来访问kea-ctrl-agent API服务(LP:#2007312有更多关于此的详细信息)。

因此,上述安装过程将获得一个debconf“高”优先级提示,有3个选项:

  • no action (default);no action(默认);
  • configure with a random password; or  使用随机密码进行配置;或
  • configure with a given password.  使用给定的密码进行配置。

如果没有密码,kea-ctrl-agent将无法启动。

The password is expected to be in /etc/kea/kea-api-password, with ownership

root:_kea and permissions 0640. To change it, run dpkg-reconfigure kea-ctrl-agent

(which will present the same 3 options from above again), or just edit the file

manually.

密码应该在/etc/kea/kea-api-password中,root具有_kea的权限(0640)。若要更改它,请运行dpkg-reconfigure kea-ctrl-agent(这将再次呈现上面相同的3个选项),或者只是手工编辑文件

S2Configure kea-dhcp4

可以通过编辑/etc/kea/kea-dhcp4.conf 来配置kea-dhcp4服务。

Most commonly, what you want to do is let Kea assign an IP address from a

pre-configured IP address pool. This can be done with settings as follows:

最常用情况是,让Kea预配置IP地址池。这可以通过如下代码设置来完成:

{
  "Dhcp4": {
        "interfaces-config": {
          "interfaces": [ "eth4" ]
        },
        "control-socket": {
            "socket-type": "unix",
            "socket-name": "/run/kea/kea4-ctrl-socket"
        },
        "lease-database": {
            "type": "memfile",
            "lfc-interval": 3600
        },
        "valid-lifetime": 600,
        "max-valid-lifetime": 7200,
        "subnet4": [
          {
            "id": 1,
            "subnet": "192.168.1.0/24",
            "pools": [
              {
                "pool": "192.168.1.150 - 192.168.1.200"
              }
            ],
            "option-data": [
              {
                "name": "routers",
                "data": "192.168.1.254"
              },
              {
                "name": "domain-name-servers",
                "data": "192.168.1.1, 192.168.1.2"
              },
              {
                "name": "domain-name",
                "data": "mydomain.example"
              }
            ]
          }
        ]
  }
}

这里让DHCP服务器侦听接口"eth4",为客户端提供范围192.168.1.150 - 192.168.1.200中的IP地址。如果客户端没有要求特定的时间范围,它将租用一个IP地址600秒。否则,最大(允许的)租用时间将为7200秒。服务器还将"建议"客户端使用192.168.1.254作为默认网关,使用192.168.1.1和192.168.1.2作为其DNS服务器。

在更改配置文件后,您可以使用以下命令通过kea-shell重新加载服务器配置:

kea-shell --host 127.0.0.1 --port 8000 --auth-user kea-api --auth-password $(cat /etc/kea/kea-api-password) --service dhcp4 config-reload

然后,按下ctrl-d提交交互信息。服务器应响应:

[ { "result": 0, "text": "Configuration successful." } ]

这意味着您的配置已被服务器接收。

kea-dhcp4-server服务日志应包含类似于以下内容的条目:

DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS dynamic server reconfiguration succeeded with file: /etc/kea/kea-dhcp4.conf

这表示服务器已成功重新配置。

您可以使用kea-dhcp4-server读取journalctl服务日志:

journalctl -u kea-dhcp4-server

或者,不通过以下方式重新加载DHCP 4服务器配置kea-shell,您可以使用以下命令重新启动kea-dhcp4-service:

systemctl restart kea-dhcp4-server

来自 <https://ubuntu.com/server/docs/how-to-install-and-configure-isc-kea>

---第三部分是配置FTP/NFS相关的---

关于配置DNS

同样,这里直接copy来了ubuntu官方文档来让童鞋们参考。^V^

有任何看不懂的随时艾特我。

Domain Name Service (DNS)

Domain Name Service (DNS) is an Internet service that maps IP addresses and fully qualified domain names (FQDN) to one another. In this way, DNS alleviates the need to remember IP addresses. Computers that run DNS are called name servers. Ubuntu ships with the Berkley Internet Naming Daemon (BIND), the most common program used for maintaining a name server on Linux.

Install DNS

At a terminal prompt, run the following command to install the bind9 package:

sudo apt install bind9

A useful package for testing and troubleshooting DNS issues is the dnsutils package. Very often these tools will be installed already, but to check and/or install dnsutils enter the following:

sudo apt install dnsutils

DNS configuration overview

There are many ways to configure BIND9. Some of the most common configurations include a caching nameserver, primary server, and secondary server.

  • When configured as a caching nameserver, BIND9 will find the answer to name queries and remember the answer when the domain is queried again.
  • As a primary server, BIND9 reads the data for a zone from a file on its host, and is authoritative for that zone.
  • As a secondary server, BIND9 gets the zone data from another nameserver that is authoritative for the zone.

Configuration files

The DNS configuration files are stored in the /etc/bind directory. The primary configuration file is /etc/bind/named.conf, which in the layout provided by the package just includes these files:

  • /etc/bind/named.conf.options: Global DNS options
  • /etc/bind/named.conf.local: For your zones
  • /etc/bind/named.conf.default-zones: Default zones such as localhost, its reverse, and the root hints

The root nameservers used to be described in the file /etc/bind/db.root. This is now provided instead by the /usr/share/dns/root.hints file shipped with the dns-root-data package, and is referenced in the named.conf.default-zones configuration file above.

It is possible to configure the same server to be a caching name server, primary, and secondary: it all depends on the zones it is serving. A server can be the Start of Authority (SOA) for one zone, while providing secondary service for another zone. All the while providing caching services for hosts on the local LAN.

Set up a caching nameserver

The default configuration acts as a caching server. Simply uncomment and edit /etc/bind/named.conf.options to set the IP addresses of your ISP’s DNS servers:

forwarders {
    1.2.3.4;
    5.6.7.8;
};

Note:

Replace 1.2.3.4 and 5.6.7.8 with the IP addresses of actual nameservers.

To enable the new configuration, restart the DNS server. From a terminal prompt, run:

sudo systemctl restart bind9.service

See dig for information on testing a caching DNS server.

Set up a primary server

In this section BIND9 will be configured as the primary server for the domain example.com. You can replace example.com with your FQDN (Fully Qualified Domain Name).

Forward zone file

To add a DNS zone to BIND9, turning BIND9 into a primary server, first edit /etc/bind/named.conf.local:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
};

Note:

If BIND will be receiving automatic updates to the file as with DDNS, then use /var/lib/bind/db.example.com rather than /etc/bind/db.example.com both here and in the copy command below.

Now use an existing zone file as a template to create the /etc/bind/db.example.com file:

sudo cp /etc/bind/db.local /etc/bind/db.example.com

Edit the new zone file /etc/bind/db.example.com and change localhost. to the FQDN of your server, including the additional . at the end. Change 127.0.0.1 to the nameserver’s IP address and root.localhost to a valid email address, but with a . instead of the usual @ symbol, again including the . at the end. Change the comment to indicate the domain that this file is for.

Create an A record for the base domain, example.com. Also, create an A record for ns.example.com, the name server in this example:

;
; BIND data file for example.com
;
$TTL    604800
@       IN      SOA     example.com. root.example.com. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL

@       IN      NS      ns.example.com.
@       IN      A       192.168.1.10
@       IN      AAAA    ::1
ns      IN      A       192.168.1.10

You must increment the Serial Number every time you make changes to the zone file. If you make multiple changes before restarting BIND9, only increment Serial once.

Now, you can add DNS records to the bottom of the zone file. See Common Record Types for details.

Note:

Many admins like to use the “last edited” date as the Serial of a zone, such as 2020012100 which is yyyymmddss (where ss is the Serial Number)

Once you have made changes to the zone file, BIND9 needs to be restarted for the changes to take effect:

sudo systemctl restart bind9.service

Reverse zone file

Now that the zone is set up and resolving names to IP Addresses, a reverse zone needs to be added to allows DNS to resolve an address to a name.

Edit /etc/bind/named.conf.local and add the following:

zone "1.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/db.192";
};

Note:

Replace 1.168.192 with the first three octets of whatever network you are using. Also, name the zone file /etc/bind/db.192 appropriately. It should match the first octet of your network.

Now create the /etc/bind/db.192 file:

sudo cp /etc/bind/db.127 /etc/bind/db.192

Next edit /etc/bind/db.192, changing the same options as /etc/bind/db.example.com:

;
; BIND reverse data file for local 192.168.1.XXX net
;
$TTL    604800
@       IN      SOA     ns.example.com. root.example.com. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
10      IN      PTR     ns.example.com.

The Serial Number in the reverse zone needs to be incremented on each change as well. For each A record you configure in /etc/bind/db.example.com that is for a different address, you will need to create a PTR record in /etc/bind/db.192.

After creating the reverse zone file restart BIND9:

sudo systemctl restart bind9.service

Set up a secondary server

Once a primary server has been configured, a secondary server is highly recommended. This will maintain the availability of the domain if the primary becomes unavailable.

First, on the primary server, the zone transfer needs to be allowed. Add the allow-transfer option to the example Forward and Reverse zone definitions in /etc/bind/named.conf.local:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
    allow-transfer { 192.168.1.11; };
};
   
zone "1.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/db.192";
    allow-transfer { 192.168.1.11; };
};

Note:

Replace 192.168.1.11 with the IP address of your secondary nameserver.

Restart BIND9 on the primary server:

sudo systemctl restart bind9.service

Next, on the secondary server, install the bind9 package the same way as on the primary. Then edit the /etc/bind/named.conf.local and add the following declarations for the Forward and Reverse zones:

zone "example.com" {
    type secondary;
    file "db.example.com";
    masters { 192.168.1.10; };
};       
         
zone "1.168.192.in-addr.arpa" {
    type secondary;
    file "db.192";
    masters { 192.168.1.10; };
};

Once again, replace 192.168.1.10 with the IP address of your primary nameserver, then restart BIND9 on the secondary server:

sudo systemctl restart bind9.service

In /var/log/syslog you should see something similar to the following (some lines have been split to fit the format of this document):

client 192.168.1.10#39448: received notify for zone '1.168.192.in-addr.arpa'
zone 1.168.192.in-addr.arpa/IN: Transfer started.
transfer of '100.18.172.in-addr.arpa/IN' from 192.168.1.10#53:
 connected using 192.168.1.11#37531
zone 1.168.192.in-addr.arpa/IN: transferred serial 5
transfer of '100.18.172.in-addr.arpa/IN' from 192.168.1.10#53:
 Transfer completed: 1 messages,
6 records, 212 bytes, 0.002 secs (106000 bytes/sec)
zone 1.168.192.in-addr.arpa/IN: sending notifies (serial 5)
   
client 192.168.1.10#20329: received notify for zone 'example.com'
zone example.com/IN: Transfer started.
transfer of 'example.com/IN' from 192.168.1.10#53: connected using 192.168.1.11#38577
zone example.com/IN: transferred serial 5
transfer of 'example.com/IN' from 192.168.1.10#53: Transfer completed: 1 messages,
8 records, 225 bytes, 0.002 secs (112500 bytes/sec)

Note:

A zone is only transferred if the Serial Number on the primary is larger than the one on the secondary. If you want to have your primary DNS notify other secondary DNS servers of zone changes, you can add also-notify { ipaddress; }; to /etc/bind/named.conf.local as shown in the example below:

zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
    allow-transfer { 192.168.1.11; };
    also-notify { 192.168.1.11; };
};

zone "1.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/db.192";
    allow-transfer { 192.168.1.11; };
    also-notify { 192.168.1.11; };
};
   

Note:

The default directory for non-authoritative zone files is /var/cache/bind/. This directory is also configured in AppArmor to allow the named daemon to write to it. See this page for more information on AppArmor.

Testing your setup

resolv.conf

The first step in testing BIND9 is to add the nameserver’s IP address to a hosts resolver. The Primary nameserver should be configured as well as another host to double check things. Refer to DNS client configuration for details on adding nameserver addresses to your network clients. In the end your nameserver line in /etc/resolv.conf should be pointing at 127.0.0.53 and you should have a search parameter for your domain. Something like this:

nameserver  127.0.0.53
search example.com

To check which DNS server your local resolver is using, run:

resolvectl status

Note:

You should also add the IP address of the secondary nameserver to your client configuration in case the primary becomes unavailable.

dig

If you installed the dnsutils package you can test your setup using the DNS lookup utility dig:

After installing BIND9 use dig against the loopback interface to make sure it is listening on port 53. From a terminal prompt:

dig -x 127.0.0.1

You should see lines similar to the following in the command output:

;; Query time: 1 msec
;; SERVER: 192.168.1.10#53(192.168.1.10)

If you have configured BIND9 as a caching nameserver, “dig” an outside domain to check the query time:

dig ubuntu.com

Note the query time toward the end of the command output:

;; Query time: 49 msec

After a second dig there should be improvement:

;; Query time: 1 msec

ping

Now let’s demonstrate how applications make use of DNS to resolve a host name, by using the ping utility to send an ICMP echo request:

ping example.com

This tests if the nameserver can resolve the name ns.example.com to an IP address. The command output should resemble:

PING ns.example.com (192.168.1.10) 56(84) bytes of data.
64 bytes from 192.168.1.10: icmp_seq=1 ttl=64 time=0.800 ms
64 bytes from 192.168.1.10: icmp_seq=2 ttl=64 time=0.813 ms

named-checkzone

A great way to test your zone files is by using the named-checkzone utility installed with the bind9 package. This utility allows you to make sure the configuration is correct before restarting BIND9 and making the changes live.

To test our example forward zone file, enter the following from a command prompt:

named-checkzone example.com /etc/bind/db.example.com

If everything is configured correctly you should see output similar to:

zone example.com/IN: loaded serial 6
OK

Similarly, to test the reverse zone file enter the following:

named-checkzone 1.168.192.in-addr.arpa /etc/bind/db.192

The output should be similar to:

zone 1.168.192.in-addr.arpa/IN: loaded serial 3
OK

Note:

The Serial Number of your zone file will probably be different.

Quick temporary query logging

With the rndc tool, you can quickly turn query logging on and off, without restarting the service or changing the configuration file.

To turn query logging on, run:

sudo rndc querylog on

Likewise, to turn it off, run:

sudo rndc querylog off

The logs will be sent to syslog and will show up in /var/log/syslog by default:

Jan 20 19:40:50 new-n1 named[816]: received control channel command 'querylog on'
Jan 20 19:40:50 new-n1 named[816]: query logging is now on
Jan 20 19:40:57 new-n1 named[816]: client @0x7f48ec101480 192.168.1.10#36139 (ubuntu.com): query: ubuntu.com IN A +E(0)K (192.168.1.10)

Note:

The amount of logs generated by enabling querylog could be huge!

Logging

BIND9 has a wide variety of logging configuration options available, but the two main ones are channel and category, which configure where logs go, and what information gets logged, respectively.

If no logging options are configured the default configuration is:

logging {
     category default { default_syslog; default_debug; };
     category unmatched { null; };
};

Let’s instead configure BIND9 to send debug messages related to DNS queries to a separate file.

We need to configure a channel to specify which file to send the messages to, and a category. In this example, the category will log all queries. Edit /etc/bind/named.conf.local and add the following:

logging {
    channel query.log {
        file "/var/log/named/query.log";
        severity debug 3;
    };
    category queries { query.log; };
};

Note:

The debug option can be set from 1 to 3. If a level isn’t specified, level 1 is the default.

Since the named daemon runs as the bind user, the /var/log/named directory must be created and the ownership changed:

sudo mkdir /var/log/named
sudo chown bind:bind /var/log/named

Now restart BIND9 for the changes to take effect:

sudo systemctl restart bind9.service

You should see the file /var/log/named/query.log fill with query information. This is a simple example of the BIND9 logging options. For coverage of advanced options see the “Further Reading” section at the bottom of this page.

Common record types

This section covers some of the most common DNS record types.

  • A record
    This record maps an IP address to a hostname.
    www      IN    A      192.168.1.12
  • CNAME record
    Used to create an alias to an existing A record. You cannot create a CNAME record pointing to another CNAME record.
    web     IN    CNAME  www
  • MX record
    Used to define where emails should be sent to. Must point to an A record, not a CNAME.
    @       IN    MX  1   mail.example.com.
    mail    IN    A       192.168.1.13
  • NS record
    Used to define which servers serve copies of a zone. It must point to an A record, not a CNAME. This is where primary and secondary servers are defined.
    @       IN    NS     ns.example.com.
    @       IN    NS     ns2.example.com.
    ns      IN    A      192.168.1.10
    ns2     IN    A      192.168.1.11

来自 <https://ubuntu.com/server/docs/domain-name-service-dns>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1645706.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

AI热潮开始退去,财务压力迫使多家硅谷明星初创公司选择退出

曾风光无限的Stability AI已重组并削减业务规模&#xff0c;Inflection AI更是关闭业务并基本并入微软。 5月4日消息&#xff0c;国外媒体日前撰文指出&#xff0c;人工智能的热潮已开始逐渐褪去。初创公司想要同微软、谷歌等科技巨头在人工智能领域一决高下&#xff0c;门槛已…

Spring IoCDI(2)—IoC详解

目录 一、IoC详解 1、Bean的存储 &#xff08;1&#xff09;Controller&#xff08;控制器存储&#xff09; 获取bean对象的其他方式 Bean 命名约定 &#xff08;2&#xff09;Service&#xff08;服务存储&#xff09; &#xff08;3&#xff09;Repository&#xff08…

SPA模式下的多页面跳转原理及实现——jQuery Mobile为例

jQuery Mobile在SPA模式下的多页面跳转原理及实现案例 文章目录 jQuery Mobile在SPA模式下的多页面跳转原理及实现案例前言一、SPA的实现原理和代码分析1.实现原理说明&#xff08;1&#xff09;index.html&#xff08;2&#xff09;index.js&#xff08;3&#xff09;page2.ht…

kafka日志存储

前言 kafka的主题(topic)可以对应多个分区(partition)&#xff0c;而每个分区(partition)可以有多个副本(replica)&#xff0c;我们提生产工单创建topic的时候也是要预设这些参数的。但是它究竟是如何存储的呢&#xff1f;我们在使用kafka发送消息时&#xff0c;实际表现是提交…

一款开源高性能AI应用框架

前言 LobeChat 是一个基于 Next.js 框架构建的 AI 会话应用&#xff0c;旨在提供一个 AI 生产力平台&#xff0c;使用户能够与 AI 进行自然语言交互。 LobeChat应用架构 LobeChat 的整体架构由前端、EdgeRuntime API、Agents 市场、插件市场和独立插件组成。这些组件相互协作&a…

38-1 防火墙了解

一、防火墙的概念: 防火墙(Firewall),也称防护墙,是由Check Point创立者Gil Shwed于1993年发明并引入国际互联网(US5606668 [A]1993-12-15)。它是一种位于内部网络与外部网络之间的网络安全系统,是一项信息安全的防护系统,依照特定的规则,允许或是限制传输的数据通过。…

4个可将 iPhone iPad iPod 修复至正常状态的 iOS 系统恢复软件

许多iOS用户对操作系统问题感到恐慌&#xff0c;例如iPhone卡在恢复模式、白屏死机、黑屏死机、iOS系统损坏、iTunes连接屏幕、iPhone数据丢失等。这些状态通常很无聊&#xff0c;因为您无法使用 iPhone 执行任何操作。 4个可将 iPhone iPad iPod 修复至正常状态的 iOS 系统恢复…

【Unity 组件思想-预制体】

【Unity 组件思想-预制体】 预制体&#xff08;Prefab&#xff09;是Unity中一种特殊的组件 特点和用途&#xff1a; 重用性&#xff1a; 预制体允许开发者创建可重复使用的自定义游戏对象。这意味着你可以创建一个预制体&#xff0c;然后在场景中多次实例化它&#xff0c;…

sip转webrtc方案

技术选型 由于很多企业会议协议用的主要是webrtc&#xff0c;但是项目上很多时候的一些旧设备只支持sip协议&#xff0c;并不支持webrtc协议。所以sip和webrtc的相互转换就很有必要。 流媒体服务mediasoup本身并不支持sip协议。那么如何实现sip转webrtc呢&#xff1f; 根据调研…

我独自升级崛起下载教程 我独自升级崛起怎么一键下载

定于5月8日全球盛大发布的动作RPG力作《我独自升级崛起》&#xff0c;基于备受追捧的同名动画及网络漫画&#xff0c;誓为热情洋溢的游戏爱好者们呈献一场深度与广度兼具的冒险盛宴。这款游戏巧妙融合网络武侠元素&#xff0c;其创意十足的设计框架下&#xff0c;核心叙述聚焦于…

[极客大挑战 2019]PHP

1.通过目录扫描找到它的备份文件&#xff0c;这里的备份文件是它的源码。 2.源码当中涉及到的关键点就是魔术函数以及序列化与反序列化。 我们提交的select参数会被进行反序列化&#xff0c;我们要构造符合输出flag条件的序列化数据。 但是&#xff0c;这里要注意的就是我们提…

力扣每日一题109:有序链表转换二叉搜索树

题目 中等 给定一个单链表的头节点 head &#xff0c;其中的元素 按升序排序 &#xff0c;将其转换为 平衡 二叉搜索树。 示例 1: 输入: head [-10,-3,0,5,9] 输出: [0,-3,9,-10,null,5] 解释: 一个可能的答案是[0&#xff0c;-3,9&#xff0c;-10,null,5]&#xff0c;它…

video标签,如何隐藏右下角三个点包含的功能?

// nodownload: 不要下载 // nofullscreen: 不要全屏 // noremoteplayback: 不要远程回放 // disablePictureInPicture: 不要画中画 <videocontrols disablePictureInPicture"true"controlslist"nodownload nofullscreen noremoteplayback" > </v…

Java基础教程 - 5 数组

更好的阅读体验&#xff1a;点这里 &#xff08; www.doubibiji.com &#xff09; 更好的阅读体验&#xff1a;点这里 &#xff08; www.doubibiji.com &#xff09; 更好的阅读体验&#xff1a;点这里 &#xff08; www.doubibiji.com &#xff09; 5 数组 前面我们保存数据…

Java毕设之学院党员管理系统的设计与实现

运行环境 环境说明: 开发语言:java 框架:springboot&#xff0c;vue JDK版本:JDK1.8 数据库:mysql5.7(推荐5.7&#xff0c;8.0也可以) 数据库工具:Navicat11 开发软件:idea/eclipse(推荐idea) Maven包:Maven3.3.9 系统实现 管理员功能实现 党员管理 管理员进入指定功能操作…

AI 不仅会画画,还能造车 | 最新快讯

本周的北京&#xff0c;正在上演一场深刻的变革。 汽车产业&#xff0c;这个曾经以工业制造为核心的行业&#xff0c;正迅速地被数字化浪潮所改变&#xff0c;汽车、电商、互联网、人工智能等领域的界限变得模糊。在这样的背景下&#xff0c;车企们纷纷开始打破传统&#xff0c…

【AI】深度学习框架的期望与现实 机器学习编译尚未兑现其早期的一些承诺……

深度学习框架的期望与现实 机器学习编译尚未兑现其早期的一些承诺…… 来自&#xff1a;Axelera AI 资深软件工程师 Matthew Barrett 原帖是linkedin帖子&#xff1a; https://linkedin.com/posts/matthew-barrett-a49929177_i-think-its-fair-to-say-that-ml-compilation-ac…

【driver2】设备读写,同步和互斥,ioctl,进程休眠,时间和延时,延缓

文章目录 1.实现设备读写&#xff1a;write函数中一个进程写没问题&#xff0c;两进程写&#xff1a;第一个进程运行到kzalloc时&#xff0c;第二个进程也执行了kzalloc&#xff0c;只第二个进程地址保存在c中&#xff0c;第一个进程分配内存空间地址丢失造成内存泄漏。第一个进…

【Three.js基础学习】14.Galaxy Generator

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 前言 课程知识点 1. 实现星际编辑器 2. 创建粒子 1000&#xff0c; 在随机位置 3. 创建材质 PointsMaterial 4. Points() 接收 5. 放到gui 中调试 但是会发现调整size 等 属…

4.任务创建和删除的API函数

一、简介 二、动态创建任务函数:xTaskCreate() 此函数用于使用动态的方式创建任务&#xff0c;任务的任务控制块以及任务的栈空间所需的内存&#xff0c;均由 FreeRTOS 从 FreeRTOS 管理的堆中分配&#xff0c;若使用此函数&#xff0c;需要在 FreeRTOSConfig.h 文件 中将宏 c…