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 Aug 23, 2020
1 parent 1bb3fd1 commit e597aae
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 34 deletions.
2 changes: 1 addition & 1 deletion include/check_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ checkDownload() {
# Percona 8.0
if [ "${dbinstallmethod}" == '1' ]; then
echo "Download Percona 8.0 binary package..."
FILE_NAME=Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
FILE_NAME=Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12.tar.gz
DOWN_ADDR_PERCONA=https://www.percona.com/downloads/Percona-Server-8.0/Percona-Server-${percona80_ver}/binary/tarball
elif [ "${dbinstallmethod}" == '2' ]; then
echo "Download Percona 8.0 source package..."
Expand Down
1 change: 1 addition & 0 deletions include/jdk-1.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Install_JDK16() {
[ ! -e ${JAVA_dir} ] && mkdir -p ${JAVA_dir}
/bin/cp -R ${JDK_NAME} ${JAVA_dir}
if [ -d "${JDK_PATH}" ]; then
chown -R ${run_user}.${run_user} ${JDK_PATH}
[ -z "`grep ^'export JAVA_HOME=' /etc/profile`" ] && { [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export JAVA_HOME=${JDK_PATH}" >> /etc/profile || sed -i "s@^export PATH=@export JAVA_HOME=${JDK_PATH}\nexport PATH=@" /etc/profile; } || sed -i "s@^export JAVA_HOME=.*@export JAVA_HOME=${JDK_PATH}@" /etc/profile
[ -z "`grep ^'export CLASSPATH=' /etc/profile`" ] && sed -i "s@export JAVA_HOME=\(.*\)@export JAVA_HOME=\1\nexport CLASSPATH=\$JAVA_HOME/lib/tools.jar:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib@" /etc/profile
[ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep '$JAVA_HOME/bin' /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=\$JAVA_HOME/bin:\1@" /etc/profile
Expand Down
1 change: 1 addition & 0 deletions include/jdk-1.7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Install_JDK17() {
[ ! -e ${JAVA_dir} ] && mkdir -p ${JAVA_dir}
tar xzf ${JDK_FILE} -C ${JAVA_dir}
if [ -d "${JDK_PATH}" ]; then
chown -R ${run_user}.${run_user} ${JDK_PATH}
/bin/cp ${JDK_PATH}/jre/lib/security/cacerts /etc/ssl/certs/java
[ -z "`grep ^'export JAVA_HOME=' /etc/profile`" ] && { [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export JAVA_HOME=${JDK_PATH}" >> /etc/profile || sed -i "s@^export PATH=@export JAVA_HOME=${JDK_PATH}\nexport PATH=@" /etc/profile; } || sed -i "s@^export JAVA_HOME=.*@export JAVA_HOME=${JDK_PATH}@" /etc/profile
[ -z "`grep ^'export CLASSPATH=' /etc/profile`" ] && sed -i "s@export JAVA_HOME=\(.*\)@export JAVA_HOME=\1\nexport CLASSPATH=\$JAVA_HOME/lib/tools.jar:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib@" /etc/profile
Expand Down
1 change: 1 addition & 0 deletions include/jdk-1.8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Install_JDK18() {
[ ! -e ${JAVA_dir} ] && mkdir -p ${JAVA_dir}
tar xzf ${JDK_FILE} -C ${JAVA_dir}
if [ -d "${JDK_PATH}" ]; then
chown -R ${run_user}.${run_user} ${JDK_PATH}
/bin/cp ${JDK_PATH}/jre/lib/security/cacerts /etc/ssl/certs/java
[ -z "`grep ^'export JAVA_HOME=' /etc/profile`" ] && { [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export JAVA_HOME=${JDK_PATH}" >> /etc/profile || sed -i "s@^export PATH=@export JAVA_HOME=${JDK_PATH}\nexport PATH=@" /etc/profile; } || sed -i "s@^export JAVA_HOME=.*@export JAVA_HOME=${JDK_PATH}@" /etc/profile
[ -z "`grep ^'export CLASSPATH=' /etc/profile`" ] && sed -i "s@export JAVA_HOME=\(.*\)@export JAVA_HOME=\1\nexport CLASSPATH=\$JAVA_HOME/lib/tools.jar:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib@" /etc/profile
Expand Down
1 change: 1 addition & 0 deletions include/jdk-11.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Install_JDK110() {
[ ! -e ${JAVA_dir} ] && mkdir -p ${JAVA_dir}
tar xzf ${JDK_FILE} -C ${JAVA_dir}
if [ -d "${JDK_PATH}" ]; then
chown -R ${run_user}.${run_user} ${JDK_PATH}
/bin/cp ${JDK_PATH}/jre/lib/security/cacerts /etc/ssl/certs/java
[ -z "`grep ^'export JAVA_HOME=' /etc/profile`" ] && { [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export JAVA_HOME=${JDK_PATH}" >> /etc/profile || sed -i "s@^export PATH=@export JAVA_HOME=${JDK_PATH}\nexport PATH=@" /etc/profile; } || sed -i "s@^export JAVA_HOME=.*@export JAVA_HOME=${JDK_PATH}@" /etc/profile
[ -z "`grep ^'export CLASSPATH=' /etc/profile`" ] && sed -i "s@export JAVA_HOME=\(.*\)@export JAVA_HOME=\1\nexport CLASSPATH=\$JAVA_HOME/lib/tools.jar:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib@" /etc/profile
Expand Down
8 changes: 4 additions & 4 deletions include/percona-8.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ Install_Percona80() {
mkdir -p ${percona_data_dir};chown mysql.mysql -R ${percona_data_dir}

if [ "${dbinstallmethod}" == "1" ]; then
tar xzf ./Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.${sslLibVer}.tar.gz
mv Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.${sslLibVer}/* ${percona_install_dir}
tar xzf ./Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12.tar.gz
mv Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12/* ${percona_install_dir}
sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
sed -i "s@/usr/local/Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.${sslLibVer}@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
sed -i "s@/usr/local/Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12@${percona_install_dir}@g" ${percona_install_dir}/bin/mysqld_safe
sed -i 's@executing mysqld_safe@executing mysqld_safe\nexport LD_PRELOAD=/usr/local/lib/libjemalloc.so@' ${percona_install_dir}/bin/mysqld_safe
elif [ "${dbinstallmethod}" == "2" ]; then
boostVersion2=$(echo ${boost_percona_ver} | awk -F. '{print $1"_"$2"_"$3}')
Expand Down Expand Up @@ -57,7 +57,7 @@ Install_Percona80() {
sed -i "s+^dbrootpwd.*+dbrootpwd='${dbrootpwd}'+" ../options.conf
echo "${CSUCCESS}Percona installed successfully! ${CEND}"
if [ "${dbinstallmethod}" == "1" ]; then
rm -rf Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.${sslLibVer}
rm -rf Percona-Server-${percona80_ver}-Linux.${SYS_BIT_b}.glibc2.12
elif [ "${dbinstallmethod}" == "2" ]; then
rm -rf percona-server-${percona80_ver} boost_${boostVersion2}
fi
Expand Down
2 changes: 1 addition & 1 deletion include/php-5.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Install_PHP53() {
--with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
fi
{ [ ${Debian_ver} -ge 10 >/dev/null 2>&1 ] || [ ${Ubuntu_ver} -ge 19 >/dev/null 2>&1 ]; } || sed -i '/^BUILD_/ s/\$(CC)/\$(CXX)/g' Makefile
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-5.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Install_PHP54() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --with-xsl ${intl_modules_options} \
--with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-5.5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Install_PHP55() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --with-xsl ${intl_modules_options} \
--with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-5.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Install_PHP56() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --with-xsl ${intl_modules_options} \
--with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-7.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Install_PHP70() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --with-xsl ${intl_modules_options} \
--with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-7.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Install_PHP71() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
--with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-7.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Install_PHP72() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
--with-gettext --enable-zip --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-7.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Install_PHP73() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
--with-gettext --enable-zip --without-libzip --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
2 changes: 1 addition & 1 deletion include/php-7.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Install_PHP74() {
--with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
--with-gettext --with-zip=/usr/local --enable-soap --disable-debug ${php_modules_options}
fi
make -j ${THREAD}
make ZEND_EXTRA_LIBS='-liconv' -j ${THREAD}
make install

if [ -e "${php_install_dir}/bin/phpize" ]; then
Expand Down
6 changes: 5 additions & 1 deletion include/upgrade_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ Upgrade_DB() {
else
perconaVerStr1=${NEW_db_ver}
fi
DB_filename=Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}
if [[ "`echo ${NEW_db_ver} | awk -F. '{print $1"."$2}'`" =~ ^8.0$ ]]; then
DB_filename=Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.glibc2.12
else
DB_filename=Percona-Server-${perconaVerStr1}-Linux.${SYS_BIT_b}.${sslLibVer}
fi
DB_URL=https://www.percona.com/downloads/Percona-Server-`echo ${NEW_db_ver} | awk -F. '{print $1"."$2}'`/Percona-Server-${NEW_db_ver}/binary/tarball/${DB_filename}.tar.gz
elif [ "${DB}" == 'MySQL' ]; then
DB_filename=mysql-${NEW_db_ver}-linux-glibc2.12-${SYS_BIT_b}
Expand Down
2 changes: 1 addition & 1 deletion include/upgrade_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Upgrade_OpenResty() {
${openresty_install_dir}/nginx/sbin/nginx -V &> $$
./configure --prefix=${openresty_install_dir} --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-${openssl11_ver} --with-pcre=../pcre-${pcre_ver} --with-pcre-jit --with-ld-opt='-ljemalloc -Wl,-u,pcre_version' ${nginx_modules_options}
make -j ${THREAD}
if [ -f "build/nginx-${openresty_ver_tmp}/objs/nginx" ]; then
if [ -f "build/nginx-${NEW_openresy_ver%.*}/objs/nginx" ]; then
/bin/mv ${openresty_install_dir}/nginx/sbin/nginx{,`date +%m%d`}
make install
kill -USR2 `cat /var/run/nginx.pid`
Expand Down
36 changes: 18 additions & 18 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Web
nginx_ver=1.18.0
tengine_ver=2.3.2
openresty_ver=1.17.8.1
openresty_ver=1.17.8.2
openssl11_ver=1.1.1g
openssl_ver=1.0.2u

Expand All @@ -11,27 +11,27 @@ tomcat8_ver=8.5.57
tomcat7_ver=7.0.105
tomcat6_ver=6.0.53

apache24_ver=2.4.43
apache24_ver=2.4.46
apache22_ver=2.2.34
pcre_ver=8.44
apr_ver=1.7.0
apr_util_ver=1.6.1
nghttp2_ver=1.41.0

# DB
mysql80_ver=8.0.20
mysql57_ver=5.7.30
mysql56_ver=5.6.48
mysql80_ver=8.0.21
mysql57_ver=5.7.31
mysql56_ver=5.6.49
mysql55_ver=5.5.62

mariadb105_ver=10.5.4
mariadb104_ver=10.4.13
mariadb103_ver=10.3.23
mariadb105_ver=10.5.5
mariadb104_ver=10.4.14
mariadb103_ver=10.3.24
mariadb55_ver=5.5.68

percona80_ver=8.0.19-10
percona80_ver=8.0.20-11
percona57_ver=5.7.30-33
percona56_ver=5.6.48-88.0
percona56_ver=5.6.49-89.0
percona55_ver=5.5.62-38.14

alisql_ver=5.6.32-9
Expand All @@ -53,9 +53,9 @@ php55_ver=5.5.38
php56_ver=5.6.40
php70_ver=7.0.33
php71_ver=7.1.33
php72_ver=7.2.32
php73_ver=7.3.20
php74_ver=7.4.8
php72_ver=7.2.33
php73_ver=7.3.21
php74_ver=7.4.9

libiconv_ver=1.16
curl_ver=7.71.1
Expand All @@ -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-23
imagemagick_ver=7.0.10-28
imagick_ver=3.4.4
graphicsmagick_ver=1.3.34
gmagick_ver=2.0.5RC1
Expand All @@ -90,7 +90,7 @@ xdebug_oldver=2.5.5
pureftpd_ver=1.0.49

# Redis
redis_ver=6.0.5
redis_ver=6.0.6
redis_oldver=5.0.9
pecl_redis_ver=5.3.1
pecl_redis_oldver=4.3.0
Expand Down Expand Up @@ -122,7 +122,7 @@ boost_oldver=1.59.0
# Others
htop_ver=2.2.0
bison_ver=2.7.1
python_ver=3.6.10
setuptools_ver=47.1.1
pip_ver=20.1.1
python_ver=3.6.11
setuptools_ver=49.2.1
pip_ver=20.2.1
fail2ban_ver=0.11.1

0 comments on commit e597aae

Please sign in to comment.