How to set Cron on Linux?

Simple open the crontab on editor using following command: shell> crontab -e An editor usually vim would open. Now you can write your cron scripts that are to be schedulled there. If I am setting cron for drupal, it would be something like

How to find out slow queries in MYSQL to enhance and optimize them for peformance

Step by Step solution: 1. Go to /etc/rc.d/init.d/mysqld 2. Locate line: /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf 3. Add option: --log-slow-queries="/var/log/slow-queries.log" to this line. Now the line becomes: /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --log-slow-queries="/var/log/slow-queries.log" 4. Create an empty file: touch /var/log/slow-queries.log 5. Give permission: chmod 644 /var/log/slow-queries.log 6. Restart mysql mysqld will log all slow queries to this file.

Drupal multiple sites installation: Tutorial

Often with your impressive Drupal installation, you would wish to run multiple sites on a single code base, each independent enough to look like an indepedent site and an independent domain name. As an example, look at the sites www.mplstutorial.com and www.programmingbulls.com installed on the same code base and single drupal installation. Therefore, www.site1.com would become one site and www.site2.com would become another on a single Drupal installation.

How to start or stop lampp or any other script on linux boot ?

If you want your lampp server to start automatically when the linux boots by accident or knowingly, create a following linux script and call it start_lampp.sh #!/bin/bashservice httpd stop/opt/lampp/lampp restart Copy start_lampp.sh to /etc/init.d/: shell> cp start_lampp.sh /etc/init.d/ Give executable permissions: shell> chmod +x /etc/init.d/start_lampp.sh Create a symbolic link:

How to know your RAM on linux machine?

You can know the RAM on your linux machine using the command: cat /proc/meminfo This would give the following output:

White Blank Screen of death when running drupal in apache or lampp

The white screen of death is usually caused by a lack of memory - on your dev box, you just need to increase the amount of amount of memory allocated to PHP in php.ini. So if you are using lampp, go to /opt/lampp/etc/php.ini and find the line: memory_limit = XXM. Increase this XXM to say 32 or 64M and the white screen of death should go.