Skip to content

Releases: edutfree/script

ois-260515-upweb

Choose a tag to compare

@edutfree edutfree released this 15 May 09:13
71af2fe

Upgrade_Nginx() {
pushd ${oneinstack_dir}/src > /dev/null
[ ! -e "${nginx_install_dir}/sbin/nginx" ] && echo "${CWARNING}Nginx is not installed on your system! ${CEND}" && exit 1
OLD_nginx_ver_tmp=${nginx_install_dir}/sbin/nginx -v 2>&1
OLD_nginx_ver=${OLD_nginx_ver_tmp##*/}
Latest_nginx_ver=curl --connect-timeout 2 -m 3 -s http://nginx.org/en/CHANGES-1.22 | awk '/Changes with nginx/{print$0}' | awk '{print $4}' | head -1
[ -z "${Latest_nginx_ver}" ] && Latest_nginx_ver=curl --connect-timeout 2 -m 3 -s http://nginx.org/en/CHANGES | awk '/Changes with nginx/{print$0}' | awk '{print $4}' | head -1
echo
echo "Current Nginx Version: ${CMSG}${OLD_nginx_ver}${CEND}"
while :; do echo
[ "${nginx_flag}" != 'y' ] && read -e -p "Please input upgrade Nginx Version(default: ${Latest_nginx_ver}): " NEW_nginx_ver
NEW_nginx_ver=${NEW_nginx_ver:-${Latest_nginx_ver}}
if [ "${NEW_nginx_ver}" != "${OLD_nginx_ver}" ]; then
[ ! -e "nginx-${NEW_nginx_ver}.tar.gz" ] && wget --no-check-certificate -c http://nginx.org/download/nginx-${NEW_nginx_ver}.tar.gz > /dev/null 2>&1
if [ -e "nginx-${NEW_nginx_ver}.tar.gz" ]; then
src_url=https://www.openssl.org/source/openssl-${openssl11_ver}.tar.gz && Download_src
src_url=${mirror_link}/pcre-${pcre_ver}.tar.gz && Download_src
src_url=${mirror_link}/ngx_devel_kit.tar.gz && Download_src
src_url=${mirror_link}/lua-nginx-module-${lua_nginx_module_ver}.tar.gz && Download_src
tar xzf openssl-${openssl11_ver}.tar.gz
tar xzf pcre-${pcre_ver}.tar.gz
tar xzf ngx_devel_kit.tar.gz
tar xzf lua-nginx-module-${lua_nginx_module_ver}.tar.gz
echo "Download [${CMSG}nginx-${NEW_nginx_ver}.tar.gz${CEND}] successfully! "
break
else
echo "${CWARNING}Nginx version does not exist! ${CEND}"
fi
else
echo "${CWARNING}input error! Upgrade Nginx version is the same as the old version${CEND}"
exit
fi
done

if [ -e "nginx-${NEW_nginx_ver}.tar.gz" ]; then
echo "[${CMSG}nginx-${NEW_nginx_ver}.tar.gz${CEND}] found"
if [ "${nginx_flag}" != 'y' ]; then
echo "Press Ctrl+c to cancel or Press any key to continue..."
char=get_char
fi
${nginx_install_dir}/sbin/nginx -V &> $$
nginx_configure_args_tmp=cat $$ | grep 'configure arguments:' | awk -F: '{print $2}'
rm -rf $$
nginx_configure_args=echo ${nginx_configure_args_tmp} | sed "s@lua-nginx-module-\w.\w\+.\w\+ @lua-nginx-module-${lua_nginx_module_ver} @" | sed "s@lua-nginx-module @lua-nginx-module-${lua_nginx_module_ver} @" | sed "s@--with-openssl=../openssl-\w.\w.\w\+ @--with-openssl=../openssl-${openssl11_ver} @" | sed "s@--with-pcre=../pcre-\w.\w\+ @--with-pcre=../pcre-${pcre_ver} @"
if [ -n "echo $nginx_configure_args | grep lua-nginx-module" ]; then
${oneinstack_dir}/upgrade.sh --oneinstack > /dev/null
src_url=${mirror_link}/luajit2-${luajit2_ver}.tar.gz && Download_src
tar xzf luajit2-${luajit2_ver}.tar.gz
pushd luajit2-${luajit2_ver}
make && make install
popd > /dev/null
rm -rf luajit2-${luajit2_ver}

  src_url=${mirror_link}/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}

  src_url=${mirror_link}/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

tar xzf ngx_cache_purge-2.3.tar.gz
# brotli -s
git clone https://github.com/google/ngx_brotli.git
pushd ngx_brotli
git submodule update --init
popd
mkdir /root/oneinstack/src/ngx_brotli/deps/brotli/out
pushd ngx_brotli/deps/brotli/out
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..
cmake --build . --config Release --target brotlienc
popd
# brotli -end

tar xzf nginx-${NEW_nginx_ver}.tar.gz
pushd nginx-${NEW_nginx_ver}
make clean
sed -i 's@CFLAGS="$CFLAGS -g"@#CFLAGS="$CFLAGS -g"@' auto/cc/gcc # close debug
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.1
./configure ${nginx_configure_args}
make -j ${THREAD}
if [ -f "objs/nginx" ]; then
  /bin/mv ${nginx_install_dir}/sbin/nginx{,`date +%m%d`}
  /bin/cp objs/nginx ${nginx_install_dir}/sbin/nginx
  kill -USR2 `cat /var/run/nginx.pid`
  sleep 1
  kill -QUIT `cat /var/run/nginx.pid.oldbin`
  popd > /dev/null
  echo "You have ${CMSG}successfully${CEND} upgrade from ${CWARNING}${OLD_nginx_ver}${CEND} to ${CWARNING}${NEW_nginx_ver}${CEND}"
  rm -rf nginx-${NEW_nginx_ver}
else
  echo "${CFAILURE}Upgrade Nginx failed! ${CEND}"
fi

fi
popd > /dev/null
}

ois-26313

Choose a tag to compare

@edutfree edutfree released this 13 Mar 16:13
994f190

ois-26313
websupport-sk/pecl-memcache#119

[PATCH] Use Zend/zend_smart_string.h

This is for version 8.2

--- src/memcache_pool.h.orig 2025-10-14 17:34:10
+++ src/memcache_pool.h 2025-10-14 17:37:39
@@ -42,7 +42,7 @@
#include <string.h>

#include "php.h"
-#include "ext/standard/php_smart_string_public.h"
+#include "Zend/zend_smart_string.h"
#include "memcache_queue.h"

/*
--- src/memcache_binary_protocol.c.orig 2025-10-14 17:46:52
+++ src/memcache_binary_protocol.c 2025-10-14 17:48:08
@@ -34,7 +34,6 @@
#include <netinet/in.h>
#endif
#include "memcache_pool.h"
-#include "ext/standard/php_smart_string.h"

#ifdef htonll
#undef htonll
--- src/memcache_ascii_protocol.c.orig 2025-10-14 17:52:52
+++ src/memcache_ascii_protocol.c 2025-10-14 17:53:17
@@ -24,7 +24,6 @@
#endif

#include "memcache_pool.h"
-#include "ext/standard/php_smart_string.h"

typedef struct mmc_ascii_request {
mmc_request_t base; /* enable cast to mmc_request_t */
--- src/memcache_pool.c.orig 2025-10-14 18:02:29
+++ src/memcache_pool.c 2025-10-14 18:05:30
@@ -34,8 +34,6 @@
#include "php_network.h"
#include "ext/standard/crc32.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_string.h"
-#include "ext/standard/php_smart_string.h"
#include "zend_smart_str.h"
#include "memcache_pool.h"

--- src/memcache_session.c.orig 2025-10-14 18:02:46
+++ src/memcache_session.c 2025-10-14 18:04:05
@@ -29,7 +29,7 @@
#include "php_variables.h"

#include "SAPI.h"
-#include "ext/standard/php_smart_string.h"
+#include "memcache_pool.h"
#include "ext/standard/url.h"
#include "ext/session/php_session.h"
#ifdef PHP_WIN32

This is for version 4.0.5.2

--- php7/memcache_pool.h.orig 2025-10-14 19:02:33
+++ php7/memcache_pool.h 2025-10-14 19:08:42
@@ -42,7 +42,11 @@
#include <string.h>

#include "php.h"
+#if PHP_VERSION_ID >= 70200
+#include "Zend/zend_smart_string.h"
+#elif
+#include "ext/standard/php_smart_string.h"
+#endif
-#include "ext/standard/php_smart_string_public.h"
#include "memcache_queue.h"

/*
--- php7/memcache_pool.c.orig 2025-10-14 19:03:56
+++ php7/memcache_pool.c 2025-10-14 19:08:42
@@ -34,8 +34,6 @@
#include "php_network.h"
#include "ext/standard/crc32.h"
#include "ext/standard/php_var.h"
-#include "ext/standard/php_string.h"
-#include "ext/standard/php_smart_string.h"
#include "zend_smart_str.h"
#include "memcache_pool.h"

--- php7/memcache_session.c.orig 2025-10-14 19:04:39
+++ php7/memcache_session.c 2025-10-14 19:08:42
@@ -29,7 +29,7 @@
#include "php_variables.h"

#include "SAPI.h"
+#include "memcache_pool.h"
-#include "ext/standard/php_smart_string.h"
#include "ext/standard/url.h"
#include "session/php_session.h"
#ifdef PHP_WIN32
--- php7/memcache_ascii_protocol.c.orig 2025-10-14 19:03:33
+++ php7/memcache_ascii_protocol.c 2025-10-14 19:08:42
@@ -24,7 +24,6 @@
#endif

#include "memcache_pool.h"
-#include "ext/standard/php_smart_string.h"

typedef struct mmc_ascii_request {
mmc_request_t base; /* enable cast to mmc_request_t */
--- php7/memcache_binary_protocol.c.orig 2025-10-14 19:03:41
+++ php7/memcache_binary_protocol.c 2025-10-14 19:08:42
@@ -34,7 +34,6 @@
#include <netinet/in.h>
#endif
#include "memcache_pool.h"
-#include "ext/standard/php_smart_string.h"

#ifdef htonll
#undef htonll

nono303/win-build-scripts@6fdc31e#diff-2bb6e5669fd98ec2f62e79c3b25fb3250765817df8dbeb7a23554fb4d710c88b

ois-2581

Choose a tag to compare

@edutfree edutfree released this 01 Aug 10:05
994f190

ois-2581

ois-251105

Choose a tag to compare

@edutfree edutfree released this 05 Nov 08:31
994f190

php8.4,nginx 1.29.3

ois-24.9.6

Choose a tag to compare

@edutfree edutfree released this 06 Sep 03:31
994f190

ois-24.9.6

ois-24.5.22

Choose a tag to compare

@edutfree edutfree released this 21 May 14:55
618893b

ois-24.5.22

nginx broti cgi_cache