1) Housekeeping - My dev area was getting a lot of junk floating around, and rather than just go through and delete, I thought it better to restart
2) About time I upgraded to perl-5.10.1
3) I need to start up a VM soon, and thought it a good opportunity to set make notes about what was needed
4) cpan/cpanplus wasn't working for me
5) I've never had GD working properly, and I could be about to lose my desktop at work
So plenty of reasons. I also wanted to try to structure how I setup various apps, so that it should (in theory) be easier to upgrade an of them. Getting further on, I think this might not be so worthwhile, but at least it's a try.
Here is 'What I Have Done' so far
INITIAL SETUP:
In $HOME
mkdir dev
cd dev
This gives me a base dev directory to use
PERL:
mkdir perl
Download the version of perl you want to install
mkdir perl/
Unarchive the download and go into the directory for created from unarchiving and do the following
./Configure -des -Dprefix=$HOME/dev/perl/
make
make test (go away and make a cup of tea)
make install
This will now give you in $HOME/dev/perl/
Once you have done this, symlink this version to $HOME/dev/perl/current, and add $HOME/dev/perl/current/bin to $PATH
This should make your default perl $HOME/dev/perl/current/bin/perl
Since you have done this, if you now want to download and try another perl, then you can do the same, and just switch the current softlink
LIBGD:
You need to download
freetype-2.3.11.tar.gz
jpegsrc.v8.tar.gz
libpng-1.2.23.tar.gz
zlib-1.2.3.tar.gz
gd-2.0.35.tar.gz
unpack and install
freetype
cd freetype-2.3.11
./configure --prefix=$HOME/dev
make install
cd ..
jpeg-8
(need to look at)
cd jpeg-8
./configure --prefix=$HOME/dev --enable-shared --enable-static
make
make install
cd ..
zlib-1.2.3
cd zlib-1.2.3
./configure --prefix=$HOME/dev
make
make install
cd ..
[edit] libpng-1.2.x
cd libpng-1.2.x
CFLAGS="-I$HOME/dev/include" LDFLAGS="-L$HOME/dev/lib" ./configure --prefix=$HOME/dev
make
make install
cd ..
[edit] gd-2.0.35
cd gd-2.0.35
CFLAGS="-I$HOME/dev/include" LDFLAGS="-L$HOME/dev/lib" ./configure --prefix=$HOME/dev --with-png=$HOME/dev --with-freetype=$HOME/dev --with-jpeg=$HOME/dev
make INCLUDEDIRS="-I. -I$HOME/dev" LIBDIRS="-L$HOME/dev" LIBS="-lgd -lpng -lz -lm" CFLAGS="-O -DHAVE_LIBPNG"
make install
cd..
For these, I chose not to create individual versions of them. You will also note that libpng is 1.2 and jpeg is V8 but says need to look at, since this doesn't seem to work with this version of gd. However, since I mostly create png images, I'm not too concerned at this time. Must sort it though eventually.
Graphviz:
This is needed for installation of some CPAN modules
http://www.graphviz.org
Follow instructions on how to install, using $HOME/dev as the prefix
Again, no version specific route taken
SLEEPYCAT libdb-4:
Download from Oracle
unarchive latest version and install
cd build_unix/
../dist/configure --prefix=$HOME/dev
make
make install
Again, no version specific route, and needed for some CPAN modules
CPAN modules:
cpanp is the recommended method to download and install modules from cpan
type
cpanp
and the interactive shell will be launched
If this is the first time, then enter the following
s conf prereqs 1; s save
This will save some of the hassle of needing to confirm installation of required modules
These are chosen because I need to set up a webserver, I work in a Bio place, and some are personal choice. Obviously, if you need others, or not some of these, then pick and choose. They are also loaded in this order for convenience and dependencies.
To install a cpan module, just type
i
i Bundle::LWP
i LWP::Parallel::UserAgent
i YAML::Tiny
i Module::Build
i Module::PortablePath
i Task::Moose (select all the optional loads)
i IO::Stringy
i Calendar::Simple
i List::MoreUtils (This had a checksum error, so manually downloaded)
i DateTime
i DateTime::Format::ICal
i iCal::Parser
i Digest::SHA1
i Class::Std
i Crypt::CBC
i Crypt::Blowfish
i MIME::Lite
i DBI
i DBD::mysql # force install if you've no test database available, also requires the mysql client development headers - mysql_config needs to be in your $PATH (probably ~/dev/bin).
i DBD::SQLite
i Tie::IxHash
i XML::XPathEngine
i XML::Parser (again, I got a dodgy md5)
i XML::XPath
i HTML::TreeBuilder
i XML::SAX
i XML::Simple
i XML::Handler::YAWriter
i XML::Filter::BufferText
i MLDBM
i Jcode
i Spreadsheet::WriteExcel
i Unicode::Map
i Apache::DBI
i Readonly (another dodgy md5)
i XML::FeedLite (causes lots of prereqs to be installed - would suggest a cup of tea if you have selected auto download of prereqs)
i Chart::OFC
i YAML
i Digest::SHA
i Ace # force install if fails to make as it may have problems connecting to Ace database during tests
i Bio::ASN1::EntrezGene # force install if fails as it looks as though for tests it needs a non-existent CPAN module
i Bundle::BioPerl
i GD (Why has this failed tests?)
i B/BI/BIRNEY/bioperl-1.4.tar.gz # Requires sleepycat libdb-4 to pass tests
i Bio::Das
i Bio::Das::Lite
i App::Ack
manually download and install DB_File - as you need to Change config.in to point at dev/lib and dev/include
manually download and install BerkeleyDB - as you need to Change config.in as above.
APACHE and MOD-PERL:
Apache = httpd-2.2.14;
http://httpd.apache.org/download.cgi
in dev, mkdir -p apache/2.2.14
cd apache
ln -s 2.2.14/ current
This gives space to install this version of apache into, and a softlink to the version we want to use (similar to perl above)
export LD_LIBRARY_PATH=$HOME/dev/lib
./configure --prefix=$HOME/dev/apache/2.2.14 LDFLAGS="-L/$HOME/dev/lib"
add $HOME/dev/apache/current/bin to $PATH
mod_perl 2.0:
http://perl.apache.org/download/index.html
Get latest version of 2.0
$HOME/dev/bin/perl Makefile.PL
# follow instructions, e.g. apxs is at $HOME/dev/apache/current/bin/apxs
make
make install
Change/create the $HOME/dev/apache/current/conf/httpd.conf and $HOME/dev/apache/current/conf/perlconfig.ini as you need to.
Catalyst:
Now the biggie. Catalyst has lots of dependencies. It will take some time, plus it is interactive.
Just install everything - except the extra DBD supports.
You can do them in your own time, but they may make the Install fall over now, which you don't want.
cpanp
i Task::Catalyst
If you have got through this, then congrats.
I have also downloaded into my dev area subversion and git, and have tried to do ImageMagick (although this is erroring that my C compiler won't compile executables, even though it has done svn and git).
subversion:
Retrieve the latest version and dependency from http://subversion.apache.org/source-code.html
unpack both, the dependency folder should end up in the same directory, and will then be installed with svn
mkdir -p $HOME/dev/subversion/
cd $HOME/dev/subversion
ln -s
cd into unpacked folder
./configure --prefix=$HOME/dev/subversion/
make
make install
add $HOME/dev/subversion/current/bin to your $PATH
This will enable you to have/try multiple versions of svn in the same way as Perl and Apache above
git:
Retrieve the latest version from http://git-scm.com/
unpack
mkdir -p $HOME/dev/git/
cd $HOME/dev/git
ln -s
make configure
./configure --prefix=$HOME/dev/git/
make
make install (had to do as root)
ImageMagick:
problem with my gcc version at this time
mkdir -p $HOME/dev/imageMagick/
cd $HOME/dev/imageMagick
ln -s
./configure PREFIX=/Users/ajb/dev/imageMagick/6.5.9 EXEC-PREFIX=/Users/ajb/dev/imageMagick/6.5.9 LIBS=-l/Users/ajb/dev/lib --enable-shared --disable-static
After this, you should have a nice fairly 'clean' version of a dev area. If you want ot install other stuff, then I would recommend the method suggested for versioning the download you have. (I can also recommend the MOCA installation idea for mysql, although I choose to not have that in my dev area).
Once inside this, I then create folders for my projects, using svn or git to version control within those folders, just adding the directories to my path as I need to.
Note: I am using MAC OSX Leopard. At times for the make install, I have needed to sudo make install. I accept no liability for anything that happens should you follow these instructions on any system, but hope that they might be useful for anyone who would like to set up a dev/test area, but are not sure how to go about it.
Cheers
No comments:
Post a Comment