I'm getting a /27 of IPv4 addresses assigned to my rack and I want to assign one IP address to each server.
This is no problem. If you need to enforce the MAC/IP-port binding in the switch you need to take a look at MAC authentication or similar.
I have a HP 2510G switch. Would it be possible to use Centos as a router
This depends on whether the /27 range is routed to you (you need to supply the default gateway yourself and have an uplink router outside your /27 subnet) or switched (the default gateway is supplied by the ISP). When routed, you could use any router of your own to forward all traffic. When switched, this is a bit harder.
to assign an IP address to each port on the switch?
This can be accomplished by setting up a DHCP server with reservations (e.g. on the router). However, you should make sure that the DHCP (broadcast) domain ends at your uplink interface (the 2510 doesn't support DHCP snooping which would be very handy). This is ensured when the subnet is routed but not when it is switched.
I also don't want clients to be able to assign themselves extra IP addresses without paying.
I don't think this is possible with the 2510. You'd need to take care of that on the router/default gateway.