When you have installed several Linux packages, as it seems that you have done, in order to move closer to the desired solution to your problem, the next thing you need to do is to take a closer look at what those package installation steps actually did. The Internet is fairly stuffed with articles on how to use Perl in CGI, FastCGI, and mod_perl environments, and so the first order of business is to take a look at the actual Apache configuration files and so-forth to see what the package installation steps have prepared you to most-easily do.
Strictly speaking, LAMP is not any single product: it’s just a rather loosey-goosey acronym for “a web server and a database running on a maybe-Linux box.” So, when you say that you “installed LAMP,” that is not as precise or as un-ambiguous a statement as you might initially suppose. Fact is, it’s not precise or un-ambiguous at all, which is why you can really only expect vague answers (if any) to your question as posed in this way. Even though we can see that you are using mod_fcgid, even that does not say too much yet. Go find exactly what your actual situation is, then match it up to existing documents that seem to deal closely with that scenario.
Of course, please feel free to continue this thread! This isn’t “RTFM.” The Monks are ready to help to the extent that we can.