Catalyst::Manual::Installation::CentOS4 - Catalyst Installation on CentOS 4
This document provides directions on how to install CentOS 4 (a rebuild of RedHat Enterprise 4) and then install Catalyst.
If you already have a functioning install of CentOS, RHEL, or a comparable Linux OS, you should be able to skip this first section and go straight to the INSTALL CATALYST section.
INSTALL CATALYST
NOTE: You might want to consult the latest version of this document. It is available at: http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Runtime/lib/Catalyst/Manual/Installation/CentOS4.pod
These directions are written for CentOS 4.3 on an i386 machine; however, you can substitute other versions as they become available.
Go to http://isoredirect.centos.org/centos/4/isos/i386/ and click the nearest mirror.
Download CentOS-4.3-i386-bin1of4.iso (you only need the first disk).
CentOS-4.3-i386-bin1of4.iso
Burn the .iso to CD.
Insert the CD into your machine and power it up.
Hit Enter at the boot: prompt.
Enter
boot:
CD media test: you can either select OK or Skip depending on whether or not you trust your burn.
OK
Skip
The installation GUI should start. Click next at the "Welcome to CentOS-4" screen.
Select a language and click Next.
Next
Select a keyboard configuration and click Next.
Select Custom for the installation type and click Next.
Custom
Leave Automatically partition selected on the Disk Partitioning Setup and click Next.
Automatically partition
Disk Partitioning Setup
Uncheck Review (and modify if needed) the partitions created, but leave the rest of the default settings on the Automatic Partitioning screen. Then click Next.
Review (and modify if needed) the partitions created
Automatic Partitioning
Click Yes at the Are you sure you want to do this? warning.
Yes
Are you sure you want to do this?
Click Next on the Boot Loader Configuration screen.
Boot Loader Configuration
Update the Network Configuration screen as necessary and click Next.
Network Configuration
Check Remote Login (SSH) and click Next on the Firewall Configuration screen.
Remote Login (SSH)
Firewall Configuration
Select additional languages as necessary. Click Next.
Select the appropriate time zone and click Next.
Enter a root password and click Next.
Scroll to the bottom of the Package Group Selection screen and check Minimal (the last option). Click Next.
Package Group Selection
Minimal
Click Next at the About to Install screen.
About to Install
The installation will prepare the hard drive and then install the required rpm packages.
Once the installation completes, remove the CD and click Reboot.
Reboot
Type vi /etc/sysconfig/iptables and add the following line as the third to last line of the file (above the -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited line):
vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT
This will allow Catalyst to make use of port 3000 (the default for the development server).
Type service iptables restart to restart the iptables firewall using the updated configuration.
service iptables restart
Type yum -y update to retrieve the latest patches.
yum -y update
Type yum -y install gcc expat-devel sqlite3 to install several packages used by Catalyst.
yum -y install gcc expat-devel sqlite3
Type the following:
$ perl -MCPAN -e shell ... Are you ready for manual configuration? [yes] n ... cpan shell -- CPAN exploration and modules installation (v1.7601) ReadLine support available (try 'install Bundle::CPAN') cpan> force install Module::Build ... cpan> quit
Optional: The remaining steps of the installation could run significantly faster if you configure a fast mirror that uses HTTP vs. FTP (both transfer data at the same rate once the transfer is in progress, but HTTP connects much more quickly... and a Catalyst installation involves many connections). One way to do this is to answer yes to the Are you ready for manual configuration? prompt when you ran perl -MCPAN -e shell above. Or, you can rerun the script by entering the following command at the cpan> prompt:
yes
Are you ready for manual configuration?
perl -MCPAN -e shell
cpan>
cpan> o conf init
It will then take you through the configuration dialog.
However, it's often easiesr to avoid the full configuration dialog and manually add a URL. To prepend a new URL to the front of the list, use the unshift option to o conf:
unshift
o conf
cpan> o conf urllist unshift http://www.perl.com/CPAN/
Where http://www.perl.com/CPAN/ is replaced by a nearby, HTTP-based mirror. You can get a list of all mirrors (including where they are located, their bandwidth, and their update frequency) at http://www.perl.com/CPAN/MIRRORED.BY.
http://www.perl.com/CPAN/
Then, be sure to save your changes (or they will be lost the next time you restart the CPAN shell):
cpan> o conf commit
You can view the current settings with o conf urllist (or just o conf to view all settings):
o conf urllist
cpan> o conf urllist urllist http://www.perl.com/CPAN/ Type 'o conf' to view configuration edit options
Note that multiple values can be entered for the urllist option (the first entry will be used as long as it responds).
urllist
Type wget http://www.shadowcatsystems.co.uk/static/cat-install to retrieve a copy of the cat-install script.
wget http://www.shadowcatsystems.co.uk/static/cat-install
cat-install
Type vi cat-install to open the installer script, then insert the following lines at the bottom of the file (after the install('Catalyst'); line):
vi cat-install
install('Catalyst');
install('Catalyst::Devel'); install('ExtUtils::ParseXS'); install('Digest::SHA1'); install('Digest::SHA'); install('Class::DBI'); install('DBIx::Class'); install('DBIx::Class::HTMLWidget'); install('Module::Install'); install('Catalyst::Plugin::ConfigLoader'); install('Catalyst::Plugin::Session'); install('Catalyst::Plugin::Session::State::Cookie'); install('Catalyst::Plugin::Session::Store::FastMmap'); install('Catalyst::Plugin::Authorization::ACL'); install('Catalyst::Plugin::Authentication'); install('Catalyst::Plugin::Authorization::Roles'); install('Catalyst::Plugin::Authentication::Store::DBIC'); install('Catalyst::Plugin::DefaultEnd'); install('Catalyst::Plugin::StackTrace'); install('Catalyst::Plugin::Dumper'); install('Catalyst::Plugin::HTML::Widget'); install('Catalyst::Model::DBIC::Schema'); install('Catalyst::View::TT'); install('Test::WWW::Mechanize'); install('Test::WWW::Mechanize::Catalyst'); install('Test::Pod'); install('Test::Pod::Coverage');
Type perl cat-install. It will take a while to complete.
perl cat-install
You should now have a functioning Catalyst installation with the modules and plugins required to run the Catalyst tutorial.
Download the tarball of the final tutorial application:
$ wget http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/Final_Tarball/MyApp.tgz
Untar it:
$ tar zxvf MyApp.tgz $ cd MyApp
Run the tests:
$ CATALYST_DEBUG=0 prove --lib lib t t/02pod...............skipped all skipped: set TEST_POD to enable this test t/03podcoverage.......skipped all skipped: set TEST_POD to enable this test t/01app...............ok t/controller_Login....ok t/live_app01..........ok 1/0[debug] ***Root::auto User not found, forwarding to /login t/live_app01..........ok 2/0[debug] ***Root::auto User not found, forwarding to /login t/live_app01..........ok 15/0[debug] ***Root::auto User not found, forwarding to /login t/live_app01..........ok 16/0[debug] ***Root::auto User not found, forwarding to /login t/live_app01..........ok t/model_MyAppDB.......ok All tests successful, 2 tests skipped. Files=6, Tests=55, 11 wallclock secs ( 4.68 cusr + 4.84 csys = 9.52 CPU)
You should see All tests successful.
All tests successful
Kennedy Clark, hkclark@gmail.com
hkclark@gmail.com
Please report any errors, issues or suggestions to the author. The most recent version of the Catalyst Tutorial can be found at http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Runtime/lib/Catalyst/Manual/Tutorial/.
Copyright 2006, Kennedy Clark, under Creative Commons License (http://creativecommons.org/licenses/by-nc-sa/2.5/).
To install Catalyst::Runtime, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Runtime
CPAN shell
perl -MCPAN -e shell install Catalyst::Runtime
For more information on module installation, please visit the detailed CPAN module installation guide.