Configuring your programming language libraries (Medium)
Frameworks are very popular nowadays. Symfony, Rails, Django, or Dancer are all references for professional web development, and a Debian web server is no stranger to them. The libraries and modules that empower these frameworks are also popular, and it's important for system administrators to know how to set it up.
Getting started
You have the option to use prepackaged frameworks or downloading and installing it yourself. The prepackaged frameworks may offer ease of set up and administration at the cost of an older version. You will also have security updates coming from the APT system itself.
How to do it…
Search for your library. Some PEAR libraries are available on Debian, and so are CPAN libraries for Perl, Ruby gems, Python modules, and so on. Here are some useful searches:
aptitude search ^php-.* aptitude search ^lib.*-perl aptitude search ^ruby\|libruby-.* aptitude search ^python-.*
In other cases you have the pear, rubygem clients available for manual installs (CPAN comes with Debian).
apt-get install php-pear apt-get install rubygems
Here's an example, using the Dancer framework:
sudo apt-get install libdancer-perl sudo editor app.pl and type: use Dancer; get '/demo' => sub { "Dancer is OK" }; dance; perl app.pl
Now use a browser to go to
http://localhost:3000
(or usewget
orcurl
on the console) to check whether the framework is working correctly.