Archive for the ‘Perl’ Category

Enable Net:SSH2 to connect to EXSi

Monday, November 12th, 2012

1. Enable SSH from vSphere Client
2. ssh to the vSphere server and edit /etc/ssh/sshd_config
change
PasswordAuthentication no
to
PasswordAuthentication yes

3. restart ssh /etc/init.d/SSH restart

Indexing Word / Powerpoint / Excel / PDF

Tuesday, May 6th, 2008

I am working on a project to allow full-text indexing of common file types such as word, powerpoint, excel and pdf. After searching for a few days, I have a hard time finding a perfect solution.

PDF

http://www.foolabs.com/xpdf/

Word

http://ftp.wagner.pp.ru/~vitus/software/catdoc/

Excel

http://ftp.wagner.pp.ru/~vitus/software/catdoc/

PowerPoint

Replacing a string inline using Perl CLI

Sunday, February 24th, 2008

This is a technique to replace a string in a file or a number of files using Perl.

perl -pi -e ‘s/old_string/new_string/g’ file_pattern

Can’t locate Net/SNMP.pm in @INC ….

Saturday, February 16th, 2008

If you are getting this error, you will need to install NET::SNMP Perl CPAN module.

The easiest way to install the NET::SNMP module is to by the CPAN CLI interface.

# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell — CPAN exploration and modules installation (v1.7602)
ReadLine support available (try ‘install Bundle::CPAN’)

cpan> install Net::SNMP

Upgrading all CPAN Modules

Tuesday, November 27th, 2007

This command line interface will check and upgrade all CPAN library in your system.

perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'

Installing Perl Module from CLI

Thursday, March 22nd, 2007

perl -MCPAN -eshell