The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to Install mod_perl

Discussion in 'General Discussion' started by eglwolf, Jan 2, 2004.

  1. eglwolf

    eglwolf Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Sometime back I had mod_perl installed on my server, and I was given the install instructions. I wanted to pass them on to everyone. Usually I can only ask questions so I thought it would be nice to turn around and contribute this to the board.


    It works great. This has been used to install on RH 7.3 & 9, and cpanel 8.xxx servers:


    PLESE NOTE: change the x.xx to the actual version number of mod_perl you have downloaded.


    # Get the mod_perl .tar.gz from http://search.cpan.org/dist/mod_perl/

    # unpack it:
    $ tar xzf mod_perl-x.xx.tar.gz

    # get into the directory
    $ cd mod_perl-x.xx

    # Configure
    $ perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs EVERYTHING=1

    # Make
    $ make

    # Install
    $ make install

    # Activate
    $ /usr/local/apache/bin/apxs -a -n perl -i libperl.so

    That last line is the one you'll need to run if you re-compile
    Apache. The mod_perl binary is at
    /home/mod_perl/mod_perl-x.xx/apaci/libperl.so, so a simple way to do
    this would be to put the following lines in a file:

    --- cut here ---
    #!/bin/sh

    libperl=/home/mod_perl/mod_perl-x.xx/apaci/libperl.so
    apxs=/usr/local/apache/bin/apxs

    $apxs -a -n perl -i $libperl

    /etc/init.d/httpd stop
    /etc/init.d/httpd start
    --- cut here ---

    Name the file add-mod-perl.sh and execute "chmod +x
    add-mod-perl.sh". Then, after compileing apache run the script
    ("./add-mod-perl.sh") and it should all work.


    You might need to actually restart apache from WHM. The when you view the WHM news you will now see mod_perl installed.

    Also, everytime you recompile apache you have to add the mod_perl back in after, so you will need to run ./add-mod-perl.sh again like you did orginally.

    cPanel.net Support Ticket Number: step by step instructions for RH 7.3/9 - cpanel 8
     
  2. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    Is this the same thing as the Perl Module option in easyapache that says it is not compatible with php?
     
  3. eglwolf

    eglwolf Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    No I do not believe so, I orginally tried that and that did not work correctly.
     
  4. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    I got to the activate step and got an error:

    root@server2 [/temp/mod_perl-1.29]# /usr/local/apache/bin/apxs -a -n perl -i libperl.so
    [activating module `perl' in /usr/local/apache/conf/httpd.conf]
    cp libperl.so /usr/local/apache/libexec/libperl.so
    cp: cannot stat `libperl.so': No such file or directory
    apxs:Break: Command failed with rc=1


    Any thoughts?
     
  5. drmueyx

    drmueyx Active Member

    Joined:
    Oct 6, 2003
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    in your apxs command you are saying that the file libperl.so is in the current directory.
    Apparently it is because cp cannot stat it because it does not exist there. Specify the entire path and it will work I bet.

    DMuey
     
    #5 drmueyx, Jan 4, 2004
    Last edited: Jan 5, 2004
  6. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    yeah, that is working now.

    Thanks!
     
  7. infinityws

    infinityws Well-Known Member

    Joined:
    Feb 20, 2003
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    16
    do you mean this path

    /home/mod_perl/mod_perl-x.xx/apaci/libperl.so


    or do a locate libperl.so and use one of those paths
     
  8. infinityws

    infinityws Well-Known Member

    Joined:
    Feb 20, 2003
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    16
    Ok I followed the instructions and apache restarted. Do I need to add anything to the config file or recompile, etc?
     
  9. coastinc

    coastinc Well-Known Member

    Joined:
    Mar 13, 2002
    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    16
    These instructions work fine exactly as indicated, nothing more or less is needed to be done.
     
  10. mercedez

    mercedez Registered

    Joined:
    Sep 4, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    So what exactly is needed at this step?

    Thanks in advance
     
Loading...

Share This Page