Catalyst-Manual
view release on metacpan or search on metacpan
lib/Catalyst/Manual/Tutorial/01_Intro.pod view on Meta::CPAN
$ sudo aptitude update
$ sudo aptitude install emacs
In general, it is expected that people will
boot up the Tutorial VM on their main desktop (the "host machine" using
the terminology above) and then use that main desktop machine to SSH and
web browse into the "guest VM" as they work through the tutorial. If
you wish to install X Windows (or any other packages), just use the
C<aptitude> (or C<apt-get>) Debian commands.
For example, to install X Windows with Fluxbox (a lightweight
WindowManager -- it is great for things like this tutorial since it's
about 1/10th the size of other common X Windows environments), you can
do:
$ sudo aptitude update
$ sudo aptitude install xorg fluxbox iceweasel
And then start X Windows from the B<VM Console> with this command:
$ startx
Note that if you want to start Fluxbox from an SSH session, you can use
the C<sudo dpkg-reconfigure x11-common> and select "anybody" from the
menu. Otherwise, you will need to be on the actual "VM console" to
start it.
If you have a preference for the Gnome desktop environment, you can do:
$ sudo aptitude update
$ sudo aptitude install gnome iceweasel
$
$ # You can reboot or start with 'startx', we will just reboot here
$ reboot
For KDE, just substitute the package name "C<kde>" for "C<gnome>" above.
$ sudo aptitude install kde iceweasel
Note that C<iceweasel> is basically used to install Firefox on Debian
boxes. You can start it under X Windows with either the C<firefox>
command or the C<iceweasel> command (or use the menus). You can get
more information on Iceweasel at L<https://wiki.debian.org/Iceweasel>.
Also, you might need to add more memory to your virtual machine if you
want to run X Windows (or other tools that might require additional
memory). Consult the documentation of your virtualization software
for instructions on how to do this (it's usually pretty simple).
=back
You may note that the Tutorial Virtual Machine uses L<local::lib> so
that the Perl modules are run from ~/perl5 (in this case,
/home/catalyst/perl5) vs. the usual location of your "system Perl". We
recommend that you also consider using this very handy module. It can
greatly ease the process of maintaining and testing different
combinations or Perl modules across development, staging, and production
servers. (The "relocatable Perl" feature can also be used to run
both the modules B<and> Perl itself from your home directory [or any
other directory you chose]).
B<Note>: Please provide feedback on how the Virtual Machine approach for
the tutorial works for you. If you have suggestions or comments, you
can reach the author through the email address at the bottom of this
page or via an RT ticket at
L<https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Manual>.
=head2 Sorting Out Virtual Machine Network-Related Issues
In general, using a virtual machine to work through the tutorial is
*much* easier than trying to do it in other environments, especially if
you are new to Catalyst (or Perl or CPAN or ...). However, it's
possible that you could run into a few network-related issues. The good
news is that there is lots of information about the issue available via
search engines on the Internet. Here is some background information to
get you started.
In Step 5 of the prior section above, we assumed that a "Bridged Mode"
configuration and DHCP will work (it should for most people). If DHCP
is not working or is not available in your location, most virtual
machine "host" environments let you select between one of several
different types of networking between the "guest" and the "host"
machine.
1) Bridged
2) NAT
3) Local host only
The Tutorial Virtual Machine defaults to "Bridged" -- this should result
in the VM acting like another device on your network that will get a
different DHCP IP address than the host machine. The advantage of this
approach, is that you can easily SSH and web browse to the guest virtual
machine. In general, this is the best option if you want to be able to
boot up the VM and then use your SSH client and web browser from your
main machine to connect into the virtual machine.
In some environments, you might have better luck with "NAT" (Network
Address Translation) mode. With this configuration, the guest VM shares
the same IP address as the host machine. The downside of this approach
is that special configuration is required if you want to be able to SSH
or web browse to the guest VM. The NAT option should automatically
allow the VM "outbound connection" (e.g., to the Internet if you want to
install additional Debian packages), but it requires special
configuration if you want to get "inbound connections" that go from some
other machine (including the "host machine") into the VM. Some virtual
machine host environments let you configure a "static NAT" or "port
forwarding" to reach the guest OS, but others omit this functionality.
Note: NAT mode can work fine if you install X Windows and do the whole
tutorial locally on the actual VM vs. using SSH and a web browser from
your host machine.
"Local host only" mode let's the guest VM and the host machine talk on a
"private subnet" that other devices in your network cannot reach. This
can work as long as you don't need to go from the VM to the Internet
(for example, to install other Debian packages).
( run in 0.969 second using v1.01-cache-2.11-cpan-71847e10f99 )