It's perfectly legal to install your own security system without getting a home alarm permit. However, activating and operating the system is another matter. If you're planning on any kind of remote monitoring or emergency response features, many local governments require you to have an alarm permit. And even without any monitoring, a loud alarm can result in fines if you don't have the proper alarm permit.
Many of the laws date back a decade or more, when home security systems and alarm monitoring services were less sophisticated and homeowners less familiar with them.