curl -P - --insecure "ftp://192.168.0.100:21" --user "user:password"
Category Archives: linux
iptables add if not exists
iptables -C -INPUT -s 1.1.1.1 -j ACCEPT || iptables -A -INPUT -s 1.1.1.1 -j ACCEPT
try fix MySQL slave
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;
SHOW SLAVE STATUS \G
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
certbot cloudflare manual dns
certbot certonly --manual --server https://acme-v02.api.letsencrypt.org/directory --preferred-challenges dns-01 -d "*.
[ERROR] Exception occured: ISPConfigOSException -> Command mount -o remount
wget -O - https://get.ispconfig.org | sh -s --
[ERROR] Exception occured: ISPConfigOSException -> Command mount -o remount / 2>&1 && quotaoff -avug 2>&1 && quotacheck -avugm 2>&1 && quotaon -avug 2>&1 failed. (/ispconfig.ai.php:15)
Fix OpenVZ install issue
sed -i 's/mount -o remount/echo/' /tmp/ispconfig-ai/lib/os/class.ISPConfigDebianOS.inc.php
php -f /tmp/ispconfig-ai/ispconfig.ai.php
WARNING! This script will reconfigure your complete server!
It should be run on a freshly installed server and all current configuration that you have done will most likely be lost!
Type 'yes' if you really want to continue:
yes
list databases mongodb
mongo --quiet --eval "printjson(db.adminCommand('listDatabases'))"
grep only show match
grep -oh /some/path/*
System clock synchronized: no
vim /etc/systemd/timesyncd.conf
[Time]
FallbackNTP=ntp.ubuntu.com
systemctl daemon-reload
timedatectl set-ntp off
timedatectl set-ntp on
timedatectl status
Incorrect date value: ‘0000-00-00’ for column ” at row 1
SET GLOBAL sql_mode = '';
ERROR [input.filestream] filestream/input.go:138 File could not be opened for reading: failed opening
Problem too many open file
vim /lib/systemd/system/filebeat.service
[Service]
LimitNOFILE=infinity
systemctl daemon-reload
systemctl restart filebeat
increase shards elasticsearch – maximum shards open
Moving to ERROR step
org.elasticsearch.common.ValidationException: Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [100]/[100] maximum shards open;
at org.elasticsearch.indices.ShardLimitValidator.validateShardLimit(ShardLimitValidator.java:80) ~[elasticsearch
curl http://localhost:9200/_cat/shards | wc -l
100
curl -XPUT http://localhost:9200/_cluster/settings -H "Content-Type: application/json" -d '{ "persistent": { "cluster.max_shards_per_node": "200" } }'
postfix reject email address
vim /etc/postfix/sender_access
[email protected] REJECT
postmap hash:/etc/postfix/sender_access
smtpd_relay_restrictions = …
…
check_sender_access hash:/etc/postfix/sender_access
/etc/init.d/postfix restart
Delivery Status Notification (Failure)
Inbox
Mail Delivery Subsystem <[email protected]>
8:16 PM (6 minutes ago)
to me
Message blocked
ifup alias ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device does not seem to be present, delaying initializatio
make sure HWADDR was set
vi /etc/sysconfig/network-scripts/ifcfg-eth100
HWADDR=MAC ADDRESS
[::]:80 failed (97: Address family not supported by protocol
vim /etc/nginx/sites-enabled/default
Remove listen [::]:80 default_server;
X-Frame-Options SAMEORIGIN
Configuring Apache
Header always append X-Frame-Options SAMEORIGIN
Configuring nginx
add_header X-Frame-Options SAMEORIGIN;