去评论
dz插件网

记录一下oracle arm安装3x-ui过程

迪巴拉
2024/05/16 12:02:11
  1. [root@instance-20210826-1118 ~]# bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)The OS release is: olarch: arm64Your operating system is not supported by this script.Please ensure you are using one of the following supported operating systems:- Ubuntu 20.04+- Debian 11+- CentOS 8+- Fedora 36+- Arch Linux- Parch Linux- Manjaro- Armbian- AlmaLinux 9+- Rocky Linux 9+- Oracle Linux 8+- OpenSUSE Tumbleweed

官方提供的一键有问题, 搞了半天,开始以为我的系统版本低了,我的系统是oracle linux 8.4 , 于是升级到9
  1. #更新软件包sudo dnf update -y#重启sudo reboot#启用存储库并安装leappsudo dnf install -y leapp-upgrade --enablerepo=ol8_appstream,ol8_baseos_latest
  1. #甲骨文云升级sudo leapp preupgrade --oci#非甲骨文云升级sudo leapp preupgrade --oraclelinux

升级过程应该会被打断, 有些东西需要你确认
Answerfile has been generated at /var/log/leapp/answerfile  
  1. sudo cat /var/log/leapp/answerfile#会看到类似的东西[remove_pam_pkcs11_module_check]  # Title:              None  # Reason:             Confirmation  # =================== remove_pam_pkcs11_module_check.confirm ==================  # Label:              Disable pam_pkcs11 module in PAM configuration? If no, the upgrade process will be interrupted.  # Description:        PAM module pam_pkcs11 is no longer available in OL-8 since it was replaced by SSSD.  # Type:               bool  # Default:            None  # Available choices: True/False  # Unanswered question. Uncomment the following line with your answer  # confirm =  #回答确认sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True#再次输入升级命令sudo leapp preupgrade --oci

升级到9以后安装一键依然报相同错误, 应该是脚本有问题, 下载脚本看了看
  1. # Check OS and set release variableif [[ -f /etc/os-release ]]; then    source /etc/os-release    release=$IDelif [[ -f /usr/lib/os-release ]]; then    source /usr/lib/os-release    release=$IDelse    echo "Failed to check the system OS, please contact the author!" >&2    exit 1fiecho "The OS release is: $release"

我的/etc/os-release里面ID="ol"
  1. if [[ "${release}" == "arch" ]]; then    echo "Your OS is Arch Linux"elif [[ "${release}" == "parch" ]]; then    echo "Your OS is Parch linux"elif [[ "${release}" == "manjaro" ]]; then    echo "Your OS is Manjaro"elif [[ "${release}" == "armbian" ]]; then    echo "Your OS is Armbian"elif [[ "${release}" == "opensuse-tumbleweed" ]]; then    echo "Your OS is OpenSUSE Tumbleweed"elif [[ "${release}" == "centos" ]]; then    if [[ ${os_version} -lt 8 ]]; then        echo -e "${red} Please use CentOS 8 or higher ${plain}\n" && exit 1    fielif [[ "${release}" == "ubuntu" ]]; then    if [[ ${os_version} -lt 20 ]]; then        echo -e "${red} Please use Ubuntu 20 or higher version!${plain}\n" && exit 1    fielif [[ "${release}" == "fedora" ]]; then    if [[ ${os_version} -lt 36 ]]; then        echo -e "${red} Please use Fedora 36 or higher version!${plain}\n" && exit 1    fielif [[ "${release}" == "debian" ]]; then    if [[ ${os_version} -lt 11 ]]; then        echo -e "${red} Please use Debian 11 or higher ${plain}\n" && exit 1    fielif [[ "${release}" == "almalinux" ]]; then    if [[ ${os_version} -lt 9 ]]; then        echo -e "${red} Please use AlmaLinux 9 or higher ${plain}\n" && exit 1    fielif [[ "${release}" == "rocky" ]]; then    if [[ ${os_version} -lt 9 ]]; then        echo -e "${red} Please use Rocky Linux 9 or higher ${plain}\n" && exit 1    fielif [[ "${release}" == "oracle" ]]; then    if [[ ${os_version} -lt 8 ]]; then        echo -e "${red} Please use Oracle Linux 8 or higher ${plain}\n" && exit 1    fielse    echo -e "${red}Your operating system is not supported by this script.${plain}\n"    echo "Please ensure you are using one of the following supported operating systems:"    echo "- Ubuntu 20.04+"    echo "- Debian 11+"    echo "- CentOS 8+"    echo "- Fedora 36+"    echo "- Arch Linux"    echo "- Parch Linux"    echo "- Manjaro"    echo "- Armbian"    echo "- AlmaLinux 9+"    echo "- Rocky Linux 9+"    echo "- Oracle Linux 8+"    echo "- OpenSUSE Tumbleweed"    exit 1fi

它这里只和“oracle”判断, 所以报错, 这就简单了

CPU是aarch64下载arm64的包
  1. wget https://github.com/MHSanaei/3x-ui/releases/latest/download/x-ui-linux-arm64.tar.gz#解压tar zxvf x-ui-linux-arm64.tar.gz#要修改文件chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.shvim x-ui/x-ui.sh


暴力点
  1. # Check OS and set release variable#if [[ -f /etc/os-release ]]; then#    source /etc/os-release#    release=$ID#elif [[ -f /usr/lib/os-release ]]; then#    source /usr/lib/os-release#    release=$ID#else#    echo "Failed to check the system OS, please contact the author!" >&2#    exit 1#firelease="oracle"echo "The OS release is: $release"
  1. cp x-ui/x-ui.sh /usr/bin/x-uicp -f x-ui/x-ui.service /etc/systemd/system/mv x-ui/ /usr/local/systemctl daemon-reloadsystemctl enable x-uisystemctl restart x-ui

ok!!