initial import of new Tutorial stuff from hkclark
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Manual / Installation.pod
CommitLineData
4d583dd8 1=head1 NAME
2
3Catalyst::Manual::Installation – Catalyst Installation
4
5
6
7=head1 DESCRIPTION
8
9This section of the Catalyst tutorial looks at a number of items required to first get going with Catalyst development.
10
11
12
13=head1 INSTALLATION
14
15On one hand, Catalyst gains immediate power and flexibility through is use of CPAN (the Comprehensive Perl Archive Network, an enormous global repository containing over 10,000 free modules). On the other hand, Catalyst's reliance on CPAN can complicate initial installations. Fortunately, there are a growing number of methods that can dramatically ease this undertaking:
16
17=over 4
18
19=item *
20
21Matt Trout’s C<cat-install>
22
23Available at L<http://www.shadowcatsystems.co.uk/static/cat-install>, C<cat-install> can be a quick and painless way to get Catalyst up and running. Just download the script from the link above and type C<perl cat-install>.
24
25=item *
26
27Chris Laco's CatInABox
28
29Download the tarball from L<http://handelframework.com/downloads/CatInABox.tar.gz> and unpack it on your machine. Depending on your OS platform, either run C<start.bat> or C<start.sh>.
30
31=item *
32
33Pre-Built VMWare Images
34
35Under the VMWare community program, work is ongoing to develop a number of VMWare images where an entire Catalyst development environment has already been installed, complete with database engines and a full complement of Catalyst plugins.
36
37=back
38
39
40=head2 OTHER METHODS
41
42In addition to the "all-in-one" approaches mentioned above, there are a variety of other installation techniques:
43
44=over 4
45
46=item *
47
48CPAN
49
50The traditional way to install Catalyst is directly from CPAN using C<Task::Catalyst> bundle:
51
52 $ perl –MCPAN –e 'install Task::Catalyst'
53
54Unless you have a particularly complete set of Perl modules already installed, be prepared for a large number of nested dependencies.
55
56=item *
57
58Gentoo Linux
59
60For users of Gentoo, see C<http://gentoo-wiki.com/HOWTO_Catalyst_Framework> for automated installations. In short, simply mount the portage overlay and type C<emerge catalystframework>.
61
62=items *
63
64FreeBSD
65
66FreeBSD users can get up and running quickly by typing C<cd /usr/ports/www/p5-Catalyst && make install>.
67
68=item *
69
70Windows ActivePerl
71
72Windows users can take advantage of the PPM tool that comes with ActivePerl to jumpstart their Catalyst environment. Directions are available at L<http://catalyst.infogami.com/katalytes/cat_on_windows>.
73
74=back
75
76B<NOTE:> Although all of the above methods can be used to install a base Catalyst system, only the VMWare image is likely to have all of the plugins and modules you need to complete this tutorial. When you start the C<script/myapp_server.pl> development server later to run your application, it will tell you about any modules that are missing. To add them, type something along the lines of the following (C<Catalyst::Model::DBIC::Schema> is used here as a representative example):
77
78 # perl -MCPAN -e shell
79
80 cpan shell -- CPAN exploration and modules installation (v1.87)
81 ReadLine support enabled
82
83 cpan> install Catalyst::Model::DBIC::Schema
84 ...
85
86
87=head2 OTHER ITEMS
88
89Although Catalyst is a very flexible platform that can be used for wide variety of applications, the bulk of Catalyst developers use it to build web applications that set on top of a relational database. Consequently, you will very likely need:
90
91=over 4
92
93=item *
94
95A Web Server
96
97Although Apache is obviously an extremely popular choice, lighttpd has a growing following. Catalyst applications can also be run under IIS.
98
99=item *
100
101A Database
102
103Although other databases with support for Perl are certainly possible, most Catalyst applications tend to use one of the following:
104
105=item *
106
107SQLite
108
109SQLite is a popular choice for development and testing because it does note require that a database daemon be running or configured. It operates on C<.db> files that are generally located in the directory of your Catalyst application project. More information is available at L<www.sqlite.org>.
110
111=item *
112
113MySQL
114
115MySQL is an extremely popular database available at L<www.mysql.com>.
116
117=item *
118
119PostgreSQL
120
121PostgreSQL is a well-respected database available at L<http://www.postgresql.org/>.
122
123=back
124
125This tutorial will primarily focus on SQLite because of its simplicity; however, modifications in the script required to support MySQL and PostgreSQL will be presented in Appendix X.
126
127B<Note:> One of the advantages of the MVC design patterns is that applications become much more database independent. As such, you will notice that only the C<.sql> files used to initialize the database change between database systems... the Catalyst code all remains the same.
128
129=back
130
131