(Answer) (Category) Faq-O-Matic Faq-O-Matic : (Category) Administrators' Guide : (Category) Install :
How do I install if I'm not root?
If you don't have the privilege to install the modules in a system directory, tell Makefile.PL that before you start:
 % mkdir ~/user_perl
 % perl Makefile.PL PREFIX=~/user_perl
 % make
 % make install
That will install the FAQ-O-Matic in your local directory. The same technique also works when installing other modules, such as CGI.pm and GD.pm.

It is also a good idea to ensure that other users can read your installed modules (for example, if the web server runs CGIs as user "nobody"):

 % cd ~/user_perl
 % find . -type d | xargs chmod a+rx
 % find . -type f | xargs chmod a+r

But it still tries to install the man pages in the normal prefix:
Warning: You do not have permissions to install into /usr/local/lib/site_perl/i386-linux at /usr/lib/perl5/5.005/ExtUtils/Install.pm line 61. mkdir /usr/local/man/man3: Permission denied at /usr/lib/perl5/5.005/ExtUtils/Install.pm line 57 make: *** [pure_site_install] Error 2
On my host where I did not have root access I was getting errors when trying to install and also when creating local copies of the CGI and GD modules.
This I traked down to the fact the Prefix command was not being used.

A substitution of the following command was found to work correctly

Replace

    % perl Makefile.PL PREFIX=~/user_perl
With

    % perl Makefile.PL INSTALLDIRS=site INSTALLSITELIB=~/user_perl


Note If a previous attempt has failed you will need to delete the file created by Makefile.PL before rerunning using this command.
Thanks Jon for an excellent program
from http://webmasterworkshop.com


I managed to achieve a clean installation of Faq-O-Matic 2.712 on Solaris 8/SPARC with Perl 5.6 using the following commands:
    % perl Makefile.P PREFIX=~/user_perl INSTALLSITELIB=~/user_perl INSTALLDIRS=site 
                      INSTALLMAN1DIR=~/man/man1 INSTALLMAN3DIR=~/man/man3 
    % make
    % make install

Of course the directories

    ~/user_perl
    ~/man/man1
    ~/man/man3 
had to be pre-created.

Thanks Jon!

Subject: How to move a FAQ with no root access... or use perl...
   From: Boyd Lynn Gerber <gerberb@zenez.com>
     To: jonh@jonh.net
   Date: Thu, October 25, 2001 4:33 pm

Jon,

You can use this below as you want.  If you think I should post it to the
list let me know.

Thanks again for all the help.

Boyd Gerber

FAQ-O-Matic is a perl based module to control, manage, and maintain a FAQ.
It allows users to help in maintaining a FAQ.  It requires a valid
username/email address and a password.  It uses rcs for version control.

FAQ-O-Matic is available at

http://faqomatic.sourceforge.net/

You also need RCS. My 'rcs -V' says version 5.7, but I don't know what's
necessary. RCS is a GNU program, available from (for example)

ftp://gatekeeper.dec.com/pub/GNU.

To begin the perl modules on the site were to old and I needed newer
version.  To start I created a local .cpan directory.  To do this you
create a local .cpan.   But you need to be able to make and install perl.
To do this I created a perl-local or cpan-local file and created a
directory local with a bin, lib, share, info, and man.  You have to have
the basic three bin, lib, and man.

-----------------------------Cut Here perl-local---------------------
PREFIX=/home/user_directory/local \
INSTALLPRIVLIB=/home/user_directory/local/lib/perl5 \
INSTALLSCRIPT=/home/user_directory/local/bin \
INSTALLSITELIB=/home/user_directory/local/lib/perl5/site_perl \
INSTALLBIN=/home/user_directory/local/bin \
INSTALLMAN1DIR=/home/user_directory/local/lib/perl5/man \
INSTALLMAN3DIR=/home/user_directory/local/lib/perl5/man/man3
-----------------------------Cut Here--------------------------------

What I did was use this as my perl make command.

perl Makefile.PL `cat ~/perl-local`

The key is you have to have write access to the directory where you have
your files.

This now allows you to make and install the perl files.  But you still
have to deal with the system perl files.  Perl 5 has an enviroment
variable to solve this.

I add this to my .profile.  I use the korn shell.

PERL5LIB=/home/user_directory/local/lib/perl5:/home/user_diretory/local/lib/perl5/site_perl:
export PERL5LIB

Now I could run perl with the correct modules.

The next problem was getting apache to be able to run the correct perl
files.

So I had these two lines added to the vhost.conf file.

Set Env PERL5LIB /home/boyd/local/lib/perl5:/home/boyd/local/lib/perl5/site_perl:
PassEnv PERL5LIB

You may need a PATH or LD_LIBRARY_PATH that you can do the same way.

Now to get FAQ-O-MATIC to run I had to edit the config file and fom.  I
made the changes for the correct locations of the files, sending email,
and where and how to run rcs.

In the fom file.  I did the following.

from
#!/usr/bin/perl -wT to
use lib '.';                    # for suid installations

#!/usr/bin/perl -wT -I/home/user_directory/local/lib/perl5
use lib '.';                    # for suid installations
use lib '/home/user_directory/local/lib/perl5/site_perl';

These files are in the cgi-bin/fom or what ever directory you have the fom
file installed.

This got FAQ-O-MATIC running.  I still had some lock problems with RCS.  I
used nouser on my site where this site used nobody.  So I had to remove
and recreate the lock files.

#to unlock the RCS/*,v files I used this...
#to avoid the enter a comment use -M

rcs -M -u RCS/*,v


On some systems you can not just su username.  You need to login in as the
user the lock files will be controlled by.

I my case I have to be nobody.

#to lock again the files.  remember the -M is used to avoid adding a
#comment.

rcs -l -M RCS/*,v

At this point everything is working.  I hope this helps some one else.

Good Luck,

--
Boyd Gerber <gerberb@zenez.com>
ZENEZ   3748 Valley Forge Road, Magna Utah  84044
Office 801-250-0795 FAX 801-250-7975
[Append to This Answer]
Previous: (Answer) Quick Start
Next: (Answer) Can I name the CGI something other than "fom"?
This document is: http://www.jonh.net/cgi-bin/faqomatic/fom?file=437
[Search] [Appearance]
This is a Faq-O-Matic 2.718d.
Hosted by SourceForge Logo and jonh.net.