From 5cd510b6556d8ef76d690879ead4c7bd8beb4906 Mon Sep 17 00:00:00 2001 From: Akatsukiro Date: Thu, 18 Jan 2024 17:29:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=89=E8=A3=85Apache=E9=83=A8?= =?UTF-8?q?=E5=88=86=EF=BC=8C=E4=BC=98=E5=8C=96Ubuntu=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=96=B9=E5=BC=8F=E3=80=81=E6=96=B0=E5=A2=9E?= =?UTF-8?q?RHEL=E7=B3=BB=E5=AE=89=E8=A3=85=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 125a260..57578d4 100644 --- a/install.sh +++ b/install.sh @@ -119,9 +119,16 @@ install_php() { install_apache() { echo -e "${green}开始安装Apache${plain}" - wget -O /usr/share/keyrings/apache2.gpg https://packages.sury.org/apache2/apt.gpg - echo "deb [signed-by=/usr/share/keyrings/apache2.gpg] https://packages.sury.org/apache2/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/apache2.list - apt update && apt install apache2 -y + if [[ $systemFlag == "1" ]]; then + wget -O /usr/share/keyrings/apache2.gpg https://packages.sury.org/apache2/apt.gpg + echo "deb [signed-by=/usr/share/keyrings/apache2.gpg] https://packages.sury.org/apache2/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/apache2.list + apt update && apt install apache2 -y + elif [[ $systemFlag == "2" ]]; then + add-apt-repository ppa:ondrej/apache2 + apt update && apt install apache2 -y + elif [[ $systemFlag == "3" ]]; then + dnf install httpd -y + fi a2enconf php8.1-fpm a2enmod proxy_fcgi a2enmod headers