Skip to content

Commit

Permalink
Update lnmp from OneinStack
Browse files Browse the repository at this point in the history
  • Loading branch information
bypanelcom committed May 30, 2020
1 parent 3b870b0 commit c02c027
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
4 changes: 2 additions & 2 deletions addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ pushd ${oneinstack_dir} > /dev/null

. ./include/fail2ban.sh

. include/ngx_lua_waf.sh
. ./include/ngx_lua_waf.sh

. include/panel.sh
. ./include/panel.sh

Show_Help() {
echo
Expand Down
5 changes: 5 additions & 0 deletions include/check_os.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ if [ ${CentOS_ver} -lt 6 >/dev/null 2>&1 ] || [ ${Debian_ver} -lt 8 >/dev/null 2
kill -9 $$
fi

command -v gcc > /dev/null 2>&1 || $PM -y install gcc
gcc_ver=$(gcc -dumpversion | awk -F. '{print $1}')

[ ${gcc_ver} -lt 5 >/dev/null 2>&1 ] && redis_ver=${redis_oldver}

LIBC_YN=$(awk -v A=$(getconf -a | grep GNU_LIBC_VERSION | awk '{print $NF}') -v B=2.14 'BEGIN{print(A>=B)?"0":"1"}')
[ ${LIBC_YN} == '0' ] && GLIBC_FLAG=linux-glibc_214 || GLIBC_FLAG=linux

Expand Down
4 changes: 1 addition & 3 deletions include/init_Ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ EOF
sysctl -p

sed -i 's@^ACTIVE_CONSOLES.*@ACTIVE_CONSOLES="/dev/tty[1-2]"@' /etc/default/console-setup
sed -i 's@^@#@g' /etc/init/tty[3-6].conf
locale-gen en_US.UTF-8
echo "en_US.UTF-8 UTF-8" > /var/lib/locales/supported.d/local
[ -d "/var/lib/locales/supported.d" ] && echo "en_US.UTF-8 UTF-8" > /var/lib/locales/supported.d/local
cat > /etc/default/locale << EOF
LANG=en_US.UTF-8
LANGUAGE=en_US:en
EOF
sed -i 's@^@#@g' /etc/init/control-alt-delete.conf

# Update time
if [ -e "$(which ntpdate)" ]; then
Expand Down
4 changes: 2 additions & 2 deletions include/pecl_xdebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Install_pecl_xdebug() {
phpExtensionDir=$(${php_install_dir}/bin/php-config --extension-dir)
PHP_detail_ver=$(${php_install_dir}/bin/php-config --version)
PHP_main_ver=${PHP_detail_ver%.*}
if [[ "${PHP_main_ver}" =~ ^5.[5-6]$|^7.[0-3]$ ]]; then
if [[ "${PHP_main_ver}" =~ ^7.[0-3]$ ]]; then
if [[ "${PHP_main_ver}" =~ ^5.[5-6]$|^7.[0-4]$ ]]; then
if [[ "${PHP_main_ver}" =~ ^7.[0-4]$ ]]; then
src_url=https://pecl.php.net/get/xdebug-${xdebug_ver}.tgz && Download_src
tar xzf xdebug-${xdebug_ver}.tgz
pushd xdebug-${xdebug_ver} > /dev/null
Expand Down
2 changes: 1 addition & 1 deletion include/upgrade_redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Upgrade_Redis() {
[ ! -d "$redis_install_dir" ] && echo "${CWARNING}Redis is not installed on your system! ${CEND}" && exit 1
OLD_redis_ver=`$redis_install_dir/bin/redis-cli --version | awk '{print $2}'`
Latest_redis_ver=`curl --connect-timeout 2 -m 3 -s https://download.redis.io/redis-stable/00-RELEASENOTES | awk '/Released/{print $2}' | head -1`
Latest_redis_ver=${Latest_redis_ver:-5.0.2}
Latest_redis_ver=${Latest_redis_ver:-6.0.4}
echo "Current Redis Version: ${CMSG}$OLD_redis_ver${CEND}"
while :; do echo
[ "${redis_flag}" != 'y' ] && read -e -p "Please input upgrade Redis Version(default: ${Latest_redis_ver}): " NEW_redis_ver
Expand Down
15 changes: 8 additions & 7 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ openssl_ver=1.0.2u

tomcat9_ver=9.0.35
tomcat8_ver=8.5.55
tomcat7_ver=7.0.103
tomcat7_ver=7.0.104
tomcat6_ver=6.0.53

apache24_ver=2.4.43
Expand Down Expand Up @@ -67,7 +67,7 @@ icu4c_ver=63_1
libsodium_ver=1.0.18
libzip_ver=1.2.0
argon2_ver=20171227
imagemagick_ver=7.0.10-13
imagemagick_ver=7.0.10-15
imagick_ver=3.4.4
graphicsmagick_ver=1.3.34
gmagick_ver=2.0.5RC1
Expand All @@ -81,16 +81,17 @@ phalcon_ver=4.0.4
phalcon_oldver=3.4.5
yaf_ver=3.0.9
yar_ver=2.0.7
swoole_ver=4.4.16
swoole_ver=4.5.2
swoole_oldver=1.10.5
xdebug_ver=2.9.2
xdebug_ver=2.9.5
xdebug_oldver=2.5.5

# Ftp
pureftpd_ver=1.0.49

# Redis
redis_ver=5.0.9
redis_ver=6.0.4
redis_oldver=5.0.9
pecl_redis_ver=5.2.2
pecl_redis_oldver=4.3.0

Expand Down Expand Up @@ -122,6 +123,6 @@ boost_oldver=1.59.0
htop_ver=2.2.0
bison_ver=2.7.1
python_ver=3.6.10
setuptools_ver=46.0.0
pip_ver=20.0.2
setuptools_ver=47.1.1
pip_ver=20.1.1
fail2ban_ver=0.11.1

0 comments on commit c02c027

Please sign in to comment.