sysbench \
--db-driver=mysql \
--mysql-table-engine=innodb \
--oltp-table-size=100000 \
--oltp-tables-count=12 \
--num-threads=4 \
--mysql-host=192.168.200.110 \
--mysql-db=test_database \
--mysql-port=3306 \
--mysql-user=sbtest \
--mysql-password=password \
--test=/usr/share/sysbench/tests/include/oltp_legacy/parallel_prepare.lua \
run
ip route flush cache
ip route flush table main
ansible fingerprint
vi /etc/ansible/ansible.cfg
[defaults]
host_key_checking = False
firewalld MASQUERADE
firewall-cmd --zone=public --add-masquerade
ansible ping
ansible -m ping --connection=local 127.0.0.1
127.0.0.1 | SUCCESS => {
"changed": false,
"ping": "pong"
}
cPanel exim log more information
Exim Configuration Manager -> Advanced Editor
log_selector:
+incoming_port +smtp_connection +all_parents +retry_defer +subject +arguments +received_recipients +address_rewrite +arguments +connection_reject +delay_delivery +delivery_size +dnslist_defer +incoming_interface +lost_incoming_connection +queue_run +received_sender +sender_on_delivery +size_reject +skip_delivery +smtp_confirmation +smtp_protocol_error +smtp_syntax_error +tls_cipher +tls_peerdn
-bash: chattr: command not found
yum install e2fsprogs
ai-bolit segmentation fault
php -q ai-bolit.php
Segmentation fault
Fix to disable opcache:
php -n -d extension=/usr/lib64/php/modules/opcache.so -q /root/ai-bolit/ai-bolit.php /some/path/to/scan
Invalid command ‘SetEnv’ cPanel
yum install ea-apache24-mod_env
.htaccess: Invalid command ‘SetEnv’, perhaps misspelled or defined by a module not included in the server configuration, referer:
enable php selector set to inherit
for i in $(cut -d: -f1 /etc/userdatadomains );do whmapi1 php_set_vhost_versions version=inherit vhost-0=$i;done
remi repo centos 8
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf module install php:remi-7.2
ssh-keygen secure
Curve cryptography with ed25519:
ssh-keygen -t ed25519 -a 100 -f ~/.ssh/id_ed25519 -q
or old way:
ssh-keygen -t rsa -b 4096 -o -a 100
openssl self signed certificate without passphrase
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes
litespeed WebP support for GD prestashop
Assuming you are using PHP 7.2 version standalone or with cyberpanel and you need add WebP support:
yum install -y lsphp72-devel gcc libjpeg-turbo-devel libpng-devel libXpm-devel freetype-devel libwebp-devel
wget https://www.php.net/distributions/php-7.2.24.tar.gz
tar xzvf php-7.2.24.tar.gz
cd php-7.2.24
cd ext/gd
/usr/local/lsws/lsphp72/bin/phpize
/usr/local/lsws/lsphp72/bin/php-config
./configure --with-php-config=/usr/local/lsws/lsphp72/bin/php-config --with-webp-dir=/usr/include/webp --with-freetype-dir=/usr/include/freetype2/freetype --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-xpm-dir=/usr/include
make
make install
pkill lsphp
This works for Google webP Image Converter Module
fsck progress
e2fsck -v -C 0 /dev/sdc
e2fsck 1.41.12 (17-May-2010)
/dev/sdc has gone 215 days without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
/dev/sdc: |==== – 7.8%