vim /etc/php/7.4/cli/php.ini;
short_open_tag=On;
Category Archives: linux
ALTER tables without lock
pt-online-schema-change alters a table’s structure without blocking reads or writes. Specify the database and table in the DSN. Do not use this tool before reading its documentation and checking your backups carefully.
parted create partition one line
parted -s -a optimal -- /dev/sdX mkpart primary 1MiB -2048s
list slave mysql
show slave mysql
mysql> SELECT * FROM information_schema.PROCESSLIST AS p WHERE p.COMMAND = 'Binlog Dump';
+---------+------+-------------------------+------+-------------+---------+---------------------------------------------------------------+------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+---------+------+-------------------------+------+-------------+---------+---------------------------------------------------------------+------+
| 3973053 | user | srv-mysql-slave1:53014 | NULL | Binlog Dump | 3743978 | Master has sent all binlog to slave; waiting for more updates | NULL |
+---------+------+-------------------------+------+-------------+---------+---------------------------------------------------------------+------+
resize xfs
grow xfs:
xfs_growfs /dev/vg_test/lv_test
Command: MLSD Error: The data connection could not be established: ECONNREFUSED – Connection refused by server
Command: MLSD
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
Error: Connection timed out after 60 seconds of inactivity
Error: Failed to retrieve directory listing
echo "40000 45000" > /etc/pure-ftpd/conf/PassivePortRange
echo "1.2.3.4" > /etc/pure-ftpd/conf/ForcePassiveIP
service pure-ftpd restart
mysql update user host
UPDATE mysql.db SET Host='%' WHERE Host='localhost' AND User='username';
FLUSH PRIVILEGES;
htaccess: Invalid command ‘RewriteEngine’
.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration, referer:
a2enmod rewrite
systemctl restart apache2
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.
export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8
ModuleNotFoundError: No module named ‘skbuild’
pip3 install “camelot-py[cv]”
ModuleNotFoundError: No module named ‘skbuild’
pip3 install scikit-build
“Problem with the CMake installation, aborting build. CMake executable is %s” % cmake_executable)
Problem with the CMake installation, aborting build. CMake executable is cmake
python3 -m pip install -U pip
pip3 install opencv-python
pip3 install “camelot-py[cv]”
/usr/bin/python3: Relink `/lib/x86_64-linux-gnu/libsystemd.so.0′ with `/lib/x86_64-linux-gnu/librt.so.1′ for IFUNC symbol `clock_gettime’
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
apt install libgl1-mesa-glx
RBL whitelisting postfix
vi /etc/postfix/rbl_override
10.10.10.10 OK
12.23.34.45 OK
mail.freemailer.tld OK
domain.com OK
[email protected] OK
email@ OK
postmap /etc/postfix/rbl_override
mtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
check_client_access hash:/etc/postfix/rbl_override,
reject_rbl_client dsn.rfc-ignorant.org,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client ix.dnsbl.manitu.net,
reject_rbl_client combined.rbl.msrbl.net,
reject_rbl_client rabl.nuclearelephant.com,
permit
apache disable default site
a2dissite 000-default.conf
Invalid command ‘ProxyErrorOverride’, perhaps misspelled or defined by a module not included in the server configuration
a2enmod proxy
adduser without password prompt
adduser --disabled-password --gecos "" aaa
Adding user `aaa' ...
Adding new group `aaa' (1000) ...
Adding new user `aaa' (1000) with group `aaa' ...
Creating home directory `/home/aaa' ...
Copying files from `/etc/skel' ...