2009
08.30

Please check in the file /var/log/maillog. I typically use tail -f /var/log/maillog

2009
08.29

MySQL: show indexes on a table

By Satish Natarajan

show index from <table_name>

2009
08.29

MySQL: Slow query log : log queries without indexes : my.cnf

By Satish Natarajan

Add this to your mysqld section in /etc/my.cnf

[mysqld]

log-slow-queries=/var/log/mysql/mysql-slow.log # where the file is located
long_query_time=1 # 1 sec is too slow
log-queries-not-using-indexes # I want to know which queries are run without indices

2009
08.29

Linux: CentOS: Installing nagios nrpe for monitoring

By Satish Natarajan

  • Install RPMForge repository as explained in my earlier posts
  • ‘yum install nagios-plugins-nrpe’
  • ‘yum install nagios-nrpe’
  • Edit the file /etc/nagios/nrpe.cfg
  • Edit the iptables to make sure the port is open so that the master nagios server can reach nrpe.
  • Test it – Configure the plugins in nrpe.cfg to monitor the right disks, etc
  • Done!
2009
08.29

Linux: CentOS Adding RPMForge – DAG

By Satish Natarajan

Here are the steps to add RPMForge (DAG) to CentOS

  • rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
  • Download the repository rpm ‘wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm’
  • Here is the list of all the Dag releases http://dag.wieers.com/rpm/packages/rpmforge-release/
  • Install the repository RPM ‘rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm’
  • You are done!

					
2009
08.29

If  you want to get the entire world of opensource software on your centos machine,  you might want to enable support for multiple repositories.

The question is which takes priorities – Aha! that is when yum-priorities come into picture…

Here is how to install and configure

  • Install the priorities package – “yum install yum-priorities”
  • Edit the .repo files in /etc/yum.repos.d/ and set up priorities by adding the line: “priority=n” where n is the priority
  • CentOS documentation recommends the following:
      [base], [addons], [updates], [extras] ... priority=1
      [centosplus],[contrib] ... priority=2
      Third Party Repos such as rpmforge ... priority=N  (where N is > 10 and based on your preference)
2009
08.25

Use background: url(<image_url>) in CSS.

2009
08.25

Looks like IE7 does not support <button></button> tags. So if you want to make a submit or any other button – please using <input type=”button”></input>

2009
08.22

If you are using the action_mailer_optional_tls plugin and you want to send mail to a default SMTP server. Here is how the config should look else it throws the did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA error.

# Don’t care if the mailer can’t send
config.action_mailer.raise_delivery_errors = false

require “smtp_tls”
#set delivery method to : smtp, :sendmail or :test
config.action_mailer.delivery_method = :smtp

config.action_mailer.smtp_settings= {
:tls => false,
:enable_starttls_auto => false,
:address => “localhost”,
:port => “25″,
:domain => “domain.com”,
}

The reason is that the plugin assumes it is always tls unless it is told not to.

2009
08.16

Flex: Background Skinning

By Satish Natarajan

Here is an example as to how you can skin the background

<mx:Style>
.myBackground {
backgroundImage: Embed(”assets/my_background.png”);
backgroundSize: “100%”;
}
</mx:Style>
<mx:HBox styleName=”myBackground” />