FreeNAS Install And Configure APC UPS For Power Management

Originally published at: https://www.cyberciti.biz/faq/how-to-install-apc-ups-on-freenas-server/

I have an APC SUA1500i smart ups, and want to configure power option from my FreeNAS using this ups. How can I install an appropriate APC UPS USB driver on my FreeNAS server, and use it to control power options?