wget https://repo.percona.com/yum/percona-release-latest.noarch.rpm yum install percona-release-latest.noarch.rpm yum install percona-toolkit Create same MySQL user on different databases and run: pt-config-diff h=192.168.0.99 h=192.168.0.100 -p Password -u User # A software update is available: 74 config differences Variable m1.srv.net old100.srv.net ========================= ========================= ========================= back_log 80 50 binlog_format MIXED STATEMENT general_log_file m1.log /var/lib/mysql/old100.log group_concat_max_len 1048576 1024 have_openssl YES DISABLED have_symlink YES DISABLED hostname m1.srv.net old100.srv.net innodb_autoextend_incr... 64 8 innodb_buffer_pool_ins... 8 1 innodb_buffer_pool_size 5368709120 1073741824 innodb_concurrency_tic... 5000 500 innodb_data_file_path ibdata1:12M:autoextend ibdata1:10M:autoextend innodb_file_format Antelope innodb_flush_method fsync innodb_large_prefix OFF innodb_log_buffer_size 16777216 8388608 innodb_log_file_size 50331648 5242880 innodb_max_dirty_pages... 75.000000 75 innodb_old_blocks_time 1000 0 innodb_open_files 2000 300 innodb_purge_batch_size 300 20 innodb_purge_threads 4 0 innodb_spin_wait_delay 4 6 innodb_stats_on_metadata OFF ON innodb_strict_mode ON OFF innodb_version 10.4.13 5.5.54 join_buffer_size 262144 131072 key_buffer_size 134217728 8388608 lc_messages_dir /usr/share/mysql/ lock_wait_timeout 86400 31536000 log_error /var/log/mysqld.log log_warnings 2 1 max_allowed_packet 16777216 1048576 max_connect_errors 100 10 max_long_data_size 16777216 1048576 max_relay_log_size 1073741824 0 max_seeks_for_key 4294967295 18446744073709551615 max_write_lock_count 4294967295 18446744073709551615 myisam_recover_options BACKUP,QUICK OFF myisam_sort_buffer_size 134216704 8388608 old_alter_table DEFAULT OFF open_files_limit 16364 5000 optimizer_switch index_merge=on,index_m... index_merge=on,index_m... performance_schema_eve... -1 10000 performance_schema_eve... -1 10 performance_schema_max... 90 80 performance_schema_max... -1 1000 performance_schema_max... -1 10000 performance_schema_max... -1 1000000 performance_schema_max... 40 30 performance_schema_max... -1 1000000 performance_schema_max... -1 100000 performance_schema_max... -1 50000 performance_schema_max... -1 1000 pid_file /var/lib/mysql/m1.pid /var/run/mysqld/mysqld... query_alloc_block_size 16384 8192 query_cache_size 1048576 0 query_cache_type OFF ON query_prealloc_size 24576 8192 secure_auth ON OFF secure_file_priv /var/lib/mysql-files/ server_id 1 0 slave_net_timeout 60 3600 slow_query_log_file m1-slow.log /var/lib/mysql/old100-slo... sql_mode STRICT_TRANS_TABLES,ER... sync_master_info 10000 0 sync_relay_log 10000 0 sync_relay_log_info 10000 0 system_time_zone UTC EEST table_open_cache 2000 400 thread_cache_size 151 0 thread_stack 299008 262144 version 10.4.13-MariaDB 5.5.54 version_comment MariaDB Server MySQL Community Server...
percona tools centos
wget https://repo.percona.com/yum/percona-release-latest.noarch.rpm
yum install percona-release-latest.noarch.rpm
yum install percona-toolkit
ssh: connect to host xx.xx.xx.xx port 22: No route to host
ping xx.xx.xx.xx
firewall-cmd --permanent --add-port=22/tcp
firewall-cmd --reload
run ssh server verbose
/usr/sbin/sshd -ddd -p 2222
Cannot Read License File
cPanel/WHM fix the license:
/usr/local/cpanel/cpkeyclt
Updating cPanel license...Done. Update succeeded.
ip link show errors
2: eno0:
link/ether 70:71:bc:0c:59:52 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
133273256 117186 0 0 0 11
TX: bytes packets errors dropped carrier collsns
10051321 56565 0 0 0 0
linux list huge directory
If ls takes long because of thousands files, you can do it much more faster:
ls -U
ls --sort=none
ERROR 2013 (HY000): Lost connection to MySQL server during query
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Error: the size of single-table tablespace file ./my_database/wp_badTable.ibd
mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '
mysql> drop database my_database;
ERROR 2013 (HY000): Lost connection to MySQL server during query
service mysqld stop
Shutting down MySQL... SUCCESS!
# Backup corrupted database files:
mv -v /var/lib/mysql/my_database/wp_wfHoover.* /root/
`/var/lib/mysql/my_database/wp_badTable.frm' -> `/root/wp_badTable.frm'
`/var/lib/mysql/my_database/wp_badTable.ibd' -> `/root/wp_badTable.ibd'
service mysqld start
Starting MySQL.. SUCCESS!
mysql> drop database my_database;
Query OK, 30 rows affected (0.40 sec)
service mysqld restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!
200430 14:12:18 [Note] /usr/sbin/mysqld: Normal shutdown
200430 14:12:21 [Note] /usr/sbin/mysqld: ready for connections.
Now you can recreate database and restore from backups.
send UDP packets
echo "Test message" > /dev/udp/127.0.0.1/3333 Test it: ncat -l 3333 --udp Test message
QUIC
Quick UDP Internet Connections (QUIC) is, as its name states, a transport layer protocol based on multiplexed UDP connections. In fact, QUIC uses a combination of TCP + TLS + SPDY over UDP with several enhancements with respect to the current HTTP/2 over TCP implementation.
linux get command output in different language
locale -a | grep LT
lt_LT
lt_LT.iso885913
lt_LT.utf8
sgs_LT
sgs_LT.utf8
LC_ALL=lt_LT.utf8 cal -m
balandis 2020
Pr An Tr Kt Pn Št Sk
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
ubuntu litespeed repository
wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | bash
convert ppk to ssh key
sudo dnf install putty
puttygen ~/Downloads/id_rsa.ppk -O private-openssh -o id_rsa.key
chmod 600 id_rsa.key
Our system has detected that this message 550-5.7.1 does not meet IPv6 sending guidelines regarding PTR records and 550-5.7.1 authentication. Please review 550-5.7.1
vim /etc/postfix/main.cf
inet_protocols = ipv4
service postfix restart
centos postfix autoresponder
mkdir ~/tmp && cd ~/tmp
To download bash script you can here: autoresponse-1.6.3.tar.gz
tar xvfz autoresponse-1.6.3.tar.gz
useradd -d /var/spool/autoresponse -s `which nologin` autoresponse
mkdir -p /var/spool/autoresponse/log /var/spool/autoresponse/responses
cp -v autoresponse/autoresponse /usr/local/sbin/
chown -R autoresponse.autoresponse /var/spool/autoresponse
chmod -R 0770 /var/spool/autoresponse
vim /etc/postfix/master.cf
smtp inet n - n - - smtpd -o content_filter=autoresponder:dummy autoresponder unix - n n - - pipe flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${original_recipient} -S ${sasl_username} -C ${client_address}
postfix check
service postfix restart
autoresponse -e [email protected]
autoresponse -d [email protected]
autoresponse -E [email protected]
autoresponse -D [email protected]