forked from amidevous/xui.one
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFedora-39.sh
55 lines (53 loc) · 1.78 KB
/
Fedora-39.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
echo -e "\nChecking that minimal requirements are ok"
# Ensure the OS is compatible with the launcher
OS="Fedora"
VERFULL="$(sed 's/^.*release //;s/ (Fin.*$//' /etc/fedora-release)"
VER="${VERFULL:0:2}" # return 38, 39 or 40
ARCH=$(uname -m)
echo "Detected : $OS $VER $ARCH"
dnf -y install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
dnf -y install --nogpgcheck https://rpms.remirepo.net/enterprise/remi-release-$(rpm -E %rhel).rpm
cat > /etc/yum.repos.d/mariadb.repo <<EOF
[mariadb]
name=MariaDB RPM source
baseurl=https://mariadb.mirror.digitalpacific.com.au/yum/10.6/fedora/$VER/x86_64/
enabled=1
gpgcheck=0
EOF
enablerepo() {
dnf config-manager --set-enabled $1
}
enablerepo fedora-cisco-openh264
enablerepo fedora
enablerepo updates
enablerepo mariadb
enablerepo rpmfusion-free
enablerepo rpmfusion-free-updates
enablerepo rpmfusion-nonfree
enablerepo rpmfusion-nonfree-updates
enablerepo remi
enablerepo remi-safe
dnf -y install wget
yumpurge() {
for package in $@
do
echo "removing config files for $package"
for file in $(rpm -q --configfiles $package)
do
echo " removing $file"
rm -f $file
done
rpm -e $package
done
}
dnf -y install MariaDB-server
cd /root
wget https://github.com/jua74470/xui.one/raw/refs/heads/master/php74.spec -O php74.spec
dnf -y remove libcurl-devel
dnf -y build-dep php74.spec
wget https://github.com/jua74470/xui.one/releases/download/test/XUI_1.5.13-Fedora-39.zip -qO XUI_1.5.13-Fedora-39.zip
unzip XUI_1.5.13-Fedora-39.zip
rm -rf XUI_1.5.13-Fedora-39.zip
wget https://github.com/jua74470/xui.one/raw/refs/heads/master/Fedora-39.python3 -O Fedora-39.python3
python3 /root/Fedora-39.python3