计算机使用智能体分类English
R03.04.01.04 · 任务小类

服务器与服务配置

Server & service configuration

Configure web servers, mail, certificates and VMs on a bare host.

20 条本项目编写的提案 · 分类 v1.1 · 新增基准运行 0 次。下方验证方式与部分得分规则是设计,不是执行结果。

典型应用
nginx · postfix · OpenSSL · QEMU
小类 GUI 需求标签
CL · CLI 足够

任务提案 · 20

展开查看完整原文与建议检查方式;两种界面均保留提案英文原文。

R03.04.01.04-T01 nginx static site with gzip and cache headers

原始指令

On a fresh Ubuntu VM, serve the files in /srv/site on nginx port 80. Enable gzip for text/css and application/javascript, set Cache-Control: max-age=604800 for *.css and *.js, and return a custom 404 from /srv/site/404.html. Reload without downtime.

平台
lin · Linux
应用
nginx
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
2 / 5

建议验证方式

curl -I of a .css asset shows Content-Encoding: gzip and Cache-Control max-age=604800; GET /missing returns 404 with the custom body; nginx -t exits 0 and master PID unchanged after reload.

建议部分得分

40% site served on :80; 30% gzip+cache headers correct; 30% custom 404 + graceful reload

R03.04.01.04-T02 nginx reverse proxy with TLS termination

原始指令

A backend app listens on 127.0.0.1:3000. Configure nginx as an HTTPS reverse proxy on :443 using fixtures/server.crt and fixtures/server.key, redirect :80 to :443, set X-Forwarded-Proto and Host upstream headers, and enable HTTP/2. Keep the backend unreachable from outside.

平台
lin · Linux
应用
nginx · OpenSSL
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

openssl s_client to :443 negotiates h2 and the configured cert; curl http://host 301-redirects to https; upstream receives X-Forwarded-Proto=https; :3000 refused from a non-loopback address.

建议部分得分

30% TLS on :443 with correct cert; 25% HTTP/2; 25% forwarded headers; 20% 80->443 redirect + backend firewalled

R03.04.01.04-T03 nginx rate limiting and request logging

原始指令

Protect /api/ on an existing nginx site: limit each client IP to 10 req/s with burst 20 (nodelay), return 429 on excess, and log to /var/log/nginx/api.log in a custom log_format including $request_time and $limit_req_status. Leave other locations unthrottled.

平台
lin · Linux
应用
nginx
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

A scripted burst of 50 req to /api/ yields some 429s and all 200s elsewhere; api.log lines match the custom format and contain $request_time; limit_req_zone present in config; nginx -t exits 0.

建议部分得分

40% limit_req zone+rule active with 429; 35% custom log_format fields; 25% other locations unaffected

R03.04.01.04-T04 Apache virtual hosts with rewrite rules

原始指令

On a host with Apache2, configure two name-based vhosts: shop.test (docroot /var/www/shop) and blog.test (docroot /var/www/blog). On blog.test, 301-rewrite /old/(.*) to /new/$1 and force trailing slashes on directory URLs. Enable only the modules you need.

平台
lin · Linux
应用
Apache
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

Host-header requests resolve each docroot; GET blog.test/old/x returns 301 to /new/x; apachectl -S lists both vhosts; mod_rewrite enabled; apachectl configtest = Syntax OK.

建议部分得分

40% both vhosts resolve; 35% rewrite 301 correct; 25% trailing-slash + minimal modules

R03.04.01.04-T05 Caddy automatic HTTPS with internal CA

原始指令

Write a Caddyfile serving app.localhost as a reverse proxy to 127.0.0.1:8080 using Caddy's internal CA (tls internal), add a /healthz endpoint that returns 200 'ok', and compress responses. Install so it starts on boot via its systemd unit.

平台
lin · Linux
应用
Caddy
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

caddy validate passes; https://app.localhost serves the proxy with a cert from Caddy's local CA; /healthz returns 200 'ok'; systemctl is-enabled caddy = enabled.

建议部分得分

35% reverse proxy over TLS internal; 30% healthz; 20% compression; 15% boot-enabled unit

R03.04.01.04-T06 Postfix + Dovecot virtual mailbox server (sandbox)

原始指令

On an isolated test VM, stand up Postfix (SMTP) + Dovecot (IMAP) for the test domain mail.lab serving two virtual users from fixtures/vmailboxes.cf. Enable submission on 587 with STARTTLS using fixtures/mail.crt/key and Maildir delivery. Use only loopback/lab network; no external relay.

平台
lin · Linux
应用
postfix · Dovecot
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
5 / 5

建议验证方式

swaks to :587 with STARTTLS delivers to a virtual user's Maildir; IMAP login retrieves the message; postconf shows virtual_mailbox_domains=mail.lab; relayhost empty and open-relay test from a lab client is rejected.

建议部分得分

30% SMTP accepts+delivers to Maildir; 30% IMAP retrieval; 25% 587 STARTTLS; 15% no open relay

R03.04.01.04-T07 Postfix relay with TLS and header rewriting

原始指令

Configure Postfix on relay.lab to relay only for 10.0.0.0/24, enforce opportunistic outbound TLS (smtp_tls_security_level=may), rewrite the envelope sender domain internal.lab to corp.lab via sender_canonical, and cap message size to 25 MB. Reject mail from other networks.

平台
lin · Linux
应用
postfix
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
4 / 5

建议验证方式

postconf shows mynetworks limited to 10.0.0.0/24, message_size_limit=26214400, smtp_tls_security_level=may; a test send rewrites sender to @corp.lab (Maildir headers); submission from outside the network is rejected with 554.

建议部分得分

35% relay restricted to subnet; 30% sender canonical rewrite; 20% TLS level; 15% size cap

R03.04.01.04-T08 OpenSSL self-signed cert with SAN and key perms

原始指令

Generate a 2048-bit RSA key and a self-signed X.509 cert for CN=web.lab valid 365 days with subjectAltName DNS:web.lab,DNS:www.web.lab,IP:10.0.0.5. Write key to /etc/ssl/private/web.lab.key (0600, root:root) and cert to /etc/ssl/certs/web.lab.crt (0644). Verify the cert.

平台
lin · Linux
应用
OpenSSL
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
2 / 5

建议验证方式

openssl x509 -text shows CN=web.lab, the three SANs, 365-day validity, RSA 2048; stat shows key 0600 root:root and cert 0644; openssl verify (self) succeeds.

建议部分得分

40% valid cert with correct CN+validity; 35% all three SANs; 25% file modes/owners

R03.04.01.04-T09 Build a two-tier CA and issue a server cert

原始指令

Using OpenSSL, create a root CA and an intermediate CA (pathlen:0), then issue a server cert for api.lab signed by the intermediate with EKU serverAuth and SAN DNS:api.lab. Produce fullchain.pem (server+intermediate) and verify it chains to the root.

平台
lin · Linux
应用
OpenSSL
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
4 / 5

建议验证方式

openssl verify -CAfile root.pem -untrusted intermediate.pem server.crt = OK; server cert has EKU serverAuth and SAN api.lab; intermediate has CA:TRUE pathlen:0; fullchain.pem contains server then intermediate in order.

建议部分得分

30% root+intermediate with correct constraints; 35% server cert signed by intermediate; 20% EKU+SAN; 15% verified fullchain

R03.04.01.04-T10 Issue a cert from a local ACME CA (step-ca)

原始指令

A smallstep step-ca ACME endpoint runs at https://ca.lab:9000/acme/acme/directory in the lab. Configure the host's ACME client to obtain a cert for svc.lab via HTTP-01, install it for nginx on :443, and set up automatic renewal via a systemd timer. No public internet.

平台
lin · Linux
应用
OpenSSL · nginx
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
4 / 5

建议验证方式

nginx on :443 serves a cert issued by the step-ca intermediate (openssl s_client issuer check); the ACME account+order succeeded (client state); a renewal systemd timer exists and a dry-run renew succeeds.

建议部分得分

40% cert issued via ACME HTTP-01; 35% installed+served on :443; 25% renewal timer works

R03.04.01.04-T11 QEMU Alpine VM with SSH networking

原始指令

Boot an Alpine image in QEMU (user-mode networking) with 1 GB RAM, forward host port 2222 to guest 22, and enable SSH for a test user with fixtures/id_test.pub. The VM must come up headless and accept key-based SSH from the host.

平台
lin · Linux
应用
QEMU
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

ssh -p 2222 -i fixtures/id_test localhost uname -a succeeds non-interactively; the qemu process shows hostfwd=tcp::2222-:22 and 1024M RAM; password SSH disabled (key only).

建议部分得分

40% VM boots headless; 35% port-forwarded key SSH works; 25% RAM+key-only policy

R03.04.01.04-T12 QEMU VM with telnet serial console

原始指令

Start a QEMU Linux VM exposing its serial console over a telnet socket on 127.0.0.1:4555 (server,nowait), with no graphical display, so an operator can drive the boot and login over the console. Confirm the login prompt is reachable over telnet.

平台
lin · Linux
应用
QEMU
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

A scripted telnet to 127.0.0.1:4555 receives kernel boot output and a login: prompt; qemu invocation contains -serial telnet:127.0.0.1:4555,server,nowait and -nographic/-display none.

建议部分得分

50% VM boots to a reachable serial login over telnet; 30% correct serial redirection flags; 20% headless

R03.04.01.04-T13 systemd service with socket activation and hardening

原始指令

Package the binary /opt/echo/echod as a socket-activated systemd service: a echod.socket listening on TCP 7000 and echod.service started on first connection, running as a dynamic user with ProtectSystem=strict and NoNewPrivileges. Enable both units.

平台
lin · Linux
应用
systemd
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
4 / 5

建议验证方式

systemd-analyze verify passes both units; connecting to :7000 cold-starts echod.service (journal shows socket activation); systemctl show reports DynamicUser=yes, NoNewPrivileges=yes, ProtectSystem=strict; both units enabled.

建议部分得分

35% socket+service units valid; 30% activation on connect; 35% hardening directives set

R03.04.01.04-T14 HAProxy L7 load balancer with health checks

原始指令

Configure HAProxy to load-balance https frontend :443 (terminate TLS with fixtures/lb.pem) across backends 10.0.0.11:8080 and 10.0.0.12:8080 using round-robin with HTTP health checks on /healthz, draining an unhealthy backend. Expose the stats page on :8404 (admin:fixtures password).

平台
lin · Linux
应用
HAProxy
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
5 / 5

建议验证方式

haproxy -c -f cfg = valid; repeated requests alternate backends; when one /healthz returns 500 it is marked DOWN on the stats page and traffic shifts; :443 serves the lb.pem cert.

建议部分得分

35% TLS frontend + 2 backends round-robin; 35% health check drains unhealthy; 30% stats page auth

R03.04.01.04-T15 Authoritative DNS zone with BIND

原始指令

Configure BIND9 as authoritative for zone corp.lab: A records for www (10.0.0.20) and mail (10.0.0.21), an MX pointing to mail, an SPF TXT 'v=spf1 mx -all', and a CNAME ftp->www. Set SOA serial to today's date format and enable zone-file checking.

平台
lin · Linux
应用
BIND
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
4 / 5

建议验证方式

named-checkzone corp.lab passes; dig @localhost resolves www/mail A, MX to mail with correct priority, TXT SPF, ftp CNAME; SOA serial matches YYYYMMDDnn; named-checkconf clean.

建议部分得分

40% zone loads+serves A/MX; 30% CNAME+TXT SPF; 30% valid SOA+checkzone

R03.04.01.04-T16 PostgreSQL service config and host auth

原始指令

Configure a PostgreSQL instance to listen on 10.0.0.30:5432, accept scram-sha-256 auth for role appuser on database appdb from 10.0.0.0/24 only (reject others), set max_connections=100 and shared_buffers=256MB, and reload. Local socket superuser access stays trust.

平台
lin · Linux
应用
PostgreSQL
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
4 / 5

建议验证方式

SHOW listen_addresses/max_connections/shared_buffers match; psql from a 10.0.0.x client as appuser (scram) connects; a client outside the subnet is rejected by pg_hba; config reload (not restart) applied non-runtime settings pending flag clear.

建议部分得分

35% listen+tuning params; 35% scram hba rule for subnet; 30% others rejected + reload

R03.04.01.04-T17 Redis with auth, persistence and bind

原始指令

Harden a Redis service: bind to 127.0.0.1 and 10.0.0.40 only, require a password from fixtures/redis_pass, enable AOF persistence (appendfsync everysec), rename the FLUSHALL command to a random token, and set maxmemory 512mb with allkeys-lru. Restart cleanly.

平台
lin · Linux
应用
Redis
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

redis-cli -a <pass> CONFIG GET shows appendonly yes, maxmemory 512mb, maxmemory-policy allkeys-lru, bind addresses; unauthenticated PING is denied; FLUSHALL is unknown while the renamed token works; AOF file present.

建议部分得分

30% auth+bind; 25% AOF persistence; 25% maxmemory policy; 20% renamed command

R03.04.01.04-T18 Samba share with per-user access

原始指令

Export a Samba share 'team' from /srv/team readable by group staff and writable only by user lead (from fixtures/smbusers). Disable guest access, force create mode 0660, and advertise the share. Keep SMB1 disabled (min protocol SMB2).

平台
lin · Linux
应用
Samba
交互表面
term · 终端
GUI 需求 · 任务设定
CL · CLI 足够
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
code · 代码与命令 type · 文字与表单
工作产物
WP08 · 应用 / 系统状态
条件
未声明
提案难度
3 / 5

建议验证方式

testparm reports the 'team' share with the right valid users/write list, guest ok = no, create mask 0660, server min protocol = SMB2; a staff user mounts read-only and lead can write; guest mount fails.

建议部分得分

35% share exported with correct perms; 30% write-list vs read-only; 20% no guest; 15% SMB2 minimum

R03.04.01.04-T19 Provision a LAMP host via Cockpit web console (control pair of T01)

原始指令

Control pair of T01: on a VM running the Cockpit web console (https://host:9090), use only the browser UI to install the Apache+PHP role, start and enable httpd, open the firewall for http, and create the vhost docroot /var/www/app with the provided index.php. Do not use a terminal.

平台
lin · Linux web · 任意系统(网页)
应用
Cockpit · Apache
交互表面
brow · 浏览器
GUI 需求 · 任务设定
G2 · GUI 必要
GUI 需求 · 普通权限
G2 · GUI 必要
交互原语
click · 指向与点击 type · 文字与表单 nav · 平移 / 缩放 / 滚动
工作产物
WP08 · 应用 / 系统状态
条件
tutorial · 阅读文档 / 教程
提案难度
3 / 5

建议验证方式

Grader checks via system state that httpd is enabled+running, firewalld http service is allowed, /var/www/app/index.php exists, and GET http://host returns the PHP output; Cockpit's Terminal page and SSH are disabled for the agent user, and the journal must attribute the changes to the cockpit-bridge web session.

建议部分得分

40% httpd enabled+running; 30% firewall rule; 30% vhost serves PHP

R03.04.01.04-T20 Clone and network a VM in virt-manager (control pair of T11)

原始指令

Control pair of T11: using the virt-manager GUI on a libvirt host, clone the base domain 'alpine-base' to 'alpine-web', attach it to the isolated NAT network 'labnet', set 2 vCPUs and 1 GB RAM, boot it, and confirm it gets a DHCP lease. Perform all steps in the GUI.

平台
lin · Linux
应用
virt-manager · QEMU
交互表面
desk · 桌面 GUI
GUI 需求 · 任务设定
G2 · GUI 必要
GUI 需求 · 普通权限
CL · CLI 足够
交互原语
click · 指向与点击 nav · 平移 / 缩放 / 滚动 vis · 视觉判断
工作产物
WP08 · 应用 / 系统状态
条件
tutorial · 阅读文档 / 教程
提案难度
2 / 5

建议验证方式

virsh (grader side) shows domain alpine-web defined with 2 vCPUs, 1024MB, NIC on labnet; the domain is running and holds a DHCP lease on labnet; disk is a clone of the base volume (distinct backing file). The agent session has no terminal and virsh, virt-clone and virt-install are removed, so libvirt is reachable only through virt-manager.

建议部分得分

40% clone defined with correct CPU/RAM; 30% attached to labnet; 30% running with DHCP lease

已有研究映射

以下沿用研究目录中的基准与小类映射,不是逐题标注、执行记录或产品背书。

同工作流族的小类