How To Watch https Calls to Apache 2.4 using Perl and mod_status

Author: , September 5th, 2017

Step 1: Enable Apache status and lock it down: Make sure mod_status is being loaded: grep -Rn mod_status /etc/httpd/* 1 /etc/httpd/conf.modules.d/00-base.conf:58:LoadModule status_module modules/mod_status.so /etc/httpd/conf.modules.d/00-base.conf:58:LoadModule status_module modules/mod_status.so Add support for the call just under the first DocumentRoot statement: vim /etc/httpd/conf/httpd.conf 1 2 3 4 5 6 <Location /server-status>     SetHandler server-status     Require ip […]

How To Configure CPAN to Automatically Install Dependencies Without Confirmation

Author: , March 20th, 2014

perl -MCPAN -e ‘my $c = “CPAN::HandleConfig”; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => “follow”); $c->edit(connect_to_internet_ok => “yes”); $c->edit(build_requires_install_policy => “yes”); $c->commit’

How To Fix CPAN Error Undefined subroutine &IO::Uncompress::Base::readonly

Author: , December 26th, 2013

CPAN Error: Undefined subroutine &IO::Uncompress::Base::readonly called at /usr/lib/perl5/site_perl/5.8.8/IO/Uncompress/Base.pm Looks like CentOS update installs an older version of the Scalar::Util so that Perl could not load the module. Download the Scalar::Util module and manually install it: 1 2 3 4 5 6 7 wget http://search.cpan.org/CPAN/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.35.tar.gz tar xvzf Scalar-List-Utils-*.tar.gz cd Scalar-List-Utils-* perl Makefile.PL gmake gmake test gmake […]

How To Configure AWS SES Perl Scripts

Author: , October 27th, 2011

Your mileage may vary widely… 1 2 3 4 5 export AWS_CREDENTIALS_FILE=/root/aws/aws-credentials mkdir /opt/aws/bin cd /opt/aws/bin wget http://aws-catalog-download-files.s3.amazonaws.com/AmazonSES-2011-07-21.zip unzip AmazonSES-2011-07-21.zip export AWS_CREDENTIALS_FILE=/root/aws/aws-credentials mkdir /opt/aws/bin cd /opt/aws/bin wget http://aws-catalog-download-files.s3.amazonaws.com/AmazonSES-2011-07-21.zip unzip AmazonSES-2011-07-21.zip CentOS 1 yum install libxml2-devel yum install libxml2-devel Ubuntu 1 2 3 4 5 6 7 apt-get install gcc apt-get install libssl-dev apt-get install libxml2-dev […]

How To Calculate Time In Perl Using Date::Manip OO Mode

Author: , March 22nd, 2011

my $now = new Date::Manip::Date; $now->parse(‘now’); # in GMT $now->convert(‘EST5EDT’); # in Eastern time my $then = new Date::Manip::Date; $then->parse(’200503131131′); # in GMT $then->convert(‘EST5EDT’); # in Eastern time my $delta = $now->calc($then); my @delta = $delta->value(); # get delta values as an array foreach (@delta) { $_ = abs($_); } # remove negative signs my […]

How To Fix Webmin PAM Errors At Startup

Author: , January 30th, 2011

If you are seeing PAM errors in /var/webmin/miniserv.error, then try the following: # yum install pam-devel # cpan Authen::PAM # vim /etc/pam.d/webmin auth include system-auth # service webmin restart Log will now say: PAM authentication enabled instead of : PAM test failed – maybe /etc/pam.d/webmin does not exist

Good Things To Know About CPAN

Author: , November 7th, 2010

install Term::ReadKey install readline install Term::ReadLine

How To Install CPAN on Fedora

Author: , October 19th, 2010

How To Install Multiple Perl Modules From The Command Line

Author: , July 14th, 2010

Create a text file containing the list of desired modules, one per line. Name it “modules.txt”. Then execute this command: for module in `cat modules.txt`; do echo $module; perl -MCPAN -e “install $module”; done

Late Night, But Worth It

Author: , July 7th, 2010

Just wrapped up a new script to automate the administration of FreeBSD ez-jails, very pleased. Very crude, but effective. I want to look into the Provision::Unix::VirtualOS CPAN module, but so far, my own abstraction seems to work just fine. Agenda for Wednesday’s 9am call is ready and the YouCake project plan has been updated. Whew! […]