分类 电脑 下的文章

Unable to create account. Invalid value “paper_lantern” for the “cpmod” setting - jupiter

现象:hostbill 创建 cPanel 网页空间产品时,出错。提示信息如:Unable to create account. Invalid value “paper_lantern” for the “cpmod” setting。

原因:可能是WHM版本升级后,删除了旧的 paper lantern 主题模板,在产品设置那,将 Cpanel Theme 设置为新的主题名称 jupiter 即可。

参考:https://support.cpanel.net/hc/en-us/articles/6196316404119-Paper-Lantern-Deprecation-and-Removal-Schedule

在 virtualizor 创建 Windows系统模板

步骤:

  1. 创建VPS,磁盘至少20GB
  2. 在救援模式,通过dd的命令,安装好Windows 2022,确认可以正常远程桌面连接
  3. 关闭Windows系统。尝试通过 virtualizor 面板创建Windows模板,但长时间等待后,仅是创建了0大小的文件,操作失败
  4. 按教程里,登录到vps所在的节点,用命令 /usr/local/virtualizor/tools/windows.php 创建Windows模板,得到一个约13GB的img文件,命名为example-windows.img。再将该img文件复制到主控的 /var/virtualizor/kvm 目录里
  5. 再在 virutalizor 面板里添加模板,URL 就写文件的位置 /var/virtualizor/kvm/example-windows.img

参考:https://www.virtualizor.com/docs/admin/create-os-template/

用 grml iso 作为急救盘 dd 安装 debian 12 系统

需求:一台物理机,主板不支持EFI,有 LSI MTP 阵列卡组成 6TB 的存储。想达到不使用IPMI,在原 Debian 系统环境中,能远程重装系统。

尝试:使用 grml iso 作为急救系统,在内存中使用,再通过 dd 命令,或 grml-debootstrap 重新安装 Debian 系统。

步骤:

  1. apt install grml-rescueboot # 安装 grml急救 工具
  2. mkdir /boot/grml 和 wget -O /boot/grml/grml.iso https://download.grml.org/grml64-small_2022.11.iso # 下载 grml 的iso文件
  3. sed -i 's|additional_param=""|additional_param="ssh=mjj2023"|g' /etc/grub.d/42_grml # 添加 grml 的启动参数,即 ssh=mjj2023 。效果是自动启动 ssh 服务,且 root 的密码是 mjj2023
  4. update-grub # 更新 grub 配置
  5. grub-reboot 2 # 下次启动,选择从第二项启动,即加载 grml iso 文件
  6. reboot # 重启系统。如果顺利,机子重启后,会自动加载 grml iso 文件。 grml 会自动获取IP,然后启动 ssh 服务。机子可从远程ssh连接,即可登录到 grml 的急救系统

以下部分是具体实例,仅参考。

  1. ip addr add 66.181.33.88/32 dev eth0 和 ip route add default dev eth0 via 100.103.2.49 onlink # 如果成功通过IPv6 ssh连接到 grml 急救系统,可执行以上两条命令,为 eth0 网卡临时配置IPv4
  2. wget -O- https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-nocloud-amd64.raw | dd of=/dev/sda status=progress # 这里是使用debian官方的硬盘镜像。dd 好后,需要设置root密码、允许root用户凭密码ssh登录,还需留意物理机的网卡名称可能会随环境变化
  3. cfdisk /dev/sda # dd 好后,调整分区大小。请留意,如果是使用debian官方的硬盘镜像,调整分区后,是否需要重新安装grub,否则重启后,会出现 grub rescue
  4. resize2fs /dev/sda2 # 调整文件系统大小

调整磁盘分区后,grub找不到原来的位置,转到grub-rescu了

grml iso急救系统

参考:

浪潮服务器 NF5270M4 安装 FreeBSD 9.3 遇到的问题

问题一:用 FreeBSD 9.3 的 iso 文件启动安装,报错:0xffffffff8091f91a ACPI APIC Table ALASKA AMI kernel trap 12 with interrupts disabled

freebsd93-x2apic-1.png

freebsd93_x2apic-2.png

尝试:在主板的 BIOS 里,将 extend APIC support - X2APIC 的功能禁用掉。

freebsd93-x2apic-3.png

问题二:屏幕显示 run_interrupt_driven_hooks still waiting after seconds for xpt_config ,无法进行下一步

尝试:服务器使用了 PM8060 RAID 阵列卡,FreeBSD 9.3 认不到硬盘。在 FreeBSD 9.3 的 loader prompt 里先 load kernel ,然后再加载从浪潮网站下载的阵列卡驱动 load aacu64.ko 。 安装好 FreeBSD 后,将 aacu64.ko 复制到 /boot/modules 目录中,且在 /boot/loader.conf.local 中配置该模块 aacu64_load = "YES" 。

参考:

在 nginx 里设置 acme 验证证书的目录

需求:acme.sh 建议用非root的用户运行,如果nginx里有多个站点需要验证证书,怎么做较方便呢?

尝试:如 创建一个 acme.conf 的配置文件,内容如下:

#############################################################################
# Configuration file for Let's Encrypt ACME Challenge location
# This file is already included in listen_xxx.conf files.
# Do NOT include it separately!
#############################################################################
#
# This config enables to access /.well-known/acme-challenge/xxxxxxxxxxx
# on all our sites (HTTP), including all subdomains.
# This is required by ACME Challenge (webroot authentication).
# You can check that this location is working by placing ping.txt here:
# /var/www/letsencrypt/.well-known/acme-challenge/ping.txt
# And pointing your browser to:
# http://xxx.domain.tld/.well-known/acme-challenge/ping.txt
#
# Sources:
# https://community.letsencrypt.org/t/howto-easy-cert-generation-and-renewal-with-nginx/3491
#
#############################################################################

# Rule for legitimate ACME Challenge requests (like /.well-known/acme-challenge/xxxxxxxxx)
# We use ^~ here, so that we don't check other regexes (for speed-up). We actually MUST cancel
# other regex checks, because in our other config files have regex rule that denies access to files with dotted names.
location ^~ /.well-known/acme-challenge/ {

    # Set correct content type. According to this:
    # https://community.letsencrypt.org/t/using-the-webroot-domain-verification-method/1445/29
    # Current specification requires "text/plain" or no content header at all.
    # It seems that "text/plain" is a safe option.
    default_type "text/plain";

    # This directory must be the same as in /etc/letsencrypt/cli.ini
    # as "webroot-path" parameter. Also don't forget to set "authenticator" parameter
    # there to "webroot".
    # Do NOT use alias, use root! Target directory is located here:
    # /var/www/common/letsencrypt/.well-known/acme-challenge/
    root         /var/www/acme;
}

# Hide /acme-challenge subdirectory and return 404 on all requests.
# Ending slash is important!
location = /.well-known/acme-challenge/ {
    return 404;
}

然后让web用户在/var/www/acme有写入权限,再在所需站点的配置文件里引用这个acme.conf文件就可以啦。

参考:https://community.letsencrypt.org/t/how-to-nginx-configuration-to-enable-acme-challenge-support-on-all-http-virtual-hosts/5622/3