The installation requires the following steps

it is assumed that you have got the kernel source tree, configured and at least the modules compiled
donwload and unpack the source
run KERNEL_DIR= make to compile the userspace tool and the kernel modules
run KERNEL_DIR= make install to install the ipset userspace tool and the kernel modules
In order to use to the set match and SET target
you need iptables 1.4.4 (or above), or
due to the ipset protocol change, you have to recompile iptables before 1.4.4 to get ipset 3.0 (or above) supported:
Copy the file kernel/include/linux/netfilter_ipv4/ip_set.h from the source tree of ipset-3.9 to include/linux/netfilter_ipv4 in the source of iptables
Recompile iptables
and ready!

Refer : http://ipset.netfilter.org/install.html