2 Commity ae7ab480d6 ... 00e6ef45e2

Autor SHA1 Wiadomość Data
  OpenAlist 00e6ef45e2 feat: add installation scripts for OpenJDK 18 and Tomcat 11 and add http_limit_conn for Nginx 4 dni temu
  OpenAlist 9979fc3add feat: update Tomcat installation options to include versions 6 and 11 4 dni temu
8 zmienionych plików z 247 dodań i 28 usunięć
  1. 8 0
      .idea/oneinstack.iml
  2. 4 0
      config/nginx.conf
  3. 7 3
      include/check_download.sh
  4. 1 1
      include/nginx.sh
  5. 57 0
      include/openjdk-18.sh
  6. 129 0
      include/tomcat-11.sh
  7. 40 24
      install.sh
  8. 1 0
      versions.txt

+ 8 - 0
.idea/oneinstack.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="EMPTY_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 4 - 0
config/nginx.conf

@@ -102,6 +102,10 @@ http {
       fastcgi_pass unix:/dev/shm/php-cgi.sock;
       fastcgi_index index.php;
       include fastcgi.conf;
+      # 如果需要限制并发连接,可以取消注释以下代码
+      #limit_conn addr 10;
+      #limit_conn_status 503;
+      #limit_conn_log_level error;
     }
     location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
       expires 30d;

+ 7 - 3
include/check_download.sh

@@ -82,18 +82,22 @@ checkDownload() {
   # tomcat
   case "${tomcat_option}" in
     1)
+      echo "Download tomcat 11..."
+      src_url=${mirror_link}/apache/tomcat/v${tomcat11_ver}/apache-tomcat-${tomcat11_ver}.tar.gz && Download_src
+      ;;
+    2)
       echo "Download tomcat 10..."
       src_url=${mirror_link}/apache/tomcat/v${tomcat10_ver}/apache-tomcat-${tomcat10_ver}.tar.gz && Download_src
       ;;
-    2)
+    3)
       echo "Download tomcat 9..."
       src_url=${mirror_link}/apache/tomcat/v${tomcat9_ver}/apache-tomcat-${tomcat9_ver}.tar.gz && Download_src
       ;;
-    3)
+    4)
       echo "Download tomcat 8..."
       src_url=${mirror_link}/apache/tomcat/v${tomcat8_ver}/apache-tomcat-${tomcat8_ver}.tar.gz && Download_src
       ;;
-    4)
+    5)
       echo "Download tomcat 7..."
       src_url=${mirror_link}/apache/tomcat/v${tomcat7_ver}/apache-tomcat-${tomcat7_ver}.tar.gz && Download_src
       src_url=${mirror_link}/apache/tomcat/v${tomcat7_ver}/catalina-jmx-remote.jar && Download_src

+ 1 - 1
include/nginx.sh

@@ -28,7 +28,7 @@ Install_Nginx() {
   sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc
 
   [ ! -d "${nginx_install_dir}" ] && mkdir -p ${nginx_install_dir}
-  ./configure --prefix=${nginx_install_dir} --user=${run_user} --group=${run_group} --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_ssl_module --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-${openssl11_ver} --with-pcre=../pcre-${pcre_ver} --with-pcre-jit --with-ld-opt='-ljemalloc' ${nginx_modules_options}
+  ./configure --prefix=${nginx_install_dir} --user=${run_user} --group=${run_group} --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_ssl_module --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_limit_conn_module --with-openssl=../openssl-${openssl11_ver} --with-pcre=../pcre-${pcre_ver} --with-pcre-jit --with-ld-opt='-ljemalloc' ${nginx_modules_options}
   make -j ${THREAD} && make install
   if [ -e "${nginx_install_dir}/conf/nginx.conf" ]; then
     popd > /dev/null

+ 57 - 0
include/openjdk-18.sh

@@ -0,0 +1,57 @@
+#!/bin/bash
+# Author:  yeho <lj2007331 AT gmail.com>
+# BLOG:  https://linuxeye.com
+#
+# Notes: OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+
+#
+# Project home page:
+#       https://oneinstack.com
+#       https://github.com/oneinstack/oneinstack
+
+Install_OpenJDK18() {
+  pushd ${oneinstack_dir}/src > /dev/null
+
+  # 下载OpenJDK 18
+  if [ "${OS}" == "CentOS" ] || [ "${OS}" == "RHEL" ]; then
+    # CentOS/RHEL
+    if [ "${OS_VER}" == "7" ]; then
+      yum -y install java-18-openjdk java-18-openjdk-devel
+    elif [ "${OS_VER}" == "8" ]; then
+      dnf -y install java-18-openjdk java-18-openjdk-devel
+    fi
+  elif [ "${OS}" == "Debian" ] || [ "${OS}" == "Ubuntu" ]; then
+    # Debian/Ubuntu
+    apt-get update
+    apt-get -y install openjdk-18-jdk
+  fi
+
+  # 设置JAVA_HOME
+  if [ -d "/usr/lib/jvm/java-18-openjdk" ]; then
+    JAVA_HOME="/usr/lib/jvm/java-18-openjdk"
+  elif [ -d "/usr/lib/jvm/java-18-openjdk-amd64" ]; then
+    JAVA_HOME="/usr/lib/jvm/java-18-openjdk-amd64"
+  fi
+
+  # 配置环境变量
+  if [ -n "${JAVA_HOME}" ]; then
+    [ -z "`grep ^'export JAVA_HOME=' /etc/profile`" ] && echo "export JAVA_HOME=${JAVA_HOME}" >> /etc/profile
+    [ -z "`grep ^'export CLASSPATH=' /etc/profile`" ] && echo "export CLASSPATH=.:\${JAVA_HOME}/lib/dt.jar:\${JAVA_HOME}/lib/tools.jar" >> /etc/profile
+    [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=\${JAVA_HOME}/bin:\$PATH" >> /etc/profile
+    [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep \${JAVA_HOME} /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=\${JAVA_HOME}/bin:\1@" /etc/profile
+    . /etc/profile
+
+    # 验证安装
+    java -version
+    if [ $? -eq 0 ]; then
+      echo "${CSUCCESS}OpenJDK 18 installed successfully! ${CEND}"
+    else
+      echo "${CFAILURE}OpenJDK 18 install failed, Please Contact the author! ${CEND}"
+      kill -9 $$; exit 1;
+    fi
+  else
+    echo "${CFAILURE}OpenJDK 18 install failed, Please Contact the author! ${CEND}"
+    kill -9 $$; exit 1;
+  fi
+
+  popd > /dev/null
+} 

+ 129 - 0
include/tomcat-11.sh

@@ -0,0 +1,129 @@
+#!/bin/bash
+# Author:  yeho <lj2007331 AT gmail.com>
+# BLOG:  https://linuxeye.com
+#
+# Notes: OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+
+#
+# Project home page:
+#       https://oneinstack.com
+#       https://github.com/oneinstack/oneinstack
+
+Install_Tomcat11() {
+  pushd ${oneinstack_dir}/src > /dev/null
+  . /etc/profile
+  id -g ${run_group} >/dev/null 2>&1
+  [ $? -ne 0 ] && groupadd ${run_group}
+  id -u ${run_user} >/dev/null 2>&1
+  [ $? -ne 0 ] && useradd -g ${run_group} -M -s /bin/bash ${run_user} || { [ -z "$(grep ^${run_user} /etc/passwd | grep '/bin/bash')" ] && usermod -g ${run_group} -s /bin/bash ${run_user}; }
+
+  # install apr
+  if [ ! -e "${apr_install_dir}/bin/apr-1-config" ]; then
+    tar xzf apr-${apr_ver}.tar.gz
+    pushd apr-${apr_ver} > /dev/null
+    ./configure --prefix=${apr_install_dir}
+    make -j ${THREAD} && make install
+    popd > /dev/null
+    rm -rf apr-${apr_ver}
+  fi
+
+  tar xzf apache-tomcat-${tomcat11_ver}.tar.gz
+  [ ! -d "${tomcat_install_dir}" ] && mkdir -p ${tomcat_install_dir}
+  /bin/cp -R apache-tomcat-${tomcat11_ver}/* ${tomcat_install_dir}
+  rm -rf ${tomcat_install_dir}/webapps/{docs,examples,host-manager,manager,ROOT/*}
+
+  if [ ! -e "${tomcat_install_dir}/conf/server.xml" ]; then
+    rm -rf ${tomcat_install_dir}
+    echo "${CFAILURE}Tomcat install failed, Please contact the author! ${CEND}" && grep -Ew 'NAME|ID|ID_LIKE|VERSION_ID|PRETTY_NAME' /etc/os-release
+    kill -9 $$; exit 1;
+  fi
+
+  pushd ${tomcat_install_dir}/bin > /dev/null
+  tar xzf tomcat-native.tar.gz
+  pushd tomcat-native-*-src/native > /dev/null
+  if [ "${armplatform}" == "y" ]; then
+    ./configure --prefix=${apr_install_dir} --with-apr=${apr_install_dir}
+  else
+    ./configure --prefix=${apr_install_dir} --with-apr=${apr_install_dir} --with-ssl=${openssl_install_dir}
+  fi
+  make -j ${THREAD} && make install
+  popd > /dev/null
+  rm -rf tomcat-native-*
+  if [ -e "${apr_install_dir}/lib/libtcnative-1.la" ]; then
+    [ ${Mem} -le 768 ] && let Xms_Mem="${Mem}/3" || Xms_Mem=256
+    let XmxMem="${Mem}/2"
+    cat > ${tomcat_install_dir}/bin/setenv.sh << EOF
+JAVA_OPTS='-Djava.security.egd=file:/dev/./urandom -server -Xms${Xms_Mem}m -Xmx${XmxMem}m -Dfile.encoding=UTF-8'
+CATALINA_OPTS="-Djava.library.path=${apr_install_dir}/lib"
+# -Djava.rmi.server.hostname=$IPADDR
+# -Dcom.sun.management.jmxremote.password.file=\$CATALINA_BASE/conf/jmxremote.password
+# -Dcom.sun.management.jmxremote.access.file=\$CATALINA_BASE/conf/jmxremote.access
+# -Dcom.sun.management.jmxremote.ssl=false"
+EOF
+    chmod +x ./*.sh
+    /bin/mv ${tomcat_install_dir}/conf/server.xml{,_bk}
+    popd # goto ${oneinstack_dir}/src
+    /bin/cp ${oneinstack_dir}/config/server.xml ${tomcat_install_dir}/conf
+    sed -i "s@/usr/local/tomcat@${tomcat_install_dir}@g" ${tomcat_install_dir}/conf/server.xml
+
+    if [ ! -e "${nginx_install_dir}/sbin/nginx" -a ! -e "${tengine_install_dir}/sbin/nginx" -a ! -e "${openresty_install_dir}/nginx/sbin/nginx" -a ! -e "${apache_install_dir}/bin/httpd" ]; then
+      if [ "${PM}" == 'yum' ]; then
+        if [ "`firewall-cmd --state`" == "running" ]; then
+          firewall-cmd --permanent --zone=public --add-port=8080/tcp
+          firewall-cmd --reload
+        fi
+      elif [ "${PM}" == 'apt-get' ]; then
+        if ufw status | grep -wq active; then
+            ufw allow 8080/tcp
+        fi
+      fi
+    fi
+
+    [ ! -d "${tomcat_install_dir}/conf/vhost" ] && mkdir ${tomcat_install_dir}/conf/vhost
+    cat > ${tomcat_install_dir}/conf/vhost/localhost.xml << EOF
+<Host name="localhost" appBase="${wwwroot_dir}/default" unpackWARs="true" autoDeploy="true">
+  <Context path="" docBase="${wwwroot_dir}/default" reloadable="false" crossContext="true"/>
+  <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+    prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
+  <Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="X-Forwarded-For"
+    protocolHeader="X-Forwarded-Proto" protocolHeaderHttpsValue="https"/>
+</Host>
+EOF
+    # logrotate tomcat catalina.out
+    cat > /etc/logrotate.d/tomcat << EOF
+${tomcat_install_dir}/logs/catalina.out {
+  daily
+  rotate 5
+  missingok
+  dateext
+  compress
+  notifempty
+  copytruncate
+}
+EOF
+    [ -z "$(grep '<user username="admin" password=' ${tomcat_install_dir}/conf/tomcat-users.xml)" ] && sed -i "s@^</tomcat-users>@<role rolename=\"admin-gui\"/>\n<role rolename=\"admin-script\"/>\n<role rolename=\"manager-gui\"/>\n<role rolename=\"manager-script\"/>\n<user username=\"admin\" password=\"$(cat /dev/urandom | head -1 | md5sum | head -c 10)\" roles=\"admin-gui,admin-script,manager-gui,manager-script\"/>\n</tomcat-users>@" ${tomcat_install_dir}/conf/tomcat-users.xml
+    cat > ${tomcat_install_dir}/conf/jmxremote.access << EOF
+monitorRole   readonly
+controlRole   readwrite \
+              create javax.management.monitor.*,javax.management.timer.* \
+              unregister
+EOF
+    cat > ${tomcat_install_dir}/conf/jmxremote.password << EOF
+monitorRole  $(cat /dev/urandom | head -1 | md5sum | head -c 8)
+# controlRole   R&D
+EOF
+    chown -R ${run_user}:${run_group} ${tomcat_install_dir}
+    /bin/cp ${oneinstack_dir}/init.d/Tomcat-init /etc/init.d/tomcat
+    sed -i "s@JAVA_HOME=.*@JAVA_HOME=${JAVA_HOME}@" /etc/init.d/tomcat
+    sed -i "s@^CATALINA_HOME=.*@CATALINA_HOME=${tomcat_install_dir}@" /etc/init.d/tomcat
+    sed -i "s@^TOMCAT_USER=.*@TOMCAT_USER=${run_user}@" /etc/init.d/tomcat
+    [ "${PM}" == 'yum' ] && { chkconfig --add tomcat; chkconfig tomcat on; }
+    [ "${PM}" == 'apt-get' ] && update-rc.d tomcat defaults
+    echo "${CSUCCESS}Tomcat installed successfully! ${CEND}"
+    rm -rf apache-tomcat-${tomcat11_ver}
+  else
+    popd > /dev/null
+    echo "${CFAILURE}Tomcat install failed, Please contact the author! ${CEND}" && grep -Ew 'NAME|ID|ID_LIKE|VERSION_ID|PRETTY_NAME' /etc/os-release
+  fi
+  service tomcat start
+  popd > /dev/null
+} 

+ 40 - 24
install.sh

@@ -57,7 +57,7 @@ Show_Help() {
                               sourceguardian,imagick,gmagick,fileinfo,imap,ldap,calendar,phalcon,
                               yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug
   --nodejs                    Install Nodejs
-  --tomcat_option [1-4]       Install Tomcat version
+  --tomcat_option [1-6]       Install Tomcat version
   --jdk_option [1-3]          Install JDK version
   --db_option [1-14]          Install DB version
   --dbinstallmethod [1-2]     DB install method, default: 1 binary install
@@ -197,8 +197,8 @@ while :; do
   --tomcat_option)
     tomcat_option=$2
     shift 2
-    [[ ! ${tomcat_option} =~ ^[1-4]$ ]] && {
-      echo "${CWARNING}tomcat_option input error! Please only input number 1~4${CEND}"
+    [[ ! ${tomcat_option} =~ ^[1-6]$ ]] && {
+      echo "${CWARNING}tomcat_option input error! Please only input number 1~6${CEND}"
       exit 1
     }
     [ -e "$tomcat_install_dir/conf/server.xml" ] && {
@@ -209,8 +209,8 @@ while :; do
   --jdk_option)
     jdk_option=$2
     shift 2
-    [[ ! ${jdk_option} =~ ^[1-3]$ ]] && {
-      echo "${CWARNING}jdk_option input error! Please only input number 1~3${CEND}"
+    [[ ! ${jdk_option} =~ ^[1-4]$ ]] && {
+      echo "${CWARNING}jdk_option input error! Please only input number 1~4${CEND}"
       exit 1
     }
     ;;
@@ -459,17 +459,19 @@ if [ ${ARG_NUM} == 0 ]; then
           while :; do
             echo
             echo 'Please select tomcat server:'
-            echo -e "\t${CMSG}1${CEND}. Install Tomcat-10"
-            echo -e "\t${CMSG}2${CEND}. Install Tomcat-9"
-            echo -e "\t${CMSG}3${CEND}. Install Tomcat-8"
-            echo -e "\t${CMSG}4${CEND}. Install Tomcat-7"
-            echo -e "\t${CMSG}5${CEND}. Do not install"
-            read -e -p "Please input a number:(Default 5 press Enter) " tomcat_option
-            tomcat_option=${tomcat_option:-5}
-            if [[ ! ${tomcat_option} =~ ^[1-5]$ ]]; then
-              echo "${CWARNING}input error! Please only input number 1~5${CEND}"
+            echo -e "\t${CMSG}1${CEND}. Install Tomcat-11"
+            echo -e "\t${CMSG}2${CEND}. Install Tomcat-10"
+            echo -e "\t${CMSG}3${CEND}. Install Tomcat-9"
+            echo -e "\t${CMSG}4${CEND}. Install Tomcat-8"
+            echo -e "\t${CMSG}5${CEND}. Install Tomcat-7"
+            echo -e "\t${CMSG}6${CEND}. Install Tomcat-6"
+            echo -e "\t${CMSG}7${CEND}. Do not install"
+            read -e -p "Please input a number:(Default 7 press Enter) " tomcat_option
+            tomcat_option=${tomcat_option:-7}
+            if [[ ! ${tomcat_option} =~ ^[1-7]$ ]]; then
+              echo "${CWARNING}input error! Please only input number 1~7${CEND}"
             else
-              [ "${tomcat_option}" != '5' -a -e "$tomcat_install_dir/conf/server.xml" ] && {
+              [ "${tomcat_option}" != '7' -a -e "$tomcat_install_dir/conf/server.xml" ] && {
                 echo "${CWARNING}Tomcat already installed! ${CEND}"
                 unset tomcat_option
               }
@@ -477,12 +479,14 @@ if [ ${ARG_NUM} == 0 ]; then
                 while :; do
                   echo
                   echo 'Please select JDK version:'
+                  echo -e "\t${CMSG}1${CEND}. Install openjdk-8-jdk"
                   echo -e "\t${CMSG}2${CEND}. Install openjdk-11-jdk"
                   echo -e "\t${CMSG}3${CEND}. Install openjdk-17-jdk"
+                  echo -e "\t${CMSG}4${CEND}. Install openjdk-18-jdk"
                   read -e -p "Please input a number:(Default 1 press Enter) " jdk_option
-                  jdk_option=${jdk_option:-2}
-                  if [[ ! ${jdk_option} =~ ^[2-3]$ ]]; then
-                    echo "${CWARNING}input error! Please only input number 2~3${CEND}"
+                  jdk_option=${jdk_option:-1}
+                  if [[ ! ${jdk_option} =~ ^[1-4]$ ]]; then
+                    echo "${CWARNING}input error! Please only input number 1~4${CEND}"
                   else
                     break
                   fi
@@ -877,7 +881,7 @@ if [ ${ARG_NUM} == 0 ]; then
   done
 fi
 
-if [[ ${nginx_option} =~ ^[1-4]$ ]] || [ "${apache_flag}" == 'y' ] || [ "${caddy_flag}" == 'y' ] || [[ ${tomcat_option} =~ ^[1-4]$ ]]; then
+if [[ ${nginx_option} =~ ^[1-4]$ ]] || [ "${apache_flag}" == 'y' ] || [ "${caddy_flag}" == 'y' ] || [[ ${tomcat_option} =~ ^[1-6]$ ]]; then
   [ ! -d ${wwwroot_dir}/default ] && mkdir -p ${wwwroot_dir}/default
   [ ! -d ${wwwlogs_dir} ] && mkdir -p ${wwwlogs_dir}
 fi
@@ -1251,25 +1255,37 @@ case "${jdk_option}" in
     . include/openjdk-17.sh
     Install_OpenJDK17 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
+  4)
+    . include/openjdk-18.sh
+    Install_OpenJDK18 2>&1 | tee -a ${oneinstack_dir}/install.log
+    ;;
 esac
 
 case "${tomcat_option}" in
   1)
+    . include/tomcat-11.sh
+    Install_Tomcat11 2>&1 | tee -a ${oneinstack_dir}/install.log
+    ;;
+  2)
     . include/tomcat-10.sh
     Install_Tomcat10 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
-  2)
+  3)
     . include/tomcat-9.sh
     Install_Tomcat9 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
-  3)
+  4)
     . include/tomcat-8.sh
     Install_Tomcat8 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
-  4)
+  5)
     . include/tomcat-7.sh
     Install_Tomcat7 2>&1 | tee -a ${oneinstack_dir}/install.log
     ;;
+  6)
+    . include/tomcat-6.sh
+    Install_Tomcat6 2>&1 | tee -a ${oneinstack_dir}/install.log
+    ;;
 esac
 
 # Nodejs
@@ -1327,7 +1343,7 @@ echo "Total OneinStack Install Time: ${CQUESTION}${installTime}${CEND} minutes"
 [[ "${nginx_option}" =~ ^[1-3]$ ]] && echo -e "\n$(printf "%-32s" "Nginx install dir":)${CMSG}${web_install_dir}${CEND}"
 [ "${apache_flag}" == 'y' ] && echo -e "\n$(printf "%-32s" "Apache install dir":)${CMSG}${apache_install_dir}${CEND}"
 [ "${caddy_flag}" == 'y' ] && echo -e "\n$(printf "%-32s" "Caddy install dir":)${CMSG}${caddy_install_dir}${CEND}"
-[[ "${tomcat_option}" =~ ^[1-4]$ ]] && echo -e "\n$(printf "%-32s" "Tomcat install dir":)${CMSG}${tomcat_install_dir}${CEND}"
+[[ "${tomcat_option}" =~ ^[1-6]$ ]] && echo -e "\n$(printf "%-32s" "Tomcat install dir":)${CMSG}${tomcat_install_dir}${CEND}"
 [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo -e "\n$(printf "%-32s" "Database install dir:")${CMSG}${db_install_dir}${CEND}"
 [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo "$(printf "%-32s" "Database data dir:")${CMSG}${db_data_dir}${CEND}"
 [[ "${db_option}" =~ ^[1-9]$|^1[0-2]$ ]] && echo "$(printf "%-32s" "Database user:")${CMSG}root${CEND}"
@@ -1355,7 +1371,7 @@ echo "Total OneinStack Install Time: ${CQUESTION}${installTime}${CEND} minutes"
 [ "${phpmyadmin_flag}" == 'y' ] && echo "$(printf "%-32s" "phpMyAdmin Control Panel URL:")${CMSG}http://${IPADDR}/phpMyAdmin${CEND}"
 [ "${redis_flag}" == 'y' ] && echo -e "\n$(printf "%-32s" "redis install dir:")${CMSG}${redis_install_dir}${CEND}"
 [ "${memcached_flag}" == 'y' ] && echo -e "\n$(printf "%-32s" "memcached install dir:")${CMSG}${memcached_install_dir}${CEND}"
-if [[ ${nginx_option} =~ ^[1-4]$ ]] || [ "${apache_flag}" == 'y' ] || [[ ${tomcat_option} =~ ^[1-4]$ ]]; then
+if [[ ${nginx_option} =~ ^[1-4]$ ]] || [ "${apache_flag}" == 'y' ] || [[ ${tomcat_option} =~ ^[1-6]$ ]]; then
   echo -e "\n$(printf "%-32s" "Index URL:")${CMSG}http://${IPADDR}/${CEND}"
 fi
 if [ ${ARG_NUM} == 0 ]; then

+ 1 - 0
versions.txt

@@ -7,6 +7,7 @@ openresty_ver=1.21.4.3
 openssl11_ver=1.1.1w
 openssl_ver=1.0.2u
 
+tomcat11_ver=11.0.8
 tomcat10_ver=10.1.16
 tomcat9_ver=9.0.83
 tomcat8_ver=8.5.96