Sy9-dhcp/dns服务配置

前言、

课程需要(进入服务器综合配置使用阶段了),这里还是沿用桌面版的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.mfbz.cn/a/596090.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

SEED-X:多模态智能助手

SEED-X&#xff1a;多模态智能助手 SEED-X 是一个多模态智能助手&#xff0c;已经将所有的模型和代码开源了&#xff01;它是一个统一且多用途的多模态基础模型&#xff0c;最新开放了图像编辑模型。 相较于传统的多模态交互框架&#xff0c;SEED-X 具有以下优点&#xff1a;…

OpenHarmony实战开发-如何使用Web组件加载页面

页面加载是Web组件的基本功能。根据页面加载数据来源可以分为三种常用场景&#xff0c;包括加载网络页面、加载本地页面、加载HTML格式的富文本数据。 页面加载过程中&#xff0c;若涉及网络资源获取&#xff0c;需要配置ohos.permission.INTERNET网络访问权限。 加载网络页面…

bugku-mathEnglish

拿到题目得到一串数学题&#xff0c;解出答案得 发现答案全都是1-5的数字&#xff0c;联想到英语中的元音密码解码字典 参照表中字母和前面解出的对应数字&#xff0c;得到flagyuanyinpwd&#xff0c;按格式提交解出题目答案

大模型_基于医疗领域用lora微调ChatDoctor模型

文章目录 ChatDoctor目标方法结果结论收集和准备医患对话数据集创建外部知识数据库具有知识大脑的自主聊天医生的开发模型培训结果数据和模型&#xff1a; 微调推理 ChatDoctor 目标 这项研究的主要目的是通过创建一个在医学建议中具有更高准确性的专业语言模型&#xff0c;来…

创新指南|非凡时代的变革型领导力——五个领导力差异化优势将使高管能够重塑他们的组织

大多数商界领袖现在都明白&#xff0c;我们正在经历一场“伟大的重构”&#xff0c;整个行业、经济和社会都在重塑的时期。然而&#xff0c;考虑到他们面临的短期压力&#xff0c;很少有高管发现自己能够真正应对这些变化&#xff0c;这些变化对他们的组织所需的转型意味着什么…

【Mac】 DSync for mac(文件比较同步工具) v2.7安装教程

软件介绍 DSync是一款文件比较同步工具&#xff0c;通过简便的三步即可完成繁琐的比较、同步操作&#xff0c;您甚至可以通过跳过、删除或反转您选择的文件的复制方向来微调您的同步。这是在Mac上同步文件的最简单方法。 安装教程 1.打开安装包&#xff0c;将「DSync」拖到右…

Merck:mPAGE® Lux SDS-PAGE制胶系统

相对于传统SDS-PAGE制胶工艺&#xff0c;Merck公司的mPAGE Lux制胶系统是一种更快速、简单、安全的替代方法&#xff0c;可实现更具可重现性的结果。mPAGE Lux制胶系统可在90秒内完成小型凝胶固化&#xff0c;而传统方法则需要90分钟以上。该系统采用紫外线照射快速制胶工作流程…

打破 AI 算力天花板,Meta超大规模AI基础设施架构解读

Meta超大规模AI智算基础设施架构设计 摘要 双重 GPU 集群&#xff0c;每群配备 2.4 万个 H100 芯片&#xff0c;分别采用 RoCE 和 InfiniBand 网络连接。LLaMA3 就是在这两个集群上训练出来的&#xff1b;Meta AI 将部署庞大算力集群&#xff0c;拥有 35 万张 H100 GPU&#x…

【字符串】Leetcode 43. 字符串相乘

题目讲解 43. 字符串相乘 算法讲解 class Solution { public:void AddZero(string& temp, int cnt) {while (cnt--) {temp 0;} }string Add(string num1, string num2) {string result;int carry 0;int i num1.size() - 1;int j num2.size() - 1;while (i > 0 ||…

Python学习笔记------处理数据和生成折线图

给定数据&#xff1a; jsonp_1629344292311_69436({"status":0,"msg":"success","data":[{"name":"美国","trend":{"updateDate":["2.22","2.23","2.24",&qu…

select,poll,epoll

在 Linux Socket 服务器短编程时&#xff0c;为了处理大量客户的连接请求&#xff0c;需要使用非阻塞I/O和复用&#xff0c;select&#xff0c;poll 和 epoll 是 Linux API 提供的I/O复用方式。 \selectpollepoll操作方式遍历遍历回调底层实现数组链表哈希表IO效率每次调用都进…

Vue-router使用(配置路径、路由跳转、相关API、多级路由、路由守卫,两种工作模式)

Vue-router使用(配置路径、路由跳转、相关API、多级路由、路由守卫&#xff0c;两种工作模式) 目录 Vue-router使用(配置路径、路由跳转、相关API、多级路由、路由守卫&#xff0c;两种工作模式)安装配置路径路由跳转不携带参数跳转携带参数跳转?形式携带参数地址中直接携带参…

如何设置ddns动态域名服务实现外网访问

在本地搭建好服务器&#xff0c;部署好web网站或其他应用后&#xff0c;需要在外网访问内网时&#xff0c;如何设置动态域名服务ddns&#xff0c;将主机的内网IP端口映射到外网访问&#xff0c;是我们需要面对的一个重要步骤。 内网发布外网&#xff0c;常见的有两种方案&…

KAN:Kolmogorov–Arnold Networks

KAN: Kolmogorov–Arnold Networks 论文链接&#xff1a;https://arxiv.org/abs/2404.19756 代码链接&#xff1a;https://github.com/KindXiaoming/pykan 项目链接&#xff1a;https://kindxiaoming.github.io/pykan/intro.html Abstract 受Kolmogorov-Arnold表示定理的启…

FX95GT FX505GT windows 11 触摸板安装

FX95GT FX505GT windows 11 触摸板驱动安装 如果正常使用 exe 文件安装不上&#xff0c;请在 ‘设置’ 》 ‘系统信息 ’》 驱动下载地址 如果正常使用 exe 文件安装不上&#xff0c;请在 ‘设置’ 》 ‘系统信息 ’》 高级系统设置 设备管理 在电脑上点右键&#xff0c;选择…

光端机(2)——光纤通信学习笔记九

学习笔记里面只关注基本原理和概念&#xff0c;复杂的公式和推导都没有涉及 光端机 光发射机 作用&#xff1a;实现电光转换。将来自电端机的电信号对光源发出的光波进行调制&#xff0c;然后将调制好的光信号耦合到光线中传输。 基本性能要求 1.合适的发光波长&#xff08;光…

SCI一区 | WOA-BiTCN-BiGRU-Attention多输入单输出回归预测(Matlab)

SCI一区 | WOA-BiTCN-BiGRU-Attention多输入单输出回归预测&#xff08;Matlab&#xff09; 目录 SCI一区 | WOA-BiTCN-BiGRU-Attention多输入单输出回归预测&#xff08;Matlab&#xff09;效果一览基本介绍程序设计参考资料 效果一览 基本介绍 1.Matlab实现WOA-BiTCN-BiGRU-A…

Transformer - 编码器和解码器中的QKV分别来自哪

Transformer - 编码器和解码器中的QKV分别来自哪 flyfish Transformer - 注意⼒机制 Scaled Dot-Product Attention 计算过程 Transformer - 注意⼒机制 代码实现 Transformer - 注意⼒机制 Scaled Dot-Product Attention不同的代码比较 Transformer - 注意⼒机制 代码解释 Tr…

论文架构介绍

论文架构 背景&#xff1a;建议2段左右完成&#xff0c;字数控制在500左右为佳&#xff0c;对应子题目1过渡段&#xff1a;写150字左右的过渡段&#xff0c;承上启下&#xff0c;回答部分子题目2、3的要求正文实践部分&#xff1a;一般3-7个论点&#xff0c;根据题目的要求来看…

电机控制器电路板布局布线参考指导(七)电流检测模块布局布线

电机控制器电路板布局布线参考指导&#xff08;七&#xff09;电流检测模块布局布线 1.高侧电流检测2.低侧电流监测3.两相和三相电流检测4.关键元器件选型要求5.布局6.布线7.工具设置8.输入和输出滤波9.注意事项 很多电机驱动器产品系列包括内置了电流感测功能的器件&#xff0…
最新文章