How to install busybox

BusyBox combines tiny versions of many common UNIX utilities into a single small executable.

This may help you when you got your shell broken since busybox in independent binary which includes a lot of commands inside.

In simple words this tool can save your life 🙂

Find the latest version of busybox at https://busybox.net/downloads/binariesRead the rest

cPanel whmapi1 modifyacct notes

Example of the command:

whmapi1 modifyacct user=XXXX QUOTA=XXXX

Some popular parameters:

BWLIMIT=unlimited
QUOTA=unlimited
CGI=y
CPMOD=paper_lantern
DIGESTAUTH=n
FEATURELIST=default
HASSHELL=n
MAXADDON=unlimited
MAXFTP=unlimited
MAXLST=unlimited
MAXPARK=unlimited
MAXPOP=unlimited
MAXSQL=unlimited
MAXSUB=unlimited
MAX_DEFER_FAIL_PERCENTAGE=100
MAX_EMAILACCT_QUOTA=unlimited
MAX_EMAIL_PER_HOUR=100
FRONTPAGE=n
IP=n
LANG=en
domain=domain.com
user=cpaneluser
MAX_DEFER_FAIL_PERCENTAGE=5
MAX_EMAILACCT_QUOTA=100
BACKUP=0
HASCGI=1
FEATURELIST=featurelist
OWNER=owner
HASDKIM=1
HASSPF=1
[email protected]
Read the rest

How to fix CSF’s error Another app is currently holding the xtables lock

The error should be looking as below:

You have an unresolved error when starting csf:
Error: Error processing command for line [339] (6 times): [Another app is currently holding the xtables lock. Perhaps you want to use the -w option?], at line 339 in /usr/sbin/csf

You need to restart csf successfully to remove this warning, or delete /etc/csf/csf.errorRead the rest

How to enable Slow Query Log

Append into /etc/my.cnf the following:

slow_query_log = 1
slow-query_log_file = /var/log/mysql-slow.log
long_query_time = 2

Create /var/log/mysql-slow.log log file and set it as mysql user:

touch /var/log/mysql-slow.log
chown mysql:mysql /var/log/mysql-slow.log

Restart MySQL server:

/scripts/restartsrv_mysql

Monitor the logs using tail command:

tail -f /var/log/mysql-slow.log
Read the rest

How to convert png/jpeg to webp and fix delegate error if any

Here is possible error:

admin@server1 [~/public_html/]# convert image.png -quality 50 image2.webp
convert: delegate failed `’cwebp’ -quiet %Q ‘%i’ -o ‘%o” @ error/delegate.c/InvokeDelegate/1928.

Supposed ImageMagick already installed then install cwebp

yum install libwebp libwebp-tools -y

Then try to convert your image again

convert image.png
Read the rest

How to reset MySQL root password

Stop MySQL server

service mysqld stop

Start in safe mode

mysqld_safe --skip-grant-tables &

Login mysql server

mysql

Reset your root password

UPDATE mysql.user SET Password=PASSWORD('strong-password-here') WHERE User='root';
FLUSH PRIVILEGES;
exit;

Shutdown your mysql server

mysqladmin -u root -p shutdown

Start your mysql server again

service mysqld start
Read the rest