From 2385bc2e0d4247a1ffb8cb6ebaf826bfa2c3150b Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Fri, 2 Jun 2023 17:04:22 +0800 Subject: [PATCH] install improve --- install/install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install/install.sh b/install/install.sh index 9a72f180..2c36fa14 100644 --- a/install/install.sh +++ b/install/install.sh @@ -205,7 +205,7 @@ if [ "${os_type}" == 'Debian' ]; then sudo echo "deb http://deb.debian.org/debian ${VERSION_CODENAME}-backports main" >/etc/apt/sources.list.d/backports.list sudo apt update sudo apt install -t ${VERSION_CODENAME}-backports cockpit -y - sudo apt install cockpit-pcp -y 1>/dev/null 2>&1 + sudo apt install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>&1 fi if [ "${os_type}" == 'Ubuntu' ]; then @@ -216,14 +216,14 @@ if [ "${os_type}" == 'Ubuntu' ]; then fi VERSION_CODENAME=$(cat /etc/os-release |grep VERSION_CODENAME|cut -f2 -d"=") sudo apt install -t ${VERSION_CODENAME}-backports cockpit -y - sudo apt install cockpit-pcp -y 1>/dev/null 2>&1 + sudo apt install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>&1 echo "Cockpit allow root user" echo "" >/etc/cockpit/disallowed-users 1>/dev/null 2>&1 fi if [ "${os_type}" == 'CentOS' ] || [ "$os_type" == 'OracleLinux' ]; then sudo yum install cockpit -y - sudo yum install cockpit-pcp -y 1>/dev/null 2>&1 + sudo yum install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>&1 sudo systemctl enable --now cockpit.socket sudo firewall-cmd --permanent --zone=public --add-service=cockpit sudo firewall-cmd --reload @@ -231,7 +231,7 @@ fi if [ "$os_type" == 'Fedora' ]; then sudo dnf install cockpit -y - sudo dnf install cockpit-pcp -y 1>/dev/null 2>&1 + sudo dnf install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>&1 sudo systemctl enable --now cockpit.socket sudo firewall-cmd --add-service=cockpit sudo firewall-cmd --add-service=cockpit --permanent @@ -240,7 +240,7 @@ fi if [ "$os_type" == 'Redhat' ] ; then sudo subscription-manager repos --enable rhel-7-server-extras-rpms 1>/dev/null 2>&1 sudo yum install cockpit -y - sudo yum install cockpit-pcp -y 1>/dev/null 2>&1 + sudo yum install cockpit-pcp cockpit-packagekit -y 1>/dev/null 2>&1 sudo setenforce 0 1>/dev/null 2>&1 sudo sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config 1>/dev/null 2>&1 sudo systemctl enable --now cockpit.socket @@ -303,7 +303,7 @@ if [ "${os_type}" == 'CentOS' ] || [ "$os_type" == 'OracleLinux' ] ;then fi # uninstall plugins -rm -rf /usr/share/cockpit/apps /usr/share/cockpit/selinux /usr/share/cockpit/kdump /usr/share/cockpit/sosreport +rm -rf /usr/share/cockpit/apps /usr/share/cockpit/selinux /usr/share/cockpit/kdump /usr/share/cockpit/sosreport /usr/share/cockpit/packagekit # configure cockpit cp /data/apps/stackhub/cockpit/cockpit.conf /etc/cockpit/cockpit.conf