Magento 2 : Install & configure , use redis in custom script

How to (install,configure) & use redis cache in magento 2 custom script ?