From de0c5a3d32480edb5e6a29cbbf11f6e4b66f434d Mon Sep 17 00:00:00 2001 From: Muttahir Aon Syed Date: Tue, 8 Sep 2020 10:58:05 +0500 Subject: [PATCH 1/8] rsync suspension Temporarily suspending rysnc installation to make sure everything else installs till the repo issue is fixed --- install/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index 3d9debdc4..ded7adadf 100755 --- a/install/install.py +++ b/install/install.py @@ -2258,7 +2258,7 @@ def main(): checks.install_unzip() checks.install_zip() - checks.install_rsync() + ## checks.install_rsync() checks.installFirewalld() From 9cc27443e5ff21b20d4e55946bdf5cb33fcd547f Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 20:13:21 +0500 Subject: [PATCH 2/8] do not depend on CyberPanel own repo fro cent7 --- cyberpanel.sh | 83 ++++++++++++++++++++++++++++-------- install/install.py | 6 +-- install/installCyberPanel.py | 4 ++ 3 files changed, 73 insertions(+), 20 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index cb83aa324..efca4cc0f 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -380,42 +380,91 @@ 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 +<<<<<<< HEAD curl https://raw.githubusercontent.com/usmannasir/cyberpanel/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 + + +>>>>>>> 29c0a38e... do not depend on CyberPanel own repo fro cent7 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 diff --git a/install/install.py b/install/install.py index ded7adadf..8d8e8d65b 100755 --- a/install/install.py +++ b/install/install.py @@ -723,7 +723,7 @@ class preFlightsChecks: 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' @@ -756,7 +756,7 @@ class preFlightsChecks: ## 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: @@ -2009,7 +2009,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: diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 940adc418..4877bee73 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -243,7 +243,11 @@ class InstallCyberPanel: if self.distro == ubuntu: command = "apt-get -y install mariadb-server" elif self.distro == centos: +<<<<<<< HEAD command = 'yum --enablerepo=CyberPanel -y install mariadb-server' +======= + command = 'yum --enablerepo=mariadb -y install MariaDB-server MariaDB-client' +>>>>>>> 29c0a38e... do not depend on CyberPanel own repo fro cent7 elif self.distro == cent8: command = 'dnf -y install mariadb-server' From 3afb47bc043fa1cad4e93a4f84754bc2ded0c5a9 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 20:20:27 +0500 Subject: [PATCH 3/8] remove lux --- cyberpanel.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index efca4cc0f..91be219c5 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -413,20 +413,10 @@ gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 EOF - ## Ghetoo Repo for Postfix/Dovecot + ## Ghetoo Repo for Postfix/Dovecot - yum --nogpg install https://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm -y + 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 From c8a13d30e9b8474994fb7f33c18dcc040acff3cb Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 20:25:21 +0500 Subject: [PATCH 4/8] restic fix; --- cyberpanel.sh | 14 ++------------ install/install.py | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 91be219c5..ef33f9bdc 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -420,18 +420,8 @@ 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 + yum install yum-plugin-copr -y + yum copr enable copart/restic -y ## IUS Repo diff --git a/install/install.py b/install/install.py index 8d8e8d65b..d350ab456 100755 --- a/install/install.py +++ b/install/install.py @@ -2009,7 +2009,7 @@ milter_default_action = accept if os.path.exists(CentOSPath): if self.distro == centos: - command = 'yum --enablerepo=restic install restic -y' + command = 'yum install restic -y' preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) elif self.distro == cent8: From 30c5b8b435cbb2831d6ccecddbf07fa50319837a Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 20:43:58 +0500 Subject: [PATCH 5/8] fix dovecot --- install/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index d350ab456..dc17a792d 100755 --- a/install/install.py +++ b/install/install.py @@ -756,7 +756,7 @@ class preFlightsChecks: ## if self.distro == centos: - command = 'yum --enablerepo=gf-plus -y install dovecot dovecot-mysql' + command = 'yum --enablerepo=gf-plus -y install dovecot23 dovecot23-mysql' elif self.distro == cent8: command = 'dnf install --enablerepo=gf-plus dovecot23 dovecot23-mysql -y' else: From f573b39405fde3ad90440b18a2aace6106fd48fd Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 22:10:46 +0500 Subject: [PATCH 6/8] reenable rsync --- install/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index dc17a792d..0b4aa9820 100755 --- a/install/install.py +++ b/install/install.py @@ -2258,7 +2258,7 @@ def main(): checks.install_unzip() checks.install_zip() - ## checks.install_rsync() + checks.install_rsync() checks.installFirewalld() From 93e3aa82a4414bdd6f275f62db9148dad670afad Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 22:12:15 +0500 Subject: [PATCH 7/8] reenable rsync --- install/installCyberPanel.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 4877bee73..e58b77ecb 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -243,11 +243,7 @@ class InstallCyberPanel: if self.distro == ubuntu: command = "apt-get -y install mariadb-server" elif self.distro == centos: -<<<<<<< HEAD - command = 'yum --enablerepo=CyberPanel -y install mariadb-server' -======= command = 'yum --enablerepo=mariadb -y install MariaDB-server MariaDB-client' ->>>>>>> 29c0a38e... do not depend on CyberPanel own repo fro cent7 elif self.distro == cent8: command = 'dnf -y install mariadb-server' From d1cfee5cb8c7642ed621b77b8e1472da10fa71a0 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 8 Sep 2020 22:13:35 +0500 Subject: [PATCH 8/8] reenable rsync --- cyberpanel.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index ef33f9bdc..569993eea 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -390,10 +390,6 @@ if [[ -d /etc/yum.repos.d ]] ; then if [[ $CENTOS_8 == "True" ]] ; then dnf install zip -y elif [[ $CENTOS_8 == "False" ]] ; then -<<<<<<< HEAD - curl https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.0.1/install/CyberPanel.repo > /etc/yum.repos.d/CyberPanel.repo -======= - ###### Setup Required Repos ## Start with PDNS @@ -426,9 +422,6 @@ EOF ## IUS Repo yum install https://repo.ius.io/ius-release-el7.rpm -y - - ->>>>>>> 29c0a38e... do not depend on CyberPanel own repo fro cent7 fi fi