28 Feb

How to get number of registered users in WordPress databases (if you have a lot of databases)

Task

There are a lot of WordPress based websites (as well as not WordPress) databases on your box.  It’s necessary to get  number of registered users in WordPress databases only.

Solution

Collecting WordPress databases:

mysql -Bse " use information_schema; select TABLE_SCHEMA from TABLES where table_name like 'wp_users';" > wp_users.txt

Getting the numbers:

for i in $(cat wp_users.txt ) ; do echo -n $i " "; mysql -Bse "use $i ; select count(id) from wp_users " ; echo ; done | sort -rnk2 | less
27 Feb

ProFTPd server IP address binding on Centos 5.9

By default ProFTPd server on Centos 5.9 tries to resolve current hostname to get IP address to bind. So if it fails if you hostname doesn’t resolve. To make it listen the socket on your IP add this line to your configuration file:

DefaultAddress 192.168.1.1

It will do the trick. Just change it to your actual IP.

25 Feb

Why WordPress is great

  1. It’s the most popular blogging CMS nowadays.
  2. WordPress is easy to install (minutes), maintain (automatic updates feature from the box) and use (just give it a try).
  3. It’s has thousands of useful plugins for almost all requirement you might need.
  4. It also has really a lot of themes (both free of charge and commercial).
  5. It’s famous for its helpful community.
  6. You can host your WordPress blog for free on wordpress.com.
  7. You don’t need to have special skills to share you knowledges.
23 Feb

How to install Java on Fedora 18 box

[root@bender ~]# yum search openjdk
Loaded plugins: security, show-leaves
============================= N/S Matched: openjdk =============================
java-1.7.0-openjdk.i686 : OpenJDK Runtime Environment
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
thermostat.x86_64 : A monitoring and serviceability tool for OpenJDK

Name and summary matches only, use "search all" for everything.
[root@bender ~]# yum install java-1.7.0-openjdk.x86_64

This is it.