Open Source Web Development with LAMP Using Linux, Apache, MySQL, Perl, and PHP [Electronic resources]

James Lee, Brent Ware

نسخه متنی -صفحه : 136/ 103
نمايش فراداده

10.2 Installing Embperl

Embperl does not come standard on Red Hat (yet), so you need to install it. Get the latest source from [1] so the file we want is HTML-Embperl-2.0b3.tar.gz. Save it in/tmp.

[1] The latest stable release was 1.3.4, but the new release, version 2, will probably be the stable release when this book is printed, so we will install version 2.

Change directory to /tmp and do the following:

$ cd /tmp 
$ tar xzf HTML-Embperl-2.0b3.tar.gz 
$ cd HTML-Embperl-2.0b3 
$ perl Makefile.PL 

You will then be prompted for some site-specific information. The important information you need is the locations of the following files:

httpd.h located at /usr/include/apache/httpd.h

httpd located at /usr/sbin/httpd

mod_env.so located at /usr/lib/apache/mod_env.so

Check that these files can be found at these locations on your machine. If you find them in a different location, make the necessary adjustments in the following responses (wrapped for readability):

Build with support for Apache mod_perl?(y/n) [y]y 
Searching for Apache sources... 
Look at .. 
Look at ../src 
Look at ./src 
Apache source not found, enter path name or q to quit 
[]/usr/include/apache 
Searching for Apache sources... 
Look at /usr/include/apache 
Use /usr/include/apache as Apache source(y/n) [y]y 
Will use /usr/include/apache for Apache Headers 
Enter path and file to start as httpd [/usr/include/apache/httpd] 
/usr/sbin/httpd 
Apache Version Server version: Apache/1.3.19 (Unix) (Red-Hat/Linux) 
Library for mod_env.c not found, please enter path to mod_env.so 
[]/usr/lib/apache 
. 
. 
. 

Now make, test, and install:

$ make 
$ make test 
$ su 
# make install 

That's it, assuming no errorsEmbperl is installed. Make sure by checking the online documentation:

$ perldoc HTML::Embperl 

You should see the HTML::Embperl man page.