主机论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 272|回复: 6

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

[复制链接]

69

主题

228

回帖

1021

积分

金牌会员

Rank: 6Rank: 6

积分
1021
发表于 2024-5-16 11:33:15 | 显示全部楼层 |阅读模式
  1. [root@instance-20210826-1118 ~]# bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
  2. The OS release is: ol
  3. arch: arm64
  4. Your operating system is not supported by this script.

  5. Please ensure you are using one of the following supported operating systems:
  6. - Ubuntu 20.04+
  7. - Debian 11+
  8. - CentOS 8+
  9. - Fedora 36+
  10. - Arch Linux
  11. - Parch Linux
  12. - Manjaro
  13. - Armbian
  14. - AlmaLinux 9+
  15. - Rocky Linux 9+
  16. - Oracle Linux 8+
  17. - OpenSUSE Tumbleweed
复制代码


官方提供的一键有问题, 搞了半天,开始以为我的系统版本低了,我的系统是oracle linux 8.4 , 于是升级到9
  1. #更新软件包
  2. sudo dnf update -y

  3. #重启
  4. sudo reboot

  5. #启用存储库并安装leapp
  6. sudo dnf install -y leapp-upgrade --enablerepo=ol8_appstream,ol8_baseos_latest
复制代码

  1. #甲骨文云升级
  2. sudo leapp preupgrade --oci
  3. #非甲骨文云升级
  4. sudo leapp preupgrade --oraclelinux
复制代码


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

  14. #回答确认
  15. sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True

  16. #再次输入升级命令
  17. sudo leapp preupgrade --oci
复制代码


升级到9以后安装一键依然报相同错误, 应该是脚本有问题, 下载脚本看了看
  1. # Check OS and set release variable
  2. if [[ -f /etc/os-release ]]; then
  3. source /etc/os-release
  4. release=$ID
  5. elif [[ -f /usr/lib/os-release ]]; then
  6. source /usr/lib/os-release
  7. release=$ID
  8. else
  9. echo "Failed to check the system OS, please contact the author!" >&2
  10. exit 1
  11. fi
  12. echo "The OS release is: $release"
复制代码


我的/etc/os-release里面ID="ol"

  1. if [[ "${release}" == "arch" ]]; then
  2. echo "Your OS is Arch Linux"
  3. elif [[ "${release}" == "parch" ]]; then
  4. echo "Your OS is Parch linux"
  5. elif [[ "${release}" == "manjaro" ]]; then
  6. echo "Your OS is Manjaro"
  7. elif [[ "${release}" == "armbian" ]]; then
  8. echo "Your OS is Armbian"
  9. elif [[ "${release}" == "opensuse-tumbleweed" ]]; then
  10. echo "Your OS is OpenSUSE Tumbleweed"
  11. elif [[ "${release}" == "centos" ]]; then
  12. if [[ ${os_version} -lt 8 ]]; then
  13. echo -e "${red} Please use CentOS 8 or higher ${plain}\n" && exit 1
  14. fi
  15. elif [[ "${release}" == "ubuntu" ]]; then
  16. if [[ ${os_version} -lt 20 ]]; then
  17. echo -e "${red} Please use Ubuntu 20 or higher version!${plain}\n" && exit 1
  18. fi
  19. elif [[ "${release}" == "fedora" ]]; then
  20. if [[ ${os_version} -lt 36 ]]; then
  21. echo -e "${red} Please use Fedora 36 or higher version!${plain}\n" && exit 1
  22. fi
  23. elif [[ "${release}" == "debian" ]]; then
  24. if [[ ${os_version} -lt 11 ]]; then
  25. echo -e "${red} Please use Debian 11 or higher ${plain}\n" && exit 1
  26. fi
  27. elif [[ "${release}" == "almalinux" ]]; then
  28. if [[ ${os_version} -lt 9 ]]; then
  29. echo -e "${red} Please use AlmaLinux 9 or higher ${plain}\n" && exit 1
  30. fi
  31. elif [[ "${release}" == "rocky" ]]; then
  32. if [[ ${os_version} -lt 9 ]]; then
  33. echo -e "${red} Please use Rocky Linux 9 or higher ${plain}\n" && exit 1
  34. fi
  35. elif [[ "${release}" == "oracle" ]]; then
  36. if [[ ${os_version} -lt 8 ]]; then
  37. echo -e "${red} Please use Oracle Linux 8 or higher ${plain}\n" && exit 1
  38. fi
  39. else
  40. echo -e "${red}Your operating system is not supported by this script.${plain}\n"
  41. echo "Please ensure you are using one of the following supported operating systems:"
  42. echo "- Ubuntu 20.04+"
  43. echo "- Debian 11+"
  44. echo "- CentOS 8+"
  45. echo "- Fedora 36+"
  46. echo "- Arch Linux"
  47. echo "- Parch Linux"
  48. echo "- Manjaro"
  49. echo "- Armbian"
  50. echo "- AlmaLinux 9+"
  51. echo "- Rocky Linux 9+"
  52. echo "- Oracle Linux 8+"
  53. echo "- OpenSUSE Tumbleweed"
  54. exit 1

  55. fi
复制代码


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

CPU是aarch64下载arm64的包
  1. wget https://github.com/MHSanaei/3x-ui/releases/latest/download/x-ui-linux-arm64.tar.gz

  2. #解压
  3. tar zxvf x-ui-linux-arm64.tar.gz

  4. #要修改文件
  5. chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh
  6. vim x-ui/x-ui.sh
复制代码



暴力点
  1. # Check OS and set release variable
  2. #if [[ -f /etc/os-release ]]; then
  3. # source /etc/os-release
  4. # release=$ID
  5. #elif [[ -f /usr/lib/os-release ]]; then
  6. # source /usr/lib/os-release
  7. # release=$ID
  8. #else
  9. # echo "Failed to check the system OS, please contact the author!" >&2
  10. # exit 1
  11. #fi
  12. release="oracle"
  13. echo "The OS release is: $release"
复制代码

  1. cp x-ui/x-ui.sh /usr/bin/x-ui
  2. cp -f x-ui/x-ui.service /etc/systemd/system/
  3. mv x-ui/ /usr/local/
  4. systemctl daemon-reload
  5. systemctl enable x-ui
  6. systemctl restart x-ui
复制代码


ok!!


回复

使用道具 举报

293

主题

2160

回帖

6633

积分

论坛元老

Rank: 8Rank: 8

积分
6633
发表于 2024-5-16 11:36:14 | 显示全部楼层
这个后续升级xui版本还要不要折腾这?
回复

使用道具 举报

69

主题

228

回帖

1021

积分

金牌会员

Rank: 6Rank: 6

积分
1021
 楼主| 发表于 2024-5-16 11:38:35 | 显示全部楼层
本帖最后由 yjsx86 于 2024-5-16 11:40 编辑
宋喆 发表于 2024-5-16 11:36
这个后续升级xui版本还要不要折腾这?


它没有提issue的地方, 大概率要折腾的
要不换系统
要不修改xui-sh里面的update

  1. update() {
  2. confirm "This function will forcefully reinstall the latest version, and the data will not be lost. Do you want to continue?" "y"
  3. if [[ $? != 0 ]]; then
  4. LOGE "Cancelled"
  5. if [[ $# == 0 ]]; then
  6. before_show_menu
  7. fi
  8. return 0
  9. fi
  10. bash <(curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/main/install.sh)
  11. if [[ $? == 0 ]]; then
  12. LOGI "Update is complete, Panel has automatically restarted "
  13. exit 0
  14. fi
  15. }
复制代码
回复

使用道具 举报

293

主题

2160

回帖

6633

积分

论坛元老

Rank: 8Rank: 8

积分
6633
发表于 2024-5-16 11:36:00 | 显示全部楼层
yjsx86 发表于 2024-5-16 11:38
它没有提issue的地方, 大概率要折腾的
要不换系统
要不修改xui-sh里面的update

留给需要的人。
我还是amd算了
回复

使用道具 举报

69

主题

228

回帖

1021

积分

金牌会员

Rank: 6Rank: 6

积分
1021
 楼主| 发表于 2024-5-16 15:23:58 | 显示全部楼层
宋喆 发表于 2024-5-16 15:23
留给需要的人。
我还是amd算了

arm是没问题的
主要是系统不要oracle linux就好
回复

使用道具 举报

12

主题

320

回帖

1134

积分

金牌会员

Rank: 6Rank: 6

积分
1134
发表于 2024-5-16 11:38:00 | 显示全部楼层
有Docker镜像https://github.com/mhsanaei/3x-ui/pkgs/container/3x-ui,折腾来干嘛
回复

使用道具 举报

179

主题

3140

回帖

8323

积分

论坛元老

Rank: 8Rank: 8

积分
8323
发表于 2024-5-16 17:04:20 | 显示全部楼层
折腾这么多,不如直接DD系统
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|主机论坛

GMT+8, 2025-7-2 13:05 , Processed in 0.078973 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表