diff --git a/plugins/dynamic-tracking/install.sh b/plugins/dynamic-tracking/install.sh index cb09950504..16d62325e2 100755 --- a/plugins/dynamic-tracking/install.sh +++ b/plugins/dynamic-tracking/install.sh @@ -51,6 +51,9 @@ Install_App() fi # FlameGraph end + # apt install linux-tools-$(uname -r) linux-tools-generic -y + # apt install linux-tools-$(uname -r) linux-tools-generic -y --fix-missing + shell_file=${curPath}/versions/${OSNAME}.sh diff --git a/plugins/mysql-apt/conf/my9.1.cnf b/plugins/mysql-apt/conf/my9.1.cnf new file mode 100644 index 0000000000..1b7ff7b943 --- /dev/null +++ b/plugins/mysql-apt/conf/my9.1.cnf @@ -0,0 +1,103 @@ +[client] +user = root +#password = your_password +port = 33206 +socket = {$SERVER_APP_PATH}/mysql.sock +default-character-set = UTF8MB4 + +[mysqld] +!include {$SERVER_APP_PATH}/etc/mode/classic.cnf + +authentication_policy=caching_sha2_password +pid-file = {$SERVER_APP_PATH}/data/mysql.pid +user = mysql +port = 33206 +mysqlx_port = 33260 +socket = {$SERVER_APP_PATH}/mysql.sock +datadir = {$SERVER_APP_PATH}/data +log-error = {$SERVER_APP_PATH}/data/error.log +server-id = {$SERVER_ID} + +default_storage_engine = InnoDB + +key_buffer_size = 8M +table_open_cache = 32 +sort_buffer_size = 256K +net_buffer_length = 4K +read_buffer_size = 128K +read_rnd_buffer_size = 256K +myisam_sort_buffer_size = 4M +thread_cache_size = 4 +lower_case_table_names=1 +tmp_table_size = 8M +character-set-server = UTF8MB4 + +max_connections = 500 +max_connect_errors = 100 +open_files_limit = 2560 +max_allowed_packet = 128M + +#skip-external-locking +#skip-grant-tables +#loose-skip-innodb +#skip-networking +#skip-name-resolve + +log-bin=mysql-bin +slow_query_log=1 +slow-query-log-file={$SERVER_APP_PATH}/data/mysql-slow.log +long_query_time=3 +#log_queries_not_using_indexes=on + +relay-log=mdserver +relay-log-index=mdserver + +#master +#sync_binlog=1 + +#binlog-do-db +binlog-ignore-db = test +binlog-ignore-db = mysql +binlog-ignore-db = information_schema +binlog-ignore-db = performance_schema + +#slave +log_replica_updates +#replicate-do-db +replica_skip_errors=1062,1396 +replicate-ignore-db = information_schema +replicate-ignore-db = performance_schema +replicate-ignore-db = mysql +replicate-ignore-db = test + +default_storage_engine = InnoDB +innodb_data_home_dir = {$SERVER_APP_PATH}/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_group_home_dir = {$SERVER_APP_PATH}/data +innodb_buffer_pool_size = 16M +innodb_redo_log_capacity=10485760 +innodb_log_buffer_size = 8M +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 120 +innodb_max_dirty_pages_pct = 90 +innodb_read_io_threads = 1 +innodb_write_io_threads = 1 +innodb_file_per_table=1 +binlog_expire_logs_seconds=2592000 + +secure-file-priv={$SERVER_APP_PATH}/tmp + +[mysqldump] +quick + +[mysql] +no-auto-rehash + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[mysqlhotcopy] +interactive-timeout \ No newline at end of file diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index 7a4c242dd0..4b9f03c7e5 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -400,7 +400,7 @@ def getShowLogFile(): return tmp.groups()[0].strip() def getMdb8Ver(): - return ['8.0','8.1','8.2','8.3','8.4','9.0'] + return ['8.0','8.1','8.2','8.3','8.4','9.0','9.1'] def pGetDbUser(): if mw.isAppleSystem(): @@ -419,8 +419,8 @@ def initMysql57Data(): cmd = serverdir + '/bin/usr/sbin/mysqld --basedir=' + serverdir + '/bin/usr --datadir=' + \ datadir + ' --initialize-insecure --explicit_defaults_for_timestamp' data = mw.execShell(cmd) - # print(cmd) - # print(data) + if data[1].lower().find('error') != -1: + exit("Init MySQL5.7 Data Error:"+data[1]) if not mw.isAppleSystem(): mw.execShell('chown -R mysql:mysql ' + datadir) @@ -447,8 +447,10 @@ def initMysql8Data(): cmd = serverdir + '/bin/usr/sbin/mysqld --basedir=' + serverdir + '/bin/usr --datadir=' + datadir + \ ' --initialize-insecure --lower-case-table-names=1' data = mw.execShell(cmd) - if data[1].find('ERROR') != -1: - exit("Init MySQL{} Data Error".format(8)) + if data[1].lower().find('error') != -1: + exit("Init MySQL8+ Data Error:"+data[1]) + if data[1].lower().find('not found') != -1: + exit("Init MySQL8+ Data Error:"+data[1]) if not mw.isAppleSystem(): mw.execShell('chown -R mysql:mysql ' + datadir) diff --git a/plugins/mysql-apt/init.d/mysql5.7.service.tpl b/plugins/mysql-apt/init.d/mysql5.7.service.tpl index 52654c8bfd..e9c46ad414 100644 --- a/plugins/mysql-apt/init.d/mysql5.7.service.tpl +++ b/plugins/mysql-apt/init.d/mysql5.7.service.tpl @@ -26,19 +26,19 @@ Description=MySQL Community Server After=network.target -[Install] -WantedBy=multi-user.target - [Service] User=mysql Group=mysql -Type=forking +Type=simple PermissionsStartOnly=true -#ExecStartPre=/usr/share/mysql/mysql-systemd-start pre -ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf --daemonize +#ExecStartPre={$SERVER_PATH}/mysql-apt/bin/usr/share/mysql/mysql-systemd-start pre +ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf TimeoutSec=600 LimitNOFILE = 5000 Restart=on-failure RestartPreventExitStatus=1 RuntimeDirectory=mysqld RuntimeDirectoryMode=755 + +[Install] +WantedBy=multi-user.target diff --git a/plugins/mysql-apt/init.d/mysql8.0.service.tpl b/plugins/mysql-apt/init.d/mysql8.0.service.tpl index dcdca9d0e6..8dacece560 100644 --- a/plugins/mysql-apt/init.d/mysql8.0.service.tpl +++ b/plugins/mysql-apt/init.d/mysql8.0.service.tpl @@ -37,7 +37,7 @@ Group=mysql Type=notify #ExecStartPre=+/usr/share/mysql-8.0/mysql-systemd-start pre ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf -TimeoutSec=0 +TimeoutSec=600 LimitNOFILE = 10000 Restart=on-failure RestartPreventExitStatus=1 diff --git a/plugins/mysql-apt/init.d/mysql8.1.service.tpl b/plugins/mysql-apt/init.d/mysql8.1.service.tpl index dcdca9d0e6..8dacece560 100644 --- a/plugins/mysql-apt/init.d/mysql8.1.service.tpl +++ b/plugins/mysql-apt/init.d/mysql8.1.service.tpl @@ -37,7 +37,7 @@ Group=mysql Type=notify #ExecStartPre=+/usr/share/mysql-8.0/mysql-systemd-start pre ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf -TimeoutSec=0 +TimeoutSec=600 LimitNOFILE = 10000 Restart=on-failure RestartPreventExitStatus=1 diff --git a/plugins/mysql-apt/init.d/mysql8.2.service.tpl b/plugins/mysql-apt/init.d/mysql8.2.service.tpl index dcdca9d0e6..8dacece560 100644 --- a/plugins/mysql-apt/init.d/mysql8.2.service.tpl +++ b/plugins/mysql-apt/init.d/mysql8.2.service.tpl @@ -37,7 +37,7 @@ Group=mysql Type=notify #ExecStartPre=+/usr/share/mysql-8.0/mysql-systemd-start pre ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf -TimeoutSec=0 +TimeoutSec=600 LimitNOFILE = 10000 Restart=on-failure RestartPreventExitStatus=1 diff --git a/plugins/mysql-apt/init.d/mysql8.3.service.tpl b/plugins/mysql-apt/init.d/mysql8.3.service.tpl index dcdca9d0e6..8dacece560 100644 --- a/plugins/mysql-apt/init.d/mysql8.3.service.tpl +++ b/plugins/mysql-apt/init.d/mysql8.3.service.tpl @@ -37,7 +37,7 @@ Group=mysql Type=notify #ExecStartPre=+/usr/share/mysql-8.0/mysql-systemd-start pre ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf -TimeoutSec=0 +TimeoutSec=600 LimitNOFILE = 10000 Restart=on-failure RestartPreventExitStatus=1 diff --git a/plugins/mysql-apt/init.d/mysql8.4.service.tpl b/plugins/mysql-apt/init.d/mysql8.4.service.tpl index e6e6896925..a0a8924936 100644 --- a/plugins/mysql-apt/init.d/mysql8.4.service.tpl +++ b/plugins/mysql-apt/init.d/mysql8.4.service.tpl @@ -36,7 +36,7 @@ User=mysql Group=mysql Type=notify ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf -TimeoutSec=0 +TimeoutSec=600 LimitNOFILE = 10000 Restart=on-failure RestartPreventExitStatus=1 diff --git a/plugins/mysql-apt/init.d/mysql9.0.service.tpl b/plugins/mysql-apt/init.d/mysql9.0.service.tpl index e6e6896925..a0a8924936 100644 --- a/plugins/mysql-apt/init.d/mysql9.0.service.tpl +++ b/plugins/mysql-apt/init.d/mysql9.0.service.tpl @@ -36,7 +36,7 @@ User=mysql Group=mysql Type=notify ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf -TimeoutSec=0 +TimeoutSec=600 LimitNOFILE = 10000 Restart=on-failure RestartPreventExitStatus=1 diff --git a/plugins/mysql-apt/init.d/mysql9.1.service.tpl b/plugins/mysql-apt/init.d/mysql9.1.service.tpl new file mode 100644 index 0000000000..a0a8924936 --- /dev/null +++ b/plugins/mysql-apt/init.d/mysql9.1.service.tpl @@ -0,0 +1,49 @@ +# Copyright (c) 2015, 2022, Oracle and/or its affiliates. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License, version 2.0, for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# MySQL systemd service file + +[Unit] +Description=MySQL Community Server +Documentation=man:mysqld(8) +Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html +After=network.target + +[Install] +WantedBy=multi-user.target + +[Service] +User=mysql +Group=mysql +Type=notify +ExecStart={$SERVER_PATH}/mysql-apt/bin/usr/sbin/mysqld --defaults-file={$SERVER_PATH}/mysql-apt/etc/my.cnf +TimeoutSec=600 +LimitNOFILE = 10000 +Restart=on-failure +RestartPreventExitStatus=1 + +# Always restart when mysqld exits with exit code of 16. This special exit code +# is used by mysqld for RESTART SQL. +RestartForceExitStatus=16 + +# Set enviroment variable MYSQLD_PARENT_PID. This is required for restart. +Environment=MYSQLD_PARENT_PID=1 diff --git a/plugins/mysql-apt/install.sh b/plugins/mysql-apt/install.sh index db63dcd326..592dca39bb 100755 --- a/plugins/mysql-apt/install.sh +++ b/plugins/mysql-apt/install.sh @@ -9,6 +9,9 @@ serverPath=$(dirname "$rootPath") # https://downloads.mysql.com/archives/community/ +# /www/server/mysql-apt/bin/usr/sbin/mysqld --basedir=/www/server/mysql-apt/bin/usr --datadir=/www/server/mysql-apt/data --initialize-insecure --explicit_defaults_for_timestamp + + # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.0 # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh uninstall 8.0 # cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 5.7 diff --git a/plugins/mysql-apt/versions/5.7/install.sh b/plugins/mysql-apt/versions/5.7/install.sh index 46ec670edf..1d2a70c432 100755 --- a/plugins/mysql-apt/versions/5.7/install.sh +++ b/plugins/mysql-apt/versions/5.7/install.sh @@ -8,8 +8,10 @@ export DEBIAN_FRONTEND=noninteractive # https://downloads.mysql.com/archives/community/ # debug -# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.0 +# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 5.7 +# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 5.7 # /www/server/mysql-apt/bin/usr/sbin/mysqld --defaults-file=/www/server/mysql-apt/etc/my.cnf --daemonize +# /www/server/mysql-apt/bin/usr/bin/mysql -S /www/server/mysql-apt/mysql.sock -uroot -p curPath=`pwd` rootPath=$(dirname "$curPath") diff --git a/plugins/mysql-apt/versions/8.0/install.sh b/plugins/mysql-apt/versions/8.0/install.sh index 582e3aab50..75ab8ab167 100755 --- a/plugins/mysql-apt/versions/8.0/install.sh +++ b/plugins/mysql-apt/versions/8.0/install.sh @@ -20,6 +20,7 @@ OSNAME=`cat ${rootPath}/data/osname.pl` VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.0 +# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.0 # 暂时debian12没有标准版,先用11使用 # if [ "$OSNAME" == 'debian' ] && [ "$VERSION_ID" == '12' ] ;then diff --git a/plugins/mysql-apt/versions/8.4/install.sh b/plugins/mysql-apt/versions/8.4/install.sh index 39f2195e3c..dfcd789980 100755 --- a/plugins/mysql-apt/versions/8.4/install.sh +++ b/plugins/mysql-apt/versions/8.4/install.sh @@ -19,13 +19,12 @@ bash ${rootPath}/scripts/getos.sh OSNAME=`cat ${rootPath}/data/osname.pl` VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` -# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.0 +# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 8.4 +# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 8.4 -# 暂时debian12没有标准版,先用11使用 -# if [ "$OSNAME" == 'debian' ] && [ "$VERSION_ID" == '12' ] ;then -# echo "暂时不支持该${OSNAME}${VERSION_ID}" -# exit 1 -# fi +if [ "$OSNAME" == 'debian' ] && [ "$VERSION_ID" -lt '12' ] ;then + VERSION_ID="12" +fi ARCH="amd64" @@ -111,7 +110,7 @@ Install_mysql() if [ "$?" == "0" ];then mkdir -p $serverPath/mysql-apt echo '8.4' > $serverPath/mysql-apt/version.pl - echo '安装完成' > + echo '安装完成' else echo '8.4' > $serverPath/mysql-apt/version.pl echo "暂时不支持该系统" diff --git a/plugins/mysql-apt/versions/9.0/install.sh b/plugins/mysql-apt/versions/9.0/install.sh index d3325da981..874522d9d4 100755 --- a/plugins/mysql-apt/versions/9.0/install.sh +++ b/plugins/mysql-apt/versions/9.0/install.sh @@ -22,10 +22,9 @@ VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk - # cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 9.0 # 暂时debian12没有标准版,先用11使用 -# if [ "$OSNAME" == 'debian' ] && [ "$VERSION_ID" == '12' ] ;then -# echo "暂时不支持该${OSNAME}${VERSION_ID}" -# exit 1 -# fi +if [ "$OSNAME" == 'debian' ] && [ "$VERSION_ID" -lt '12' ] ;then + VERSION_ID="12" +fi ARCH="amd64" diff --git a/plugins/mysql-apt/versions/9.1/install.sh b/plugins/mysql-apt/versions/9.1/install.sh index 523960aa0c..27d3460981 100755 --- a/plugins/mysql-apt/versions/9.1/install.sh +++ b/plugins/mysql-apt/versions/9.1/install.sh @@ -19,13 +19,16 @@ bash ${rootPath}/scripts/getos.sh OSNAME=`cat ${rootPath}/data/osname.pl` VERSION_ID=`cat /etc/*-release | grep VERSION_ID | awk -F = '{print $2}' | awk -F "\"" '{print $2}'` -# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 9.0 +# cd /www/server/mdserver-web && python3 /www/server/mdserver-web/plugins/mysql-apt/index.py start 9.1 +# cd /www/server/mdserver-web/plugins/mysql-apt && bash install.sh install 9.1 -# 暂时debian12没有标准版,先用11使用 -# if [ "$OSNAME" == 'debian' ] && [ "$VERSION_ID" == '12' ] ;then -# echo "暂时不支持该${OSNAME}${VERSION_ID}" -# exit 1 -# fi +#x-faq +# strings /lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIB + +# debian12 +if [ "$OSNAME" == 'debian' ] && [ "$VERSION_ID" -lt '12' ] ;then + VERSION_ID="12" +fi ARCH="amd64" @@ -53,6 +56,9 @@ SUFFIX_NAME=${MYSQL_VER}-1${OSNAME}${VERSION_ID}_${ARCH} APT_INSTALL() { + +cd ${rootPath}/plugins/php/lib && /bin/bash openssl_30.sh + ######## mkdir -p $myDir mkdir -p $serverPath/mysql-apt/bin @@ -110,10 +116,10 @@ Install_mysql() if [ "$?" == "0" ];then mkdir -p $serverPath/mysql-apt - echo '9.0' > $serverPath/mysql-apt/version.pl + echo '9.1' > $serverPath/mysql-apt/version.pl echo '安装完成' else - echo '9.0' > $serverPath/mysql-apt/version.pl + echo '9.1' > $serverPath/mysql-apt/version.pl echo "暂时不支持该系统" fi } diff --git a/plugins/mysql/conf/my9.1.cnf b/plugins/mysql/conf/my9.1.cnf new file mode 100644 index 0000000000..5a42de1cc9 --- /dev/null +++ b/plugins/mysql/conf/my9.1.cnf @@ -0,0 +1,113 @@ +[client] +user = root +#password = your_password +port = 3306 +socket = {$SERVER_APP_PATH}/mysql.sock +default-character-set = UTF8MB4 + +[mysqld] +!include {$SERVER_APP_PATH}/etc/mode/classic.cnf + +authentication_policy=caching_sha2_password +pid-file = {$SERVER_APP_PATH}/data/mysql.pid +user = mysql +port = 3306 +socket = {$SERVER_APP_PATH}/mysql.sock +basedir = {$SERVER_APP_PATH} +datadir = {$SERVER_APP_PATH}/data +log-error = {$SERVER_APP_PATH}/data/error.log +server-id = {$SERVER_ID} +#sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + +default_storage_engine = InnoDB + +key_buffer_size = 8M +table_open_cache = 32 +sort_buffer_size = 256K +net_buffer_length = 4K +read_buffer_size = 128K +read_rnd_buffer_size = 256K +myisam_sort_buffer_size = 4M +thread_cache_size = 4 +lower_case_table_names=0 +tmp_table_size = 8M +character-set-server = UTF8MB4 + +max_connections = 500 +max_connect_errors = 100 +open_files_limit = 2560 +max_allowed_packet = 128M + +skip_name_resolve=1 +#skip-networking +#skip-external-locking +#loose-skip-innodb +#skip-grant-tables + +log-bin=mysql-bin +slow_query_log=1 +slow-query-log-file={$SERVER_APP_PATH}/data/mysql-slow.log +long_query_time=10 +#log_queries_not_using_indexes=1 +#log_slow_admin_statements=1 +#log_slow_replica_statements=1 +binlog_expire_logs_seconds=2592000 + +relay-log=mdserver +relay-log-index=mdserver + +#多主设置 +#auto_increment_offset=2 +#auto_increment_increment=2 + +#master +#sync_binlog=1 + +#binlog-do-db +binlog-ignore-db = test +binlog-ignore-db = mysql +binlog-ignore-db = information_schema +binlog-ignore-db = performance_schema + +#slave +log_replica_updates = 1 +# Prevent replication from starting automatically with MySQL +#skip_replica_start = 1 +#replicate-do-db +replica_skip_errors=1062,1396 +replicate-ignore-db = information_schema +replicate-ignore-db = performance_schema +replicate-ignore-db = mysql +replicate-ignore-db = test + + +innodb_data_home_dir = {$SERVER_APP_PATH}/data +innodb_data_file_path = ibdata1:10M:autoextend +innodb_log_group_home_dir = {$SERVER_APP_PATH}/data +innodb_buffer_pool_size = 16M +#innodb_log_file_size = 5M +innodb_redo_log_capacity=10485760 +innodb_log_buffer_size = 8M +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 120 +innodb_max_dirty_pages_pct = 90 +innodb_read_io_threads = 1 +innodb_write_io_threads = 1 +innodb_file_per_table=1 + +secure-file-priv={$SERVER_APP_PATH}/tmp + +[mysqldump] +quick + +[mysql] +no-auto-rehash + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[mysqlhotcopy] +interactive-timeout \ No newline at end of file diff --git a/plugins/php/lib/icu.sh b/plugins/php/lib/icu.sh index 7c8c039c7a..b635f5ff87 100644 --- a/plugins/php/lib/icu.sh +++ b/plugins/php/lib/icu.sh @@ -44,7 +44,7 @@ if [ ! -d ${SERVER_ROOT}/icu ];then # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/icu/lib if [ -d /etc/ld.so.conf.d ];then echo "/www/server/lib/icu/lib" > /etc/ld.so.conf.d/mw-icu.conf - elif [[ -f /etc/ld.so.conf ]]; then + elif [ -f /etc/ld.so.conf ]; then echo "/www/server/lib/icu/lib" >> /etc/ld.so.conf fi diff --git a/plugins/php/lib/openssl.sh b/plugins/php/lib/openssl.sh index 7cd4a89c5e..ba4802dec6 100644 --- a/plugins/php/lib/openssl.sh +++ b/plugins/php/lib/openssl.sh @@ -7,6 +7,7 @@ rootPath=$(dirname "$curPath") rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath") rootPath=$(dirname "$rootPath") + opensslVersion="3.0.10" # echo $rootPath diff --git a/plugins/php/lib/openssl_10.sh b/plugins/php/lib/openssl_10.sh index 24064ebad1..d369d4f25d 100644 --- a/plugins/php/lib/openssl_10.sh +++ b/plugins/php/lib/openssl_10.sh @@ -44,6 +44,16 @@ if [ ! -d ${SERVER_ROOT}/openssl10 ];then ./config --openssldir=${SERVER_ROOT}/openssl10 zlib-dynamic shared make && make install + # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl10/lib + if [ -d /etc/ld.so.conf.d ];then + echo "/www/server/lib/openssl10/lib" > /etc/ld.so.conf.d/openssl10.conf + elif [ -f /etc/ld.so.conf ]; then + echo "/www/server/lib/openssl10/lib" >> /etc/ld.so.conf + fi + + ldconfig + # ldconfig -p | grep openssl + cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/openssl-${opensslVersion} fi diff --git a/plugins/php/lib/openssl_11.sh b/plugins/php/lib/openssl_11.sh index 4124b356a9..09655ab85a 100644 --- a/plugins/php/lib/openssl_11.sh +++ b/plugins/php/lib/openssl_11.sh @@ -24,6 +24,16 @@ if [ ! -d ${SERVER_ROOT}/openssl11 ];then ./config --prefix=${SERVER_ROOT}/openssl11 zlib-dynamic shared make && make install + # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl11/lib + if [ -d /etc/ld.so.conf.d ];then + echo "/www/server/lib/openssl11/lib" > /etc/ld.so.conf.d/openssl11.conf + elif [ -f /etc/ld.so.conf ]; then + echo "/www/server/lib/openssl11/lib" >> /etc/ld.so.conf + fi + + ldconfig + # ldconfig -p | grep openssl + cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/openssl-${opensslVersion} fi diff --git a/plugins/php/lib/openssl_30.sh b/plugins/php/lib/openssl_30.sh new file mode 100644 index 0000000000..cd41398c28 --- /dev/null +++ b/plugins/php/lib/openssl_30.sh @@ -0,0 +1,41 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin:/opt/homebrew/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") + +opensslVersion="3.0.10" +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib +mkdir -p $SOURCE_ROOT + +if [ ! -d ${SERVER_ROOT}/openssl30 ];then + cd ${SOURCE_ROOT} + if [ ! -f ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz ];then + wget --no-check-certificate -O ${SOURCE_ROOT}/openssl-${opensslVersion}.tar.gz https://www.openssl.org/source/openssl-${opensslVersion}.tar.gz + fi + tar -zxvf openssl-${opensslVersion}.tar.gz + cd openssl-${opensslVersion} + ./config --prefix=${SERVER_ROOT}/openssl30 zlib-dynamic shared + make && make install + + + # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/www/server/lib/openssl30/lib + if [ -d /etc/ld.so.conf.d ];then + echo "/www/server/lib/openssl30/lib64" > /etc/ld.so.conf.d/openssl30.conf + elif [ -f /etc/ld.so.conf ]; then + echo "/www/server/lib/openssl30/lib64" >> /etc/ld.so.conf + fi + + ldconfig + # ldconfig -p | grep openssl + + cd $SOURCE_ROOT && rm -rf $SOURCE_ROOT/openssl-${opensslVersion} +fi + diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index a5b4e24c4c..242fae1b38 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -431,6 +431,10 @@ mw_connect_mysql(){ echo "login to ${CHOICE_DB}:" pwd=$(cd ${ROOT_PATH}/mdserver-web && python3 ${ROOT_PATH}/mdserver-web/plugins/${CHOICE_DB}/index.py root_pwd) + if [ "$pwd" == "admin" ];then + pwd="" + fi + if [ "$CHOICE_DB" == "mysql" ];then ${ROOT_PATH}/mysql/bin/mysql -uroot -p"${pwd}" fi