Build a Mason running environment on Windows

Source: Internet
Author: User

Since learning PERL/Mason, I have been building a development and running environment for Mason in Ubuntu for a long time, because Perl is the native language of ubuntu, in addition, it is very convenient to install components and modules. All the Mason development environments in the group are also based on my research Ubuntu platform.
However, how to build the running and development environment of Mason in Windows has always been a problem and I want to implement it. In this way, we can no longer limit ourselves to specific development platforms, which have new significance for both development and deployment.
After repeated attempts, we finally successfully set up the Mason environment in Windows. The following are the steps to build it.

Install ActivePerl:
Http://www.skycn.com/soft/1211.html.

Install apache2:
Bytes.

Install mod_perl:
This is the key part. You can install mod_perl in Ubuntu through the new version. If you want to manually install mod_perl in Windows, you must install apxs. You must first install httpd: devel, which I cannot find. After a long time, I finally found a method for directly installing mod_perl: Enter "ppm install http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd.pdf" in the command line to directly install mod_perl. During this period, you must enter the Apache installation directory.
After installation, add
LoadFile "D:/perl/bin/perl58.dll"
Loadmodule perl_module modules/mod_perl.so

Install libapreq2:
The Apache module also needs to be installed in ppm mode. The installation address is "ppm install http://theoryx5.uwinnipeg.ca/ppms/libapreq2.ppd.pdf ".
After installation is complete, add it in httpd. conf.
LoadFile "D:/apache2.2/bin/libapreq2.dll" <br/> loadmodule apreq_module modules/mod_apreq2.so

Install Mason
The Perl Package Manager (ppm) of ActivePerl can be opened by directly entering ppm in the command line.
Search for Mason. You can find the HTML: Mason module, right-click Install, and click Run marked actions to automatically install Mason.

Modify httpd. conf
In httpd. conf, change DocumentRoot to the working directory of your site, for example, "d:/workspace ". Add the configuration of your site to the configuration file, for example

Listen 8080 <br/> <virtualhost *: 8080> <br/> servername workshop.perl.com <br/> DocumentRoot "D:/workspace/workshop.perl.com" <br/> perlrequire "D: /workspace/handler "<br/> perlmodule HTML: Mason: apachehandler <br/> perlsetvar masoncomproot" D:/workspace/workshop.perl.com "<br/> perlsetvar masondatadir" D: /workspace/workshop.perl.com/data "<br/> <directory" D:/workspace/workshop.perl.com "> <br/> sethandler Perl-script <br/> perlhandler HTML: Mason :: apachehandler <br/> </directory> <br/> <locationmatch "(/. GIF | /. PNG | /. CSS | /. JS | /. JPG) $ "> <br/> sethandler default <br/> </locationmatch> <br/> </virtualhost>

In Windows, you do not need to manually create a data directory and grant permissions to the server account.

You can request a website page to test whether the Mason site can run properly. You can install the required modules through ppm.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.