echo 'QUIT' | nc -w SECONDS YOUR_HOST PORT; echo $?
Category Archives: linux
No match for argument: vlc Error: Unable to find a match: vlc
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-34.noarch.rpm
sudo dnf install vlc
Status not available – monit http interface is not enabled, please add the ‘set httpd’ statement
monit status
Status not available – monit http interface is not enabled, please add the ‘set httpd’ statement
vim /etc/monit/monitrc
set httpd port 2812 and
use address 0.0.0.0
allow 0.0.0.0/0.0.0.0
monit -t
service monit reload
mysql change root auth_socket
UPDATE mysql.user SET plugin = 'mysql_native_password', authentication_string = PASSWORD('changeme') WHERE User = 'root';
FLUSH PRIVILEGES
show database collocation mysql
SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA;
docker remove dangling images
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi
systemd for nginx
vim /lib/systemd/system/nginx.service
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Magento install Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
php bin/magento module:disable {Magento_Elasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}
bash: killall: command not found
apt install psmisc
diff show only differences side by side
sdiff -bBWs file1 file2
-b Ignore changes in the amount of white space
-W Ignore all white space
-B Ignore changes whose lines are all blank
-s Do not output common lines
scan all scsi_host scan for new drives
for host in `ls /sys/class/scsi_host/`;do
echo “- – -” >/sys/class/scsi_host/${host}/scan;
done
mysql show loaded config file
which mysqld
/usr/sbin/mysqld
/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
elasticsearch limit memory usage
vim /etc/init.d/elasticsearch
ES_HEAP_SIZE=512m
vim /etc/elasticsearch/elasticsearch.yml
bootstrap.memory_lock: true
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘– INTERVAL 1 DAY’ at line 1
PURGE BINARY LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 1 DAY);
or exact day:
PURGE BINARY LOGS BEFORE '2021-04-11 00:00:00';
urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from
webroot-path should not include full path, so skip .well-known/acme-challenge