static linkするにあたっての動機、諸注意(ハメがあるので必読)は [twitter:@sonots] さんの mysql2 gem を mysql5.6 の libmysqlclient.a と static link したい話 - sonots:blog を参照してください。 ここではDBD::mysqlをビルドする際のオプションのみ記します。 http://dev.mysql.com/downloads/mysql/ からダウンロードできるrpm MySQL-client-5.6.21-1.el6.x86_64.rpm MySQL-devel-5.6.21-1.el6.x86_64.rpm MySQL-shared-5.6.21-1.el6.x86_64.rpm の場合、 $ ldconfig -p | grep libmysqlclient libmysqlclient.s