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