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