• Nvidia Jason Nano 磁盘及Swap

    Jason Nano 使用zram管理Swap

    /etc/systemd/nvzramconfig.sh

    中间有一行
    mem=$(((“${totalmem}” / 2 / “${NRDEVICES}”) * 1024))
    /2 就是整体缩小一半,意思是总 zram = RAM 的 50%,仍然平均分到每个 zram 设备

    改为 mem=$(((“${totalmem}” / “${NRDEVICES}”) * 1024)) 就是保持Swap容量与内存大小一致

    Jason Nano 也是使用LVM管理磁盘

  • Ubuntu 24 安装官方源Nginx

    https://nginx.org/en/linux_packages.html#Ubuntu

    Install the prerequisites:

    sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring

    Import an official nginx signing key so apt could verify the packages authenticity. Fetch the key:

    curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
        | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null

    Verify that the downloaded file contains the proper key:

    gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg

    To set up the apt repository for stable nginx packages, run the following command:

    echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
    https://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
        | sudo tee /etc/apt/sources.list.d/nginx.list

    If you would like to use mainline nginx packages, run the following command instead:

    echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
    https://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
        | sudo tee /etc/apt/sources.list.d/nginx.list

    Set up repository pinning to prefer our packages over distribution-provided ones:

    echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
        | sudo tee /etc/apt/preferences.d/99nginx

    To install nginx, run the following commands:

    sudo apt update
    sudo apt install nginx
  • Ubuntu 24通过APT安装Nodejs及Openclaw

    curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash
    apt list nodejs
    apt install -y nodejs
    node -v
    npm -v

    npm install -g openclaw@latest
    openclaw onboard –install-daemon

  • Ubuntu 24安装官方源Docker

    https://docs.docker.com/engine/install/ubuntu

    Run the following command to uninstall all conflicting packages:

     sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)

    Add Docker’s official GPG key:

    sudo apt update
    sudo apt install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc

    Add the repository to Apt sources:

    sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
    Types: deb
    URIs: https://download.docker.com/linux/ubuntu
    Suites: $(. /etc/os-release && echo “${UBUNTU_CODENAME:-$VERSION_CODENAME}”)
    Components: stable
    Architectures: $(dpkg –print-architecture)
    Signed-By: /etc/apt/keyrings/docker.asc
    EOF

    sudo apt update

    sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin