Browse Source

[feat] Update

lj2007331@gmail.com 3 years ago
parent
commit
35a91c16c0
8 changed files with 51 additions and 30 deletions
  1. 12 8
      include/check_os.sh
  2. 2 2
      include/init_CentOS.sh
  3. 7 7
      include/ngx_lua_waf.sh
  4. 5 1
      include/tomcat-10.sh
  5. 5 1
      include/tomcat-7.sh
  6. 5 1
      include/tomcat-8.sh
  7. 5 1
      include/tomcat-9.sh
  8. 10 9
      versions.txt

+ 12 - 8
include/check_os.sh

@@ -18,8 +18,12 @@ if [ -e "/usr/bin/yum" ]; then
   if ! command -v lsb_release >/dev/null 2>&1; then
     if [ -e "/etc/euleros-release" ]; then
       yum -y install euleros-lsb
-    elif [ -e "/etc/openeuler-release" ]; then
-      yum -y install openeuler-lsb
+    elif [ -e "/etc/openEuler-release" -o -e "/etc/openeuler-release" ]; then
+      if [ -n "$(grep -w '"20.03"' /etc/os-release)" ]; then
+        rpm -Uvh https://repo.openeuler.org/openEuler-20.03-LTS-SP1/everything/aarch64/Packages/openeuler-lsb-5.0-1.oe1.aarch64.rpm
+      else
+        yum -y install openeuler-lsb
+      fi
     else
       yum -y install redhat-lsb-core
     fi
@@ -36,19 +40,19 @@ command -v lsb_release >/dev/null 2>&1 || { echo "${CFAILURE}${PM} source failed
 
 # Get OS Version
 OS=$(lsb_release -is)
-if [[ "${OS}" =~ ^CentOS$|^RedHat$|^Fedora$|^Amazon$|^Alibaba$|^Aliyun$|^EulerOS$|^openEuler$ ]]; then
+if [[ "${OS}" =~ ^CentOS$|^RedHat$|^Rocky$|^Fedora$|^Amazon$|^Alibaba$|^Aliyun$|^EulerOS$|^openEuler$ ]]; then
   LikeOS=CentOS
-  CentOS_ver=$(lsb_release -rs | awk -F. '{print $1}')
+  CentOS_ver=$(lsb_release -rs | awk -F. '{print $1}' | awk '{print $1}')
   [[ "${OS}" =~ ^Fedora$ ]] && [ ${CentOS_ver} -ge 19 >/dev/null 2>&1 ] && { CentOS_ver=7; Fedora_ver=$(lsb_release -rs); }
   [[ "${OS}" =~ ^Amazon$|^Alibaba$|^Aliyun$|^EulerOS$|^openEuler$ ]] && CentOS_ver=7
 elif [[ "${OS}" =~ ^Debian$|^Deepin$|^Uos$|^Kali$ ]]; then
   LikeOS=Debian
-  Debian_ver=$(lsb_release -rs | awk -F. '{print $1}')
+  Debian_ver=$(lsb_release -rs | awk -F. '{print $1}' | awk '{print $1}')
   [[ "${OS}" =~ ^Deepin$|^Uos$ ]] && [[ "${Debian_ver}" =~ ^20$ ]] && Debian_ver=10
   [[ "${OS}" =~ ^Kali$ ]] && [[ "${Debian_ver}" =~ ^202 ]] && Debian_ver=10
 elif [[ "${OS}" =~ ^Ubuntu$|^LinuxMint$|^elementary$ ]]; then
   LikeOS=Ubuntu
-  Ubuntu_ver=$(lsb_release -rs | awk -F. '{print $1}')
+  Ubuntu_ver=$(lsb_release -rs | awk -F. '{print $1}' | awk '{print $1}')
   if [[ "${OS}" =~ ^LinuxMint$ ]]; then
     [[ "${Ubuntu_ver}" =~ ^18$ ]] && Ubuntu_ver=16
     [[ "${Ubuntu_ver}" =~ ^19$ ]] && Ubuntu_ver=18
@@ -95,7 +99,7 @@ if [ "$(getconf WORD_BIT)" == "32" ] && [ "$(getconf LONG_BIT)" == "64" ]; then
   SYS_BIT_b=x86_64 #mariadb
   SYS_BIT_c=x86_64 #ZendGuardLoader
   SYS_BIT_d=x86-64 #ioncube
-  [ "${TARGET_ARCH}" == 'aarch64' ] && { SYS_BIT_c=aarch64; SYS_BIT_d=aarch64; }
+  [ "${TARGET_ARCH}" == 'aarch64' ] && { SYS_BIT_j=aarch64; SYS_BIT_c=aarch64; SYS_BIT_d=aarch64; }
 else
   OS_BIT=32
   SYS_BIT_j=i586
@@ -103,7 +107,7 @@ else
   SYS_BIT_b=i686
   SYS_BIT_c=i386
   SYS_BIT_d=x86
-  [ "${TARGET_ARCH}" == 'armv7' ] && { SYS_BIT_c=armhf; SYS_BIT_d=armv7l; }
+  [ "${TARGET_ARCH}" == 'armv7' ] && { SYS_BIT_j=arm32-vfp-hflt; SYS_BIT_c=armhf; SYS_BIT_d=armv7l; }
 fi
 
 THREAD=$(grep 'processor' /proc/cpuinfo | sort -u | wc -l)

+ 2 - 2
include/init_CentOS.sh

@@ -27,9 +27,9 @@ alias grep='grep --color'
 alias egrep='egrep --color'
 alias fgrep='fgrep --color'
 EOF
-[[ "$(lsb_release -is)" =~ ^EulerOS$ ]] && sed -i '/HISTTIMEFORMAT=/d' /etc/profile.d/oneinstack.sh
+[[ "${OS}" =~ ^EulerOS$|^openEuler$ ]] && sed -i '/HISTTIMEFORMAT=/d' /etc/profile.d/oneinstack.sh
 
-[[ ! "$(lsb_release -is)" =~ ^EulerOS$ ]] && [ -z "$(grep ^'PROMPT_COMMAND=' /etc/bashrc)" ] && cat >> /etc/bashrc << EOF
+[[ ! "${OS}" =~ ^EulerOS$|^openEuler$ ]] && [ -z "$(grep ^'PROMPT_COMMAND=' /etc/bashrc)" ] && cat >> /etc/bashrc << EOF
 PROMPT_COMMAND='{ msg=\$(history 1 | { read x y; echo \$y; });logger "[euid=\$(whoami)]":\$(who am i):[\`pwd\`]"\$msg"; }'
 EOF
 

+ 7 - 7
include/ngx_lua_waf.sh

@@ -37,11 +37,11 @@ Nginx_lua_waf() {
     popd > /dev/null
     rm -rf lua-resty-lrucache-${lua_resty_lrucache_ver}
   fi
-  [ -d "/usr/local/share/lua/5.1" ] && ln -s /usr/local/lib/lua /usr/local/share/lua/5.1
+  [ ! -h "/usr/local/share/lua/5.1" ] && { rm -rf /usr/local/share/lua/5.1 ; ln -s /usr/local/lib/lua /usr/local/share/lua/5.1; }
   if [ ! -e "/usr/local/lib/lua/5.1/cjson.so" ]; then
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-cjson-2.1.0.8.tar.gz && Download_src
-    tar xzf lua-cjson-2.1.0.8.tar.gz
-    pushd lua-cjson-2.1.0.8
+    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-cjson-${lua_cjson_ver}.tar.gz && Download_src
+    tar xzf lua-cjson-${lua_cjson_ver}.tar.gz
+    pushd lua-cjson-${lua_cjson_ver}
     sed -i 's@^LUA_INCLUDE_DIR.*@&/luajit-2.1@' Makefile
     make && make install
     [ ! -e "/usr/local/lib/lua/5.1/cjson.so" ] && { echo "${CFAILURE}lua-cjson install failed! ${CEND}"; kill -9 $$; }
@@ -100,9 +100,9 @@ Tengine_lua_waf() {
     popd > /dev/null
   fi
   if [ ! -e "/usr/local/lib/lua/5.1/cjson.so" ]; then
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-cjson-2.1.0.8.tar.gz && Download_src
-    tar xzf lua-cjson-2.1.0.8.tar.gz
-    pushd lua-cjson-2.1.0.8
+    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-cjson-${lua_cjson_ver}.tar.gz && Download_src
+    tar xzf lua-cjson-${lua_cjson_ver}.tar.gz
+    pushd lua-cjson-${lua_cjson_ver}
     sed -i 's@^LUA_INCLUDE_DIR.*@&/luajit-2.1@' Makefile
     make && make install
     [ ! -e "/usr/local/lib/lua/5.1/cjson.so" ] && { echo "${CFAILURE}lua-cjson install failed! ${CEND}"; kill -9 $$; }

+ 5 - 1
include/tomcat-10.sh

@@ -50,7 +50,11 @@ Install_Tomcat10() {
   pushd ${tomcat_install_dir}/bin > /dev/null
   tar xzf tomcat-native.tar.gz
   pushd tomcat-native-*-src/native > /dev/null
-  ./configure --prefix=${apr_install_dir} --with-apr=${apr_install_dir} --with-ssl=${openssl_install_dir}
+  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-*

+ 5 - 1
include/tomcat-7.sh

@@ -51,7 +51,11 @@ Install_Tomcat7() {
   pushd ${tomcat_install_dir}/bin > /dev/null
   tar xzf tomcat-native.tar.gz
   pushd tomcat-native-*-src/native > /dev/null
-  ./configure --prefix=${apr_install_dir} --with-apr=${apr_install_dir} --with-ssl=${openssl_install_dir}
+  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-*

+ 5 - 1
include/tomcat-8.sh

@@ -51,7 +51,11 @@ Install_Tomcat8() {
   pushd ${tomcat_install_dir}/bin > /dev/null
   tar xzf tomcat-native.tar.gz
   pushd tomcat-native-*-src/native > /dev/null
-  ./configure --prefix=${apr_install_dir} --with-apr=${apr_install_dir} --with-ssl=${openssl_install_dir}
+  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-*

+ 5 - 1
include/tomcat-9.sh

@@ -50,7 +50,11 @@ Install_Tomcat9() {
   pushd ${tomcat_install_dir}/bin > /dev/null
   tar xzf tomcat-native.tar.gz
   pushd tomcat-native-*-src/native > /dev/null
-  ./configure --prefix=${apr_install_dir} --with-apr=${apr_install_dir} --with-ssl=${openssl_install_dir}
+  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-*

+ 10 - 9
versions.txt

@@ -1,6 +1,6 @@
 # newest software version
 # Web
-nginx_ver=1.20.0
+nginx_ver=1.20.1
 tengine_ver=2.3.3
 openresty_ver=1.19.3.1
 openssl11_ver=1.1.1k
@@ -18,18 +18,18 @@ apr_util_ver=1.6.1
 nghttp2_ver=1.42.0
 
 # DB
-mysql80_ver=8.0.24
+mysql80_ver=8.0.25
 mysql57_ver=5.7.34
 mysql56_ver=5.6.50
 mysql55_ver=5.5.62
 
-mariadb105_ver=10.5.9
-mariadb104_ver=10.4.18
-mariadb103_ver=10.3.28
+mariadb105_ver=10.5.10
+mariadb104_ver=10.4.19
+mariadb103_ver=10.3.29
 mariadb55_ver=5.5.68
 
 percona80_ver=8.0.23-14
-percona57_ver=5.7.33-36
+percona57_ver=5.7.34-37
 percona56_ver=5.6.51-91.0
 percona55_ver=5.5.62-38.14
 
@@ -65,7 +65,7 @@ icu4c_ver=63_1
 libsodium_ver=1.0.18
 libzip_ver=1.2.0
 argon2_ver=20171227
-imagemagick_ver=7.0.11-12
+imagemagick_ver=7.0.11-14
 imagick_ver=3.4.4
 graphicsmagick_ver=1.3.36
 gmagick_ver=2.0.5RC1
@@ -122,7 +122,8 @@ lua_nginx_module_ver=0.10.19
 luajit2_ver=2.1-20210510
 lua_resty_core_ver=0.1.21
 lua_resty_lrucache_ver=0.10
+lua_cjson_ver=2.1.0.8
 python_ver=3.6.13
-setuptools_ver=54.2.0
-pip_ver=21.0.1
+setuptools_ver=57.0.0
+pip_ver=21.1.2
 fail2ban_ver=0.11.2