Debian Linux apt-get package management cheat sheet

http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html Both Debian and Ubuntu Linux provides a number of package management tools. This article summaries package management command along with it usage and examples for you. apt-get : APT is acronym for Advanced Package Tool. It supports installing packages over internet using ftp or http protocols. You can also upgrade all packages in a […]

25 PHP Security Best Practices For Sys Admins

http://www.cyberciti.biz/tips/php-security-best-practices-tutorial.html PHP is an open-source server-side scripting language, and it is a widely used. The Apache/Nginx/Lighttpd web server provides access to files and content via the HTTP OR HTTPS protocol. A misconfigured server-side scripting language can create all sorts of problems. So, PHP should be used with caution. Here are twenty-five php security best practices […]

Setting up PHP with FastCGI and suexec on Centos 5.5

http://blog.giantchipmunk.com/2011/01/setting-up-php-with-fastcgi-and-suexec.html I am setting up a shared web host in a clean Centos 5.5 installation. The advantages of using this setup versus the default mod_php include: PHP scripts run as the user who owns the site, not apache. A user will not be able to use PHP scripts to browse the website source files of […]

Custom PHP.ini tips and tricks

http://www.askapache.com/php/custom-phpini-tips-and-tricks.html Describes in exhaustive detail how to change configuration settings and implement a custom php.ini file for use with the Apache Web Server. View latest official php.ini Covers: When php run as Apache Module (mod_php) When php run as CGI When cgi?d php is run with wrapper (for FastCGI) Contents [hide] .htaccess code from Ultimate […]

Some Mysql commands

https://serveradminz.wordpress.com/category/mysql/ 1. To select a database mysql> USE database; Mysql cpanel – mysql -uroot -p`grep pass /root/.my.cnf | cut -d ‘”‘ -f 2` 2. To list databases mysql> SHOW DATABASES; 3. To list tables in a db mysql> SHOW TABLES; 4. To describe the format of a table mysql> DESCRIBE table; 5. To create a […]

Exim cheat sheet 2

https://serveradminz.wordpress.com/category/mail-servers/ 1. To remove all mails from exim queue : rm -rf /var/spool/exim/input/* 2. Deleting Frozen Mails: exim -bpr | grep frozen | awk {‘print $3’} | xargs exim -Mrm exiqgrep -z -i | xargs exim -Mrm 3. To delete only frozen messages older than a day: exiqgrep -zi -o 86400 | xargs exim -Mrm […]