You need city permit for a new fireplace and an inspection after the installation. You can't do it yourself , a licenced techinician should be hired to install it. And you have to report it to your insurance company to add it on your policy. There will be major trouble with insurance company ,when somethings happens with that fire place if all rules are not followed.
If you like to do it yourself, only way is to buy a eletricial fireplace.