Many months after building the RT 3.6.6 rpm repository, I finally got around to gathering up all the required perl modules (in rpm format) for version 3.8.7.
The result is a new, localized, module repository for the latest version of RT. The archive below includes a yum repo of the hierarchical perl dependencies required by the latest version, as well a a few that must be manually installed due to RPM file conflicts in RHEL5.
Instructions:
Download the following archive: rt_3.8.7_bundle.zip
Unzip the archive:
unzip rt_3.8.7_bundle.zip
The archive contains the following files:
Installation Notes:
You MUST have access to a working BASE repository for your architecture. This repo only contains the modules that DON'T ship with the Redhat distro.
You must setup your MySQL and Apache instances yourself. Depending on your needs, the configuration can vary wildly... therefor it will not be covered here.
Automated Method
chmod o+x install.sh
./install.sh
Manual Method
tar -zxvf rt_repo.tar.gz
mv rt_repo /your/repo/path/here
mv rt.repo /etc/yum.repos.d/
tar -zxvf rt-3.8.7.tar.gz
tar -zxvf Modules.tar.gz
Read through the install.sh file. Use it as a guide to install. The basic sequence is as follows...
Post installation instructions are the same as in previous versions. The existing guide on the RT Wiki is still valid. http://wiki.bestpractical.com/view/Rhel5InstallGuide
Showing posts with label perl. Show all posts
Essential Sed one liners
sed (Stream EDitor) refers to a Unix utility for parsing text files and the programming language it uses to apply textual transformations to a sequential stream of data. It reads input files line by line, applying the operation which has been specified via the command line (or a sed script), and then outputs the line. Getting started with sed can be a real pain if you are unfamiliar with perl for regular expressions. Here are a several sed 'one liners' that I use all the time for test file manipulation. More can be found here.
FILE SPACING:
sed '/^$/d;G'
sed 'n;d'
NUMBERING:
sed = filename | sed 'N; s/^/ /; s/ *(.{6,})n/1 /'
sed '/./=' filename | sed '/./N; s/n/ /'
sed -n '$='
TEXT CONVERSION AND SUBSTITUTION:
sed 's/.$//'
sed 's/$'"/`echo r`/"
sed 's/^[ t]*//'
sed 's/[ t]*$//'
sed 's/^[ t]*//;s/[ t]*$//'
sed 's/foo/bar/' # replaces only 1st instance
sed 's/foo/bar/4' # replaces only 4th instance
sed 's/foo/bar/g' # replaces ALL instances
sed 's/scarlet/red/g;s/ruby/red/g;s/puce/red/g'
SELECTIVE PRINTING OF CERTAIN LINES:
sed 10q
sed q
sed -e :a -e '$q;N;11,$D;ba'
sed '$!N;$!D'
sed -n '$p'
sed -n '8,12p'
sed '/regexp/!d'
sed '/AAA/!d; /BBB/!d; /CCC/!d'
sed '/AAA.*BBB.*CCC/!d'
SELECTIVE DELETION OF CERTAIN LINES:
sed '$!N; /^(.*)n1$/!P; D'
sed -n 'G; s/n/&&/; /^([ -~]*n).*n1/d; s/n//; h; P'
sed '$!N; s/^(.*)n1$/1/; t; D'
sed '1d'
sed '1,10d'
sed '$d'
sed 'N;$!P;$!D;$d'
sed -n -e :a -e '1,10!{P;N;D;};N;ba'
sed '/pattern/d'
sed '/^$/d'
sed -e :a -e 's/<[^>]*>//g;/
How to list all installed Perl modules
I recently found it necessary to list all installed Perl modules on one of my linux servers. I wouldn't have thought that it would be as big a deal as it turned out to be. After two hours or so of testing 20 or so methods Google found for me… I settled on the following.
From the command line:
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe 'find { wanted => sub { print canonpath $_ if /.pmz/ }, no_chdir => 1 }, @INC'