Browse Source

[feat] Update ver'

lj2007331@gmail.com 3 years ago
parent
commit
df87f9174e
4 changed files with 39 additions and 19 deletions
  1. 1 2
      README.md
  2. 1 1
      include/check_download.sh
  3. 25 7
      include/ngx_lua_waf.sh
  4. 12 9
      versions.txt

+ 1 - 2
README.md

@@ -8,10 +8,9 @@ Script properties:
 - Some security optimization
 - Providing a plurality of database versions (MySQL-8.0, MySQL-5.7, MySQL-5.6, MySQL-5.5, MariaDB-10.5, MariaDB-10.4, MariaDB-10.3, MariaDB-5.5, Percona-8.0, Percona-5.7, Percona-5.6, Percona-5.5, PostgreSQL, MongoDB)
 - Providing multiple PHP versions (PHP-8.0, PHP-7.4, PHP-7.3, PHP-7.2, PHP-7.1, PHP-7.0, PHP-5.6, PHP-5.5, PHP-5.4, PHP-5.3)
-- Provide Nginx, Tengine, OpenResty and ngx_lua_waf
+- Provide Nginx, Tengine, OpenResty, Apache and ngx_lua_waf
 - Providing a plurality of Tomcat version (Tomcat-9, Tomcat-8, Tomcat-7, Tomcat-6)
 - Providing a plurality of JDK version (JDK-11.0, JDK-1.8, JDK-1.7, JDK-1.6)
-- Providing a plurality of Apache
 - According to their needs to install PHP Cache Accelerator provides ZendOPcache, xcache, apcu, eAccelerator. And php extensions,include ZendGuardLoader,ionCube,SourceGuardian,imagick,gmagick,fileinfo,imap,ldap,calendar,phalcon,yaf,yar,redis,memcached,memcache,mongodb,swoole,xdebug
 - Installation Pureftpd, phpMyAdmin according to their needs
 - Install memcached, redis according to their needs

+ 1 - 1
include/check_download.sh

@@ -714,7 +714,7 @@ checkDownload() {
   # phpMyAdmin
   if [ "${phpmyadmin_flag}" == 'y' ]; then
     echo "Download phpMyAdmin..."
-    if [[ "${php_option}" =~ ^[1-2]$ ]]; then
+    if [[ "${php_option}" =~ ^[1-5]$ ]]; then
       src_url=https://files.phpmyadmin.net/phpMyAdmin/${phpmyadmin_oldver}/phpMyAdmin-${phpmyadmin_oldver}-all-languages.tar.gz && Download_src
     else
       src_url=https://files.phpmyadmin.net/phpMyAdmin/${phpmyadmin_ver}/phpMyAdmin-${phpmyadmin_ver}-all-languages.tar.gz && Download_src

+ 25 - 7
include/ngx_lua_waf.sh

@@ -13,13 +13,31 @@ Nginx_lua_waf() {
   [ ! -e "${nginx_install_dir}/sbin/nginx" ] && echo "${CWARNING}Nginx is not installed on your system! ${CEND}" && exit 1
   if [ ! -e "/usr/local/lib/libluajit-5.1.so.2.1.0" ]; then
     [ -e "/usr/local/lib/libluajit-5.1.so.2.0.5" ] && find /usr/local -name *luajit* | xargs rm -rf
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/luajit2-2.1-20200102.tar.gz && Download_src
-    tar xzf luajit2-2.1-20200102.tar.gz
-    pushd luajit2-2.1-20200102
+    src_url=http://mirrors.linuxeye.com/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
+    tar xzf luajit2-${luajit2_ver}.tar.gz
+    pushd luajit2-${luajit2_ver}
     make && make install
     [ ! -e "/usr/local/lib/libluajit-5.1.so.2.1.0" ] && { echo "${CFAILURE}LuaJIT install failed! ${CEND}"; kill -9 $$; }
     popd > /dev/null
+    rm -rf luajit2-${luajit2_ver}
   fi
+  if [ ! -e "/usr/local/lib/lua/resty/core.lua" ]; then
+    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-resty-core-${lua_resty_core_ver}.tar.gz && Download_src
+    tar xzf lua-resty-core-${lua_resty_core_ver}.tar.gz
+    pushd lua-resty-core-${lua_resty_core_ver}
+    make install
+    popd > /dev/null
+    rm -rf lua-resty-core-${lua_resty_core_ver}
+  fi
+  if [ ! -e "/usr/local/lib/lua/resty/lrucache.lua" ]; then
+    src_url=http://mirrors.linuxeye.com/oneinstack/src/lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz && Download_src
+    tar xzf lua-resty-lrucache-${lua_resty_lrucache_ver}.tar.gz
+    pushd lua-resty-lrucache-${lua_resty_lrucache_ver}
+    make install
+    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
   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
@@ -59,7 +77,7 @@ Nginx_lua_waf() {
       kill -QUIT `cat /var/run/nginx.pid.oldbin`
       popd > /dev/null
       echo "${CSUCCESS}lua-nginx-module installed successfully! ${CEND}"
-      sed -i "s@^nginx_modules_options='\(.*\)'@nginx_modules_options=\'\1 --with-ld-opt=\"-Wl,-rpath,/usr/local/lib\" --add-module=../lua-nginx-module --add-module=../ngx_devel_kit\'@" ../options.conf
+      sed -i "s@^nginx_modules_options='\(.*\)'@nginx_modules_options=\'\1 --with-ld-opt=\"-Wl,-rpath,/usr/local/lib\" --add-module=../lua-nginx-module-${lua_nginx_module_ver} --add-module=../ngx_devel_kit\'@" ../options.conf
       rm -rf nginx-${nginx_ver}
     else
       echo "${CFAILURE}lua-nginx-module install failed! ${CEND}"
@@ -74,9 +92,9 @@ Tengine_lua_waf() {
   [ ! -e "${tengine_install_dir}/sbin/nginx" ] && echo "${CWARNING}Tengine is not installed on your system! ${CEND}" && exit 1
   if [ ! -e "/usr/local/lib/libluajit-5.1.so.2.1.0" ]; then
     [ -e "/usr/local/lib/libluajit-5.1.so.2.0.5" ] && find /usr/local -name *luajit* | xargs rm -rf
-    src_url=http://mirrors.linuxeye.com/oneinstack/src/luajit2-2.1-20200102.tar.gz && Download_src
-    tar xzf luajit2-2.1-20200102.tar.gz
-    pushd luajit2-2.1-20200102
+    src_url=http://mirrors.linuxeye.com/oneinstack/src/luajit2-${luajit2_ver}.tar.gz && Download_src
+    tar xzf luajit2-${luajit2_ver}.tar.gz
+    pushd luajit2-${luajit2_ver}
     make && make install
     [ ! -e "/usr/local/lib/libluajit-5.1.so.2.1.0" ] && { echo "${CFAILURE}LuaJIT install failed! ${CEND}"; kill -9 $$; }
     popd > /dev/null

+ 12 - 9
versions.txt

@@ -1,6 +1,6 @@
 # newest software version
 # Web
-nginx_ver=1.18.0
+nginx_ver=1.20.0
 tengine_ver=2.3.3
 openresty_ver=1.19.3.1
 openssl11_ver=1.1.1k
@@ -18,8 +18,8 @@ apr_util_ver=1.6.1
 nghttp2_ver=1.42.0
 
 # DB
-mysql80_ver=8.0.23
-mysql57_ver=5.7.33
+mysql80_ver=8.0.24
+mysql57_ver=5.7.34
 mysql56_ver=5.6.50
 mysql55_ver=5.5.62
 
@@ -51,9 +51,9 @@ php56_ver=5.6.40
 php70_ver=7.0.33
 php71_ver=7.1.33
 php72_ver=7.2.34
-php73_ver=7.3.27
-php74_ver=7.4.16
-php80_ver=8.0.3
+php73_ver=7.3.28
+php74_ver=7.4.19
+php80_ver=8.0.6
 
 libiconv_ver=1.16
 curl_ver=7.75.0
@@ -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-6
+imagemagick_ver=7.0.11-11
 imagick_ver=3.4.4
 graphicsmagick_ver=1.3.36
 gmagick_ver=2.0.5RC1
@@ -88,7 +88,7 @@ xdebug_oldver=2.5.5
 pureftpd_ver=1.0.49
 
 # Redis
-redis_ver=6.2.1
+redis_ver=6.2.3
 redis_oldver=5.0.9
 pecl_redis_ver=5.3.4
 pecl_redis_oldver=4.3.0
@@ -118,7 +118,10 @@ boost_percona_ver=1.72.0
 boost_oldver=1.59.0
 
 # Others
-lua_nginx_module_ver=0.10.15
+lua_nginx_module_ver=0.10.19
+luajit2_ver=2.1-20201229
+lua_resty_core_ver=0.1.21
+lua_resty_lrucache_ver=0.10
 htop_ver=3.0.2
 bison_ver=2.7.1
 python_ver=3.6.13