Skip to main content

DD Debian:curl -fLO

  1. DD Debian:
    curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh && chmod a+x debi.sh
    ./debi.sh --version 12 --password "密码"

    reboot

    # 开启 BBR + 更新组件
    echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf && \
    echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf && \
    sysctl -p && apt update && apt install -y curl wget tar

    开启 root 直接登录(一劳永逸)
    # 1. 设置 root 密码(建议还是用你那个,或者设个简单的)
    passwd root

    # 2. 允许 root 远程登录
    sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
    sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config

    # 3. 重启 SSH 服务生效
    service ssh restart

    小鸡加内存
    wget -qO- https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_Net_Install.sh && \
    fallocate -l 1G /swapfile || dd if=/dev/zero of=/swapfile bs=1M count=1024; \
    chmod 600 /swapfile; mkswap /swapfile; swapon /swapfile; \
    echo '/swapfile none swap sw 0 0' >> /etc/fstab; \
    sysctl -w vm.swappiness=10; \
    echo 'vm.swappiness=10' >> /etc/sysctl.conf; \
    free -h

    安装 s-ui 面板
    bash <(curl -Ls https://raw.githubusercontent.com/alireza0/s-ui/master/install.sh)

    面板证书移到etc并赋予权限
    # 1. 创建通用证书目录
    mkdir -p /etc/cert/

    # 2. 将证书文件拷贝过去
    cp /root/cert/域名/*.pem /etc/cert/

    # 3. 赋予读取权限(确保 s-ui 进程能读到)
    chmod -R 755 /etc/cert/

    修改后的证书路径
    证书文件路径 (Crt Path): /etc/cert/fullchain.pem
    密钥文件路径 (Key Path): /etc/cert/privkey.pem