Installing Redmine With MySQL And Nginx On CentOS 6

Redmine is a software project management tool which has Wiki, issue tracer, source code browser and other cool features built in. If you want to install Redmine with MySQL and Nginx on CentOS 6, follow these steps.

I always use EPEL repository with CentOS. EPEL provides additional RPM packages. We can use Nginx and some Ruby gem packages from EPEL.

Enable EPEL:

rpm -Uvh

Install required packages:

yum install nginx mysql-server ruby rubygem-rack rubygem-rake ruby-mysql

Redmine requires a Ruby gem called i18n. I couldn't find the RPM for i18n gem. I had to install i18n gem using the gem installer.

gem install -v=0.4.2 i18n

Start MySQL server:

/etc/init.d/mysqld start

Use the MySQL secure installation program:


Connect to the MySQL server as root:

mysql -u root -p

Create a MySQL database and user for Redmine:
mysql> CREATE DATABASE redmine character set utf8;
mysql> GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'secret_password' WITH GRANT OPTION;

Writing A Python Script To Send Files To Amazon S3

Amazon Simple Storage Service or Amazon S3 is a storage service with a web API. I use Amazon S3 to store backups of my blog and other sites. I made a simple python script to handle file uploads to S3.

In order to use Amazon S3, first create a bucket using your Amazon AWS account. As the name suggests, bucket is a container. You can create buckets using the AWS management console.

The script we're going to write will take two input parameters

  1. Path to file, local
  2. Target S3 path

Personal Wiki

When someone asks how to become a programmer or a good programmer, the usual answer is "hack something". To clarify the jargon, hacking is not breaking into computer systems. When you start learning programming, it is good to write programs. You could hack on existing open source software projects or your own cool new project.

I have been blogging ever since I have started programming. I have urged a lot of developers to start blogging. In addition to working on a personal project, blogging about hacking is an awesome experience. Unfortunately, blogging doesn't tick for a lot of people. The usual reasons are lack of time and not having writing skills.

I have been a wiki user from a long time and I enjoy browsing wikis. I use Wikipedia everyday. Wikipedia search is the second search engine in my Firefox's list of search engines. At work, I use the wiki in Redmine. A wiki is a good tool for collaborative content creation and editing. It also works great for single users. Apart from using wikis at work and other places, I have been using a personal wiki. I use it to store

  • notes
  • blog post ideas and drafts
  • technical documentation
  • business ideas
  • miscellaneous items

Website Content

Jane: Golix, we have to put up some impressive content on our website. Any ideas?
Golix: Sure. On the front page, mention that we're innovating in the field of cloud computing.
Jane: Good point.
Golix: Also, mention that we're creating social media products. Put up some badges.
Golix: On the technology page, be sure to mention noSQL and node.js.
Jane: That would be cool. Thanks.
Golix: Remember, we have to update our website in one year.

Taxonomy upgrade extras: 


Year 2002

John: Hey Golix. What's up buddy? You seem to be unhappy.
Golix: I got the pink slip today. I'm looking for a job.
John: Sorry to hear that. I'll see if I can get you a lead.
Golix: Thanks.

Year 2011

John: Hey Golix. What's up buddy? I don't see you online these days.
Golix: Yup.
John: I heard you're not working for Crux Consulting anymore.
Golix: Yeah. I've founded a stealth startup.
John: Congrats. A friend of mine was looking to hire a Java programmer. I suggested you. Anyway, I will tell him you're not available for hire. All the best.
Golix: Hey. You know what. Just tell your friend, I'm open.

Taxonomy upgrade extras: 

Zend Date Class Constants Cheat Sheet

Date and time handling in general is a problem in programming. For PHP programmers, there's a good library out there that performs all the difficult tasks and provides convenient APIs. Zend_Date has several constants defined. It is good to know what each one of them represents. For this purpose, I have made a cheat sheet. Download the PDF and enjoy.

The table has the constant name and sample value columns.

Learning Nagios 3.0 - Book Review

Title: Learning Nagios 3.0
Publisher: Packt Publishing
Author: Wojciech Kocjan
ISBN-10: 1847195180
ISBN-13: 978-1847195180

Nagios is a powerful and popular network monitoring software. I contacted PackT and asked for a review copy of the book.

Read the full table of contents on the publisher's site.

The topic being system administration, I could read the book from cover to cover in three days.

Like many other technical books, introductory pages of Learning Nagios 3.0 sells you Nagios. The first chapter convinces you why you should use Nagios to make your life easier by setting up automated monitoring of your servers.

Taxonomy upgrade extras: 

How To Install And Configure Nagios On CentOS

Nagios is a popular networking monitoring software. Nagios lets you monitor your IT infrastructure, be it servers, routers, switches or other devices. In this post, I will walk you through the steps of installing and configuring a basic setup of Nagios on CentOS.

At the end of the tutorial you will be have a working Nagios setup to monitor

  • local disk space usage
  • local system load
  • an external website

Whenever there is a problem or recovery with any of the above, Nagios will alert you via email.

Unless you have a strong reason to compile Nagios yourself, you should use the binary packages available for your Linux distribution.

RPMForge provides packages that are not included in CentOS repositories. We will use the Nagios packages from RPMForge.

Enabling RPMForge repository

For 32 bit machines use these commands:

rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm

For 64 bit machines use these commands:

rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

Installing And Configuring Nagios

XML For PHP Developers

On 30 October 2010, the Bangalore PHP User Group met at Microsoft. I gave a talk, XML For PHP Developers, in the event.

I'm sharing the slides in this entry.

It was an introductory talk on XML for PHP developers. There are hundreds of technologies built on top of XML. We have all heard about RSS, Atom, XML-RPC, SOAP, etc. The goal of the talk was to get PHP developers to start using XML. In the talk, I presented three recipes:

Taxonomy upgrade extras: