Skip to content

Commit

Permalink
[feat] Update LNMP from OneinStack
Browse files Browse the repository at this point in the history
  • Loading branch information
bypanelcom committed May 6, 2021
1 parent 332861f commit 38e4a1b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 17 deletions.
2 changes: 1 addition & 1 deletion include/check_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 25 additions & 7 deletions include/ngx_lua_waf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=https://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=https://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=https://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=https://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=https://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
Expand Down Expand Up @@ -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}"
Expand All @@ -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=https://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=https://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
Expand Down
21 changes: 12 additions & 9 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 38e4a1b

Please sign in to comment.