mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 14:26:16 +01:00
do not depend on CyberPanel own repo fro cent7
This commit is contained in:
@@ -381,42 +381,87 @@ fi
|
||||
install_required() {
|
||||
|
||||
if [[ -d /etc/yum.repos.d ]] ; then
|
||||
yum clean all
|
||||
yum update -y
|
||||
yum autoremove epel-release -y
|
||||
rm -f /etc/yum.repos.d/epel.repo
|
||||
rm -f /etc/yum.repos.d/epel.repo.rpmsave
|
||||
yum install epel-release -y
|
||||
|
||||
if [[ $CENTOS_8 == "True" ]] ; then
|
||||
dnf install zip -y
|
||||
elif [[ $CENTOS_8 == "False" ]] ; then
|
||||
curl https://$GIT_CONTENT_URL/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo
|
||||
|
||||
###### Setup Required Repos
|
||||
|
||||
## Start with PDNS
|
||||
|
||||
yum install yum-plugin-priorities -y
|
||||
curl -o /etc/yum.repos.d/powerdns-auth-43.repo https://repo.powerdns.com/repo-files/centos-auth-43.repo
|
||||
|
||||
## MariaDB
|
||||
|
||||
cat << EOF > /etc/yum.repos.d/MariaDB.repo
|
||||
# MariaDB 10.5 CentOS repository list - created 2020-09-08 14:54 UTC
|
||||
# http://downloads.mariadb.org/mariadb/repositories/
|
||||
[mariadb]
|
||||
name = MariaDB
|
||||
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
|
||||
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
|
||||
gpgcheck=1
|
||||
EOF
|
||||
|
||||
## Ghetoo Repo for Postfix/Dovecot
|
||||
|
||||
yum --nogpg install https://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm -y
|
||||
|
||||
## Enable LUX Repo
|
||||
|
||||
cat << EOF > /etc/yum.repos.d/lux.repo
|
||||
[lux]
|
||||
name=CentOS $releasever - $basearch - Lux
|
||||
baseurl=http://repo.iotti.biz/CentOS/$releasever
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LUX
|
||||
EOF
|
||||
|
||||
## Copr for restic
|
||||
|
||||
cat << EOF > /etc/yum.repos.d/copr.repo
|
||||
[restic]
|
||||
name=Copr repo for restic owned by copart
|
||||
baseurl=https://download.copr.fedorainfracloud.org/results/copart/restic/epel-7-$basearch/
|
||||
type=rpm-md
|
||||
skip_if_unavailable=True
|
||||
gpgcheck=1
|
||||
gpgkey=https://download.copr.fedorainfracloud.org/results/copart/restic/pubkey.gpg
|
||||
repo_gpgcheck=0
|
||||
enabled=1
|
||||
enabled_metadata=1
|
||||
EOF
|
||||
|
||||
## IUS Repo
|
||||
|
||||
yum install https://repo.ius.io/ius-release-el7.rpm -y
|
||||
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "\nInstalling necessary components..."
|
||||
if [[ $SERVER_OS == "CentOS" ]] ; then
|
||||
if [[ $CENTOS_8 == "False" ]] ; then
|
||||
timeout 10 rpm --import https://$DOWNLOAD_SERVER/mariadb/RPM-GPG-KEY-MariaDB
|
||||
timeout 10 rpm --import https://$DOWNLOAD_SERVER/litespeed/RPM-GPG-KEY-litespeed
|
||||
timeout 10 rpm --import https://$DOWNLOAD_SERVER/powerdns/FD380FBB-pub.asc
|
||||
timeout 10 rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
|
||||
timeout 10 rpm --import https://$DOWNLOAD_SERVER/gf-plus/RPM-GPG-KEY-gf.el7
|
||||
timeout 10 rpm --import https://$DOWNLOAD_SERVER/lux/RPM-GPG-KEY-LUX
|
||||
timeout 10 rpm --import https://$DOWNLOAD_SERVER/ius/RPM-GPG-KEY-IUS-7
|
||||
timeout 10 rpm --import https://repo.dovecot.org/DOVECOT-REPO-GPG
|
||||
timeout 10 rpm --import https://copr-be.cloud.fedoraproject.org/results/copart/restic/pubkey.gpg
|
||||
curl https://getfedora.org/static/fedora.gpg | gpg --import
|
||||
fi
|
||||
|
||||
yum clean all
|
||||
yum update -y
|
||||
yum autoremove epel-release -y
|
||||
rm -f /etc/yum.repos.d/epel.repo
|
||||
rm -f /etc/yum.repos.d/epel.repo.rpmsave
|
||||
|
||||
if [[ $CENTOS_8 == "False" ]] ; then
|
||||
yum --enablerepo=CyberPanel install -y wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel gpgme-devel curl-devel git socat openssl-devel MariaDB-shared mariadb-devel yum-utils python36u python36u-pip python36u-devel
|
||||
yum install -y wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel gpgme-devel curl-devel git socat openssl-devel MariaDB-shared mariadb-devel yum-utils python36u python36u-pip python36u-devel
|
||||
check_return
|
||||
yum -y groupinstall development
|
||||
check_return
|
||||
fi
|
||||
if [[ $CENTOS_8 == "True" ]] ; then
|
||||
dnf install epel-release -y
|
||||
dnf install -y wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-devel curl-devel git platform-python-devel tar socat python3
|
||||
check_return
|
||||
dnf --enablerepo=PowerTools install gpgme-devel -y
|
||||
|
||||
@@ -749,7 +749,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
|
||||
self.stdOut("Install dovecot - do the install")
|
||||
|
||||
if self.distro == centos:
|
||||
command = 'yum install --enablerepo=CyberPanel -y postfix3 postfix3-ldap postfix3-mysql postfix3-pcre'
|
||||
command = 'yum install --enablerepo=gf-plus -y postfix3 postfix3-ldap postfix3-mysql postfix3-pcre'
|
||||
elif self.distro == cent8:
|
||||
|
||||
command = 'dnf --nogpg install -y https://mirror.ghettoforge.org/distributions/gf/el/8/gf/x86_64/gf-release-8-11.gf.el8.noarch.rpm'
|
||||
@@ -782,7 +782,7 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
|
||||
##
|
||||
|
||||
if self.distro == centos:
|
||||
command = 'yum --enablerepo=CyberPanel -y install dovecot dovecot-mysql'
|
||||
command = 'yum --enablerepo=gf-plus -y install dovecot dovecot-mysql'
|
||||
elif self.distro == cent8:
|
||||
command = 'dnf install --enablerepo=gf-plus dovecot23 dovecot23-mysql -y'
|
||||
else:
|
||||
@@ -2036,7 +2036,7 @@ milter_default_action = accept
|
||||
if os.path.exists(CentOSPath):
|
||||
|
||||
if self.distro == centos:
|
||||
command = 'yum --enablerepo=CyberPanel install restic -y'
|
||||
command = 'yum --enablerepo=restic install restic -y'
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
elif self.distro == cent8:
|
||||
|
||||
|
||||
@@ -256,20 +256,6 @@ class InstallCyberPanel:
|
||||
|
||||
command = "apt-get -y install mariadb-server"
|
||||
elif self.distro == centos:
|
||||
|
||||
content = """# MariaDB 10.5 CentOS repository list - created 2020-09-03 09:44 UTC
|
||||
# http://downloads.mariadb.org/mariadb/repositories/
|
||||
[mariadb]
|
||||
name = MariaDB
|
||||
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
|
||||
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
|
||||
gpgcheck=1
|
||||
"""
|
||||
|
||||
writeToFile = open(mRepo, 'w')
|
||||
writeToFile.write(content)
|
||||
writeToFile.close()
|
||||
|
||||
command = 'yum --enablerepo=mariadb -y install MariaDB-server MariaDB-client'
|
||||
elif self.distro == cent8:
|
||||
command = 'dnf -y install mariadb-server'
|
||||
|
||||
Reference in New Issue
Block a user