Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I know if perl is installed, and running with my redhat. I just got the server working, and if there are any perl files that need to be installed, I think I installed them. With my windoze machine, I used to do a ppm sort of thing to install modules, If I have perl installed, how do I install perl modules?
If you run perl -V the bottom of the output will mention @INC and list a number of directories. Your modules will be held below these dirs so you can just look through them, or run a find on the module names. I tend to find it easier to just write a little perl script that tries to 'use' the modules.
okay, so what do you mean by tries to "use" the modules. So then it would list them? Also, how would I go about installing a module, like the DB_File. The perl -V (I didnt know it was case sensetive) says I'm running version 5.8.0
When I say "use" a module I mean literally have a script that says somethinglike
Code:
#!/usr/bin/perl -w
use Digest::MD5
In this case it would attempt to use the Digest::MD5 module. The easiest way I've found to install modules is to run perl -MCPAN -e shell then type install moduleName where moduleName is literally the name of the module.
Runing perl -v will just show you the version, perl -V will give you the extra info. Just about everything should be assumed to be case sensitive as most things under Linux (and Unix in general) are case sensitive.
now, I'm trying to run a cgi file in my browser, and I can't figure out what the path is for the shebang. Can I do a search for files? If so, what exactly am I searching for. Not Perl.exe, right?
You are just looking for perl - Linux doesn't use file extensions to identify wether a file is executable. I would expect you to find it as either /usr/bin/perl or /usr/local/bin/perl or possibly both. If you want to search for it use the following
Originally posted by DKY and where are the logs located?
Whoa! Logs are a webmaster's best friend
You will usually find where they are located defined within your httpd.conf file. To just guess though:
/var/log/apache
And you could also search:
locate apach.log
locate apache_log
OR just
locate apache | less
here's what happened when I tried to run the script.
./iBtest.cgi
: bad interpreter: No such file or directory
top few lines look something like so
Code:
#!/usr/bin/perl
# Change the above line to reflect your server's path to perl
##########################################################################
# This script checks your paths, prints them and also any environment
# variables. Useful for troubleshooting purposes.
#
# Copyright 2001, 2002 Luke Dawson for Ikonboard, Jarvis Entertainment Group, inc
##########################################################################
use CGI::Carp "fatalsToBrowser";
use strict;
no strict "vars";
require CGI;
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.