Commit | Line | Data |
4d583dd8 |
1 | =head1 NAME |
2 | |
64ccd8a8 |
3 | Catalyst::Manual::Installation::CentOS4 - Catalyst Installation on CentOS 4 |
4d583dd8 |
4 | |
5 | |
6 | |
7 | =head1 DESCRIPTION |
8 | |
64ccd8a8 |
9 | This document provides directions on how to install CentOS 4 (a rebuild |
10 | of RedHat Enterprise 4) and then install Catalyst. |
4d583dd8 |
11 | |
64ccd8a8 |
12 | If you already have a functioning install of CentOS, RHEL, or a |
13 | comparable Linux OS, you should be able to skip this first section and |
14 | go straight to the C<INSTALL CATALYST> section. |
4d583dd8 |
15 | |
d645910d |
16 | B<NOTE:> You might want to consult the latest version of this document. It |
17 | is available at: |
18 | L<http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Runtime/lib/Catalyst/Manual/Installation/CentOS4.pod> |
19 | |
20 | |
4d583dd8 |
21 | |
22 | =head1 INSTALL CENTOS |
23 | |
64ccd8a8 |
24 | These directions are written for CentOS 4.3 on an i386 machine; however, |
25 | you can substitute other versions as they become available. |
4d583dd8 |
26 | |
27 | |
28 | =over 4 |
29 | |
30 | =item * |
31 | |
64ccd8a8 |
32 | Go to L<http://isoredirect.centos.org/centos/4/isos/i386/> and click the |
33 | nearest mirror. |
4d583dd8 |
34 | |
35 | =item * |
36 | |
37 | Download C<CentOS-4.3-i386-bin1of4.iso> (you only need the first disk). |
38 | |
39 | =item * |
40 | |
41 | Burn the .iso to CD. |
42 | |
43 | =item * |
44 | |
45 | Insert the CD into your machine and power it up. |
46 | |
47 | =item * |
48 | |
49 | Hit C<Enter> at the C<boot:> prompt. |
50 | |
51 | =item * |
52 | |
64ccd8a8 |
53 | CD media test: you can either select C<OK> or C<Skip> depending on |
54 | whether or not you trust your burn. |
4d583dd8 |
55 | |
56 | =item * |
57 | |
64ccd8a8 |
58 | The installation GUI should start. Click next at the "Welcome to |
59 | CentOS-4" screen. |
4d583dd8 |
60 | |
61 | =item * |
62 | |
63 | Select a language and click C<Next>. |
64 | |
65 | =item * |
66 | |
67 | Select a keyboard configuration and click C<Next>. |
68 | |
69 | =item * |
70 | |
71 | Select C<Custom> for the installation type and click C<Next>. |
72 | |
73 | =item * |
74 | |
64ccd8a8 |
75 | Leave C<Automatically partition> selected on the C<Disk Partitioning |
76 | Setup> and click C<Next>. |
4d583dd8 |
77 | |
78 | =item * |
79 | |
64ccd8a8 |
80 | Uncheck C<Review (and modify if needed) the partitions created>, but |
81 | leave the rest of the default settings on the C<Automatic Partitioning> |
82 | screen. Then click C<Next>. |
4d583dd8 |
83 | |
84 | =item * |
85 | |
86 | Click C<Yes> at the C<Are you sure you want to do this?> warning. |
87 | |
88 | =item * |
89 | |
90 | Click C<Next> on the C<Boot Loader Configuration> screen. |
91 | |
92 | =item * |
93 | |
94 | Update the C<Network Configuration> screen as necessary and click C<Next>. |
95 | |
96 | =item * |
97 | |
64ccd8a8 |
98 | Check C<Remote Login (SSH)> and click C<Next> on the C<Firewall |
99 | Configuration> screen. |
4d583dd8 |
100 | |
101 | =item * |
102 | |
103 | Select additional languages as necessary. Click C<Next>. |
104 | |
105 | =item * |
106 | |
107 | Select the appropriate time zone and click C<Next>. |
108 | |
109 | =item * |
110 | |
111 | Enter a root password and click C<Next>. |
112 | |
113 | =item * |
114 | |
64ccd8a8 |
115 | Scroll to the bottom of the C<Package Group Selection> screen and check |
116 | C<Minimal> (the last option). Click C<Next>. |
4d583dd8 |
117 | |
118 | =item * |
119 | |
120 | Click C<Next> at the C<About to Install> screen. |
121 | |
122 | =item * |
123 | |
64ccd8a8 |
124 | The installation will prepare the hard drive and then install the |
125 | required rpm packages. |
4d583dd8 |
126 | |
127 | =item * |
128 | |
129 | Once the installation completes, remove the CD and click C<Reboot>. |
130 | |
131 | =item * |
132 | |
64ccd8a8 |
133 | Type C<vi /etc/sysconfig/iptables> and add the following line as the |
134 | third to last line of the file (I<above> the C<-A RH-Firewall-1-INPUT -j |
135 | REJECT --reject-with icmp-host-prohibited> line): |
4d583dd8 |
136 | |
137 | -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT |
138 | |
64ccd8a8 |
139 | This will allow Catalyst to make use of port 3000 (the default for the |
140 | development server). |
4d583dd8 |
141 | |
64ccd8a8 |
142 | Type C<service iptables restart> to restart the iptables firewall using |
143 | the updated configuration. |
4d583dd8 |
144 | |
145 | =item * |
146 | |
64ccd8a8 |
147 | Type C<yum -y update> to retrieve the latest patches. |
4d583dd8 |
148 | |
149 | =back |
150 | |
151 | |
152 | =head1 INSTALL CATALYST |
153 | |
154 | =over 4 |
155 | |
156 | =item * |
157 | |
97ed9466 |
158 | Type C<yum -y install gcc expat-devel sqlite3> to install several |
64ccd8a8 |
159 | packages used by Catalyst. |
4d583dd8 |
160 | |
161 | =item * |
162 | |
163 | Type the following: |
164 | |
ce1dd321 |
165 | $ perl -MCPAN -e shell |
4d583dd8 |
166 | |
167 | ... |
168 | |
169 | Are you ready for manual configuration? [yes] n |
170 | |
171 | ... |
172 | |
173 | cpan shell -- CPAN exploration and modules installation (v1.7601) |
174 | ReadLine support available (try 'install Bundle::CPAN') |
315ba149 |
175 | |
4d583dd8 |
176 | cpan> force install Module::Build |
177 | |
178 | ... |
179 | |
180 | cpan> quit |
181 | |
ce1dd321 |
182 | =item * |
183 | |
184 | B<Optional:> The remaining steps of the installation could run |
185 | significantly faster if you configure a fast mirror that uses HTTP vs. |
186 | FTP (both transfer data at the same rate once the transfer is in |
187 | progress, but HTTP connects much more quickly... and a Catalyst |
188 | installation involves many connections). One way to do this is to |
189 | answer C<yes> to the C<Are you ready for manual configuration?> prompt |
190 | when you ran C<perl -MCPAN -e shell> above. Or, you can rerun the |
191 | script by entering the following command at the C<cpanE<gt>> prompt: |
192 | |
193 | cpan> o conf init |
194 | |
195 | It will then take you through the configuration dialog. |
196 | |
197 | However, it's often easiest to manually edit the C<urllist> setting in |
198 | the CPAN configuration file (global configuration settings are located |
199 | in C</usr/lib/perl5/5.8.5/CPAN/Config.pm> with per-user override |
200 | settings optionally specified in C<~/.cpan/CPAN/MyConfig.pm>). For |
201 | example, open C</usr/lib/perl5/5.8.5/CPAN/Config.pm> in your editor and |
202 | update the C<urllist> entry (do not change or delete the other |
203 | settings): |
204 | |
205 | $CPAN::Config = { |
206 | ... |
207 | 'urllist' => [q[http://www.perl.com/CPAN/]], |
208 | ... |
209 | }; |
210 | 1; |
211 | __END__ |
212 | |
213 | Where C<http://www.perl.com/CPAN/> is replaced by a nearby, HTTP-based |
214 | mirror. You can get a list of all mirrors (including where they are |
215 | located, their bandwidth, and their update frequency) at |
216 | L<http://www.perl.com/CPAN/MIRRORED.BY>. |
217 | |
4d583dd8 |
218 | =item * |
219 | |
64ccd8a8 |
220 | Type C<wget http://www.shadowcatsystems.co.uk/static/cat-install> to |
221 | retrieve a copy of the C<cat-install> script. |
4d583dd8 |
222 | |
223 | =item * |
224 | |
64ccd8a8 |
225 | Type C<vi cat-install> to open the installer script, then insert the |
226 | following lines at the bottom of the file (after the |
227 | C<install('Catalyst');> line): |
4d583dd8 |
228 | |
fcf42995 |
229 | install('Catalyst::Devel'); |
315ba149 |
230 | install('ExtUtils::ParseXS'); |
97ed9466 |
231 | install('Digest::SHA1'); |
315ba149 |
232 | install('Digest::SHA'); |
4d583dd8 |
233 | install('Class::DBI'); |
234 | install('DBIx::Class'); |
235 | install('DBIx::Class::HTMLWidget'); |
ce1dd321 |
236 | install('Module::Install'); |
237 | install('Catalyst::Plugin::ConfigLoader'); |
4d583dd8 |
238 | install('Catalyst::Plugin::Session'); |
239 | install('Catalyst::Plugin::Session::State::Cookie'); |
240 | install('Catalyst::Plugin::Session::Store::FastMmap'); |
241 | install('Catalyst::Plugin::Authorization::ACL'); |
242 | install('Catalyst::Plugin::Authentication'); |
243 | install('Catalyst::Plugin::Authorization::Roles'); |
244 | install('Catalyst::Plugin::Authentication::Store::DBIC'); |
245 | install('Catalyst::Plugin::DefaultEnd'); |
246 | install('Catalyst::Plugin::StackTrace'); |
247 | install('Catalyst::Plugin::Dumper'); |
315ba149 |
248 | install('Catalyst::Plugin::HTML::Widget'); |
4d583dd8 |
249 | install('Catalyst::Model::DBIC::Schema'); |
250 | install('Catalyst::View::TT'); |
ce1dd321 |
251 | install('Test::WWW::Mechanize'); |
4d583dd8 |
252 | install('Test::WWW::Mechanize::Catalyst'); |
315ba149 |
253 | install('Test::Pod'); |
254 | install('Test::Pod::Coverage'); |
4d583dd8 |
255 | |
256 | =item * |
257 | |
258 | Type C<perl cat-install>. It will take a while to complete. |
259 | |
260 | =back |
261 | |
64ccd8a8 |
262 | You should now have a functioning Catalyst installation with the modules |
263 | and plugins required to run the Catalyst tutorial. |
4d583dd8 |
264 | |
265 | |
ce1dd321 |
266 | =head1 TESTING THE INSTALLATION |
267 | |
268 | =over 4 |
269 | |
270 | =item * |
271 | |
272 | Download the tarball of the final tutorial application: |
273 | |
274 | $ wget http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/Final_Tarball/MyApp.tgz |
275 | |
276 | =item * |
277 | |
278 | Untar it: |
279 | |
280 | $ tar zxvf MyApp.tgz |
281 | $ cd MyApp |
282 | |
283 | =item * |
284 | |
285 | Run the tests: |
286 | |
287 | $ CATALYST_DEBUG=0 prove --lib lib t |
288 | t/02pod...............skipped |
289 | all skipped: set TEST_POD to enable this test |
290 | t/03podcoverage.......skipped |
291 | all skipped: set TEST_POD to enable this test |
292 | t/01app...............ok |
293 | t/controller_Login....ok |
294 | t/live_app01..........ok 1/0[debug] ***Root::auto User not found, forwarding to /login |
295 | t/live_app01..........ok 2/0[debug] ***Root::auto User not found, forwarding to /login |
296 | t/live_app01..........ok 15/0[debug] ***Root::auto User not found, forwarding to /login |
297 | t/live_app01..........ok 16/0[debug] ***Root::auto User not found, forwarding to /login |
298 | t/live_app01..........ok |
299 | t/model_MyAppDB.......ok |
300 | All tests successful, 2 tests skipped. |
301 | Files=6, Tests=55, 11 wallclock secs ( 4.68 cusr + 4.84 csys = 9.52 CPU) |
302 | |
303 | You should see C<All tests successful>. |
304 | |
305 | =back |
306 | |
307 | |
308 | |
4d583dd8 |
309 | =head1 AUTHOR |
310 | |
311 | Kennedy Clark, C<hkclark@gmail.com> |
312 | |
d645910d |
313 | Please report any errors, issues or suggestions to the author. The |
7d310f12 |
314 | most recent version of the Catalyst Tutorial can be found at |
d645910d |
315 | L<http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Runtime/lib/Catalyst/Manual/Tutorial/>. |
4d583dd8 |
316 | |
64ccd8a8 |
317 | Copyright 2006, Kennedy Clark, under Creative Commons License |
318 | (L<http://creativecommons.org/licenses/by-nc-sa/2.5/>). |