Skip to main content

Posts

Switched to Git

Finally decided to port all my work in my subversion repostiry to Git... A couple of tips that may be helpful for new starters: 1. In order to do an svn export, simply execute: git archive | tar -x -C /path/to/dir 2. To revert local edits, run: git checkout filename 3. The concept of remotes was confusing at the beginning. Think of them as shortcuts to remote repositories. So instead of typing complex URL's, all you need to do is git push remote branch git pull remote branch once a remote is added. 3. Enjoy your merges :)

Securing Postfix and Dovecot with TLS

SSL/TLS vs STARTTLS This seemed to be confusing at first but here is what it boils down to: With STARTTLS, an existing TCP connection is upgraded to an encrypted one after the SMTP handshake. On the other hand, with SSL/TLS, an ecnrypted connection is negiotiated right away before an SMTP handshake takes place. In other words, STARTTLS is "TLS inside SMTP", while SSL/TLS is "SMTP inside TLS". See this page for more information. Another important difference between these two schemes is that STARTTLS does not require a separate port. You can continue to use the same smtp (25) or imap (143) port. SSL/TLS on the other hand requires separate smtp (465) and imap (993) ports. Setup I wanted to implement a STARTTLS scheme; however, I decided to revert back to SSL/TLS due to: 1. I am running Dovecot dovecot-1.0.7 on CentOS release 5.5. Unfortunately for me, I was not able to require SSL connections since the "ssl = required" configuration option is not av...

Fedora 12 + Nagios + PNP4Nagios

Setting up pnp4nagios on Fedora is pretty straightforward. 1. Install pnp4 nagios yum install pnp4nagios 2. Setup /etc/nagios/nagios.cfg process_performance_data=1 host_perfdata_command=process-host-perfdata service_perfdata_command=process-service-perfdata 3. Setup /etc/nagios/objects/commands.cfg to send performance data to pnp4nagios. define command{ command_name process-host-perfdata command_line /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl -d HOSTPERFDATA } define command{ command_name process-service-perfdata command_line /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl } 4. Setup: /etc/nagios/objects/yourserver.cfg define host { name host-pnp action_url /nagios/pnp4nagios/index.php?host=$HOSTNAME$&srv=_HOST_ register 0 } define service { name srv-pnp action_url /nagios/pnp4nagios/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$ register 0 } # a servi...

MogileFS with Postgres

First of all, you need Postgres version 8.2 or newer since mogdbsetup refuses to run with older versions. Anyways, I spent a quite a bit of time trying to install MogileFS with Postgres. I was getting "Can't create temporary test database:" errors. The answer was in the ~/.cpan/build/mogilefs-server-2.34/blib/lib/MogileFS/Test.pm file. The temp_store subroutine was defaulting to MySQL... Here is the setup step by step on my Fedora 12: yum install mogilefsd yum install mogstored yum install perl-CPAN // if needed yum install perl-MogileFS-Client perl-MogileFS-Utils yum install perl-DBD-Pg yum install perl-IO-AIO Setup services. chkconfig --levels 345 mogilefsd on chkconfig --levels 345 mogstored on Setup a test database to be used during compilation. $ createuser -SRlD mogile $ createdb -E UTF8 -O mogile tmp_mogiletest Setup environment variables for testing $ MOGTEST_DBUSER=mogile $ MOGTEST_DBHOST=dbhost $ MOGTEST_DBNAME=tmp_mogiletest $ MOG...

Fedora 12 upgrade woes: Apache issues

Could not start the httpd service for a while due to: Syntax error on line 196 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_file_cache.so into server: /etc/httpd/modules/mod_file_cache.so: cannot open shared object file: No such file or directory I had to manually comment out two unneeded modules from the /etc/httpd/conf/httpd.conf: #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule mem_cache_module modules/mod_mem_cache.so More here .

Passive checks with Nagios

Today, while I was trying to set up Nagios on my local box at work when Nagios refused to start due to bad configuration error. Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration. It took some to time to realize that a "check_command" line has to be defined even for passive check. define service { use local-service service_description passive_service check_command check_dummy!2 active_checks_enabled 0 passive_checks_enabled 1 } The best explanation is from the 2.0 docs located at: http://nagios.sourceforge.net/docs/2_0/freshness.html What Happens When A Service Check Result Becomes "Stale" If the check results of a service are found to be "stale" (as described above), Nagios will force an active check of the service by executing the command specified by the check_command option in the service definition. It is important to note that an active ...

Fedora 10 (Cambridge) to Fedora 12 (Constantine) with PreUpgrade

Ok, here goes my first blog post ever... Last Friday, I decided to upgrade from Fedora 10 to 12 using the PreUpgrade tool. The download and the installation process went well until the time came to boot into the new system. I suspected something was wrong when I realized the fc12 kernel line was missing from the Grub menu, and I was "relieved" to see I was right the whole time when I was presented with: Give root password for maintenance (or type Control-D to continue): I could not even type. Every time I hit a key, i was prompted with the same line... Thankfully, I had that old custom compiled vanilla kernel sitting in the Grub menu that allowed me to boot and utilize the command line at least. Although I was able to interact with Grub during the boot process, I decided to complicate the problem for no apparent reason and thought there must be something wrong with the grub itself... I burned the Fedora 12 DVD iso image and booted the computer into rescue mode... Two c...