WHM/Cpanel running on OpenVZ VPS does not show the user quota correctly.
quotacheck: Can't find filesystem to check or filesystem not mounted with quota option.
Make sure that the second level quota support is enabled.
# vzctl set --quotaugidlimit 500 --save
# vzctl restart
Copying large amout of files/dirs over SSH using RSYNC
To copy files from remote server to local:
To copy files from local to remote server:
-v, --verbose increase verbosity
-r, --recursive recurse into directories
-p, --perms preserve permissions
-l, --links copy symlinks as symlinks
-o, --owner preserve owner (super-user only)
Creating MYSQL Database and new user
This will create a database donie_drupal, create a user donie_user and assign this user to DB donie_drupal
mysql> grant all privileges on donie_drupal.* to donie_user@'localhost'
identified by 'P4ssw0rd' with grant option;
Find And Replace Text in Multiple File in Linux Console
examples:
find . -name '*.txt' | xargs perl -pi -e 's/To: root/To: donie\@slowrock\.com/g'
How to fix ssh timeout problems
If you use ssh a lot, you may have noticed that your ssh session times out and you’re logged out every once in a while.
For example while you were using SecureCRT, you got:
The solution is to send a protocol NO-OP every few seconds to keep the connection alive.
Usually SSH clients have this feature disabled and you can enable it.
SecureCRT has this feature on:
Right click on host -> Properties
or
Right click on the host tab -> Session Options
Increase the size of /tmp (/usr/tmpDSK) partition in Linux?
How to increase the size of /tmp partition in Linux?
Proceed with the given steps:-
========================
1) Stop MySql service and process kill the tailwatchd process.
Stopping MySQL: [ OK ]
[root@antg ~]# pstree -p | grep tailwatchd
Find the tailwatchd process id and kill it
[root@antg ~]# kill -9 2522
2) Take a backup of /tmp as /tmp.bak
3) Create a 2GB file in the avaliable freespace
Secure /tmp and /dev/shm partition
How To Secure /tmp and /dev/shm partition
Keep you server clean of rookits is a good idea to get a good security level. A sysadministrator can create a seperate partition for /tmp and mount it with noexec and nosuid parameters. And to do it is not necessary to reboot or repartition your drive.
1. First you should secure /tmp:
Make a 1GB file for /tmp parition and an ext3 filesystem for tmp:
[root@antg ~]# dd if=/dev/zero of=/usr/tmpDSK bs=1024 count=1000000
will take a while, just wait until finished.
Increase the size of tmpDSK (/tmp) in cPanel
You may have noticed that cPanel’s default partition size for /tmp is
512 MB, which in some cases can be way too small. And sometime you probably get this report email:
Although cPanel automatically deletes the unused files, the /tmp would be getting full very quickly on a busy server.
The /tmp partition on cPanel servers, assuming it was the one cPanel created and not one you did yourself, is a file-based partition that can easily be resized.