Last Updated:

LAMP Cheatsheet

GiangDDT
GiangDDT developer

Django command list

Check PHP Memcached workthread

$ sudo watch -td '(echo stats ; echo quit) | nc 127.0.0.1 11211 '

Restart Apache host

$ sudo service httpd restart

Restart MySQL

$ sudo service mysqld restart

Change all folders in directory to permission 775

$ find /var/www -type d -exec sudo chmod 2775 {} \;

Change all files in directory to permission 664

$ find /var/www -type f -exec sudo chmod 0664 {} \;

Apache Benchmark

$ ab -n [# of requests] -v [1 or 2] [www.domain.com]

Check disk usage of OpenLiteSpeed

$ sudo du -cha --max-depth=1 /usr/local/lsws | grep -E "M|G"