From 97518c6e20f77895abc3bdbf0a0435e0e257493e Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 18 Jun 2008 05:24:09 +0000 Subject: [PATCH] Add initial work towards CentOS/RHEL installation prerequisites Use aptitude instead of apt-get; make it easily configurable git-svn-id: svn://svn.open-ils.org/ILS/trunk@9845 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/extras/Makefile.install | 157 +++++++++++++++++++++++++++++++++-- 1 file changed, 148 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index 87a8f43aed..54efd20e17 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -3,19 +3,24 @@ # # Makefile to install prerequisites for OpenSRF and Evergreen # -# Currently supports Debian (etch), Ubuntu (gutsy) and Gentoo. Installs Perl prereqs, -# libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz +# Currently supports Debian (etch), Ubuntu (gutsy), and Gentoo. +# Working towards support of CentOS 5 / RHEL 5. +# Installs Perl prereqs, libjs with Perl wrapper, libdbi, libdbi-drivers, and libyaz # # usage: # make -f Makefile.install debian # - or - # make -f Makefile.install ubuntu # - or - +# make -f Makefile.install centos +# - or - +# make -f Makefile.install rhel +# - or - # make -f Makefile.install gentoo # # Notes: # -# This makefile has been tested much more with Debian than Gentoo. +# This makefile has been tested much more with Debian than CentOS, Gentoo, or RHEL. # # Gentoo (especially amd64) requires a good bit of masked package # mangling for some packages. These are not documented here because @@ -47,6 +52,27 @@ LIBDBI_HOST=http://open-ils.org/~denials/evergreen YAZ=yaz-2.1.56 YAZ_HOST=http://ftp.indexdata.dk/pub/yaz +# ejabberd is not packaged on CentOS/RHEL, so we have to +# download the installable package from the source +EJABBERD_VER=2.0.1 +EJABBERD_PKG=ejabberd-2.0.1_2-linux-x86-installer.bin +EJABBERD_HOST=http://www.process-one.net/downloads/ejabberd + +# Business::OnlinePayment is not packaged on CentOS/RHEL +PAY_ONLINE=Business-OnlinePayment-3.00_08.tar.gz +PAY_ONLINE_HOST=http://ftp.perl.org/pub/CPAN/authors/id/I/IV/IVAN/ + + +# XML::LibXSLT fails due to old libxslt +XSLT=libxslt-1.1.22 +XSLT_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1 + +# libxslt depends on a newer version of libxml2: +XML2=libxml2-2.6.30.tar.gz +XML2_HOST=ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6 + +APT_TOOL=aptitude + # Debian dependencies DEBS = \ build-essential\ @@ -106,6 +132,82 @@ DEBS = \ libbusiness-onlinepayment-perl\ libbusiness-onlinepayment-authorizenet-perl +CENTOS = \ + apr-util-devel \ + aspell \ + aspell-devel \ + aspell-en \ + autoconf \ + automake \ + gcc \ + gd-devel \ + gdbm-devel \ + httpd-devel \ + less \ + libtool \ + libxml2-devel \ + libxslt-devel \ + make \ + mod_perl \ + mod_ssl \ + ntp \ + perl-DBD-Pg \ + perl-DBI \ + perl-XML-LibXML \ + perl-XML-Simple \ + perl-libwww-perl \ + psmisc \ + python-devel \ + readline-devel \ + wget + +PGSQL_CENTOS = \ + postgresql \ + postgresql-contrib \ + postgresql-devel \ + postgresql-pl \ + postgresql-server + +# Some of these packages have stupid bugs in their test suites +# that are simply too painful to workaround +CENTOS_PERL_NOTEST = \ + Business::OnlinePayment::AuthorizeNet \ + DateTime::Format::Strptime \ + RPC::XML + +CENTOS_PERL_VERSION = \ +# This is a developer's version, but B:OP:AuthorizeNet depends on it + IVAN/Business-OnlinePayment-3.00_08.tar.gz + +CENTOS_PERL_LOCAL = \ + XML-LibXSLT + +CENTOS_PERL = \ + Business::CreditCard \ + Cache::Memcached \ + Class::DBI::AbstractSearch \ + Class::DBI::Pg \ + Class::DBI::SQLite \ + DateTime \ + DateTime::TimeZone \ + DateTime::Format::Builder \ + Error \ + File::Find::Rule \ + FreezeThaw \ + GD::Graph3d \ + Log::Log4perl \ + MARC::Record \ + Net::Jabber \ + Net::Z3950::ZOOM \ + Spreadsheet::WriteExcel \ + Template \ + Test::Pod \ + Text::Aspell \ + Text::CSV \ + Tie::IxHash \ + Unix::Syslog \ + UNIVERSAL::require \ + XML::LibXSLT PGSQL_DEBIAN = \ postgresql-8.1\ @@ -185,8 +287,8 @@ CPAN_MODULES = \ DateTime::Format::ISO8601 \ TMTM/Class-DBI-0.96.tar.gz \ RHANDOM/Net-Server-0.90.tar.gz \ - MARC::Charset MARC::File::XML\ - JSON::XS\ + MARC::Charset MARC::File::XML \ + JSON::XS \ SRU \ Net::Z3950::ZOOM \ Business::CreditCard::Object \ @@ -202,10 +304,13 @@ all: # these should be the same for any distro install: install_yaz install_cpan install_js_sm install_libdbi +centos: install_centos_pgsql install_centos_rpms install_ejabberd install install_libxml2 install_libxslt install_centos_perl debian: install_pgsql_debian install_debs install debian_sys_config gentoo: install_gentoos install_gentoo_rc install_gentoo_perl install +rhel: centos + ubuntu: install_pgsql_ubuntu install_debs install debian_sys_config @@ -215,7 +320,26 @@ ubuntu: install_pgsql_ubuntu install_debs install debian_sys_config install_cpan: for m in $(CPAN_MODULES); do perl -MCPAN -e "install \"$$m\";"; done - +# Install ejabberd from official project installer binary +install_ejabberd: + if [ ! -f $(EJABBERD_PKG).gz ]; then wget $(EJABBERD_HOST)/$(EJABBERD_VER)/$(EJABBERD_PKG).gz; fi; + gunzip $(EJABBERD_PKG).gz + chmod u+x $(EJABBERD_PKG).gz + ./$(EJABBERD_PKG) --mode unattended --prefix /opt/ejabberd --adminpw evergreen + +# Install a newer version of libxslt +install_libxslt: + if [ ! -d $(XSLT) ]; then wget $(XSLT_HOST)/$(XSLT).tar.gz; fi; + tar xzf $(XSLT).tar.gz + cd $(XSLT) && ./configure --with-libxml-prefix=/usr/local && make && make install + +# Install a newer version of libxml2 +install_libxml2: + if [ ! -d $(XML2) ]; then wget $(XML2_HOST)/$(XML2).tar.gz; fi; + tar xzf $(XML2).tar.gz + cd $(XML2) && ./configure && make && make install + +# Install a known working version of YAZ install_yaz: if [ ! -d $(YAZ) ]; then wget $(YAZ_HOST)/$(YAZ).tar.gz; fi; tar xzf $(YAZ).tar.gz @@ -251,6 +375,8 @@ clean: make -C $(LIBDBI) clean make -C $(LIBDBI_DRIVERS) clean make -C $(LIBJS_PERL) clean + make -C $(XML2) clean + make -C $(XSLT) clean make -f Makefile.ref -C js/src/ clean @@ -269,13 +395,13 @@ debian_sys_config: # Install the debian-specific dependencies install_debs: - apt-get install $(DEBS) + $(APT_TOOL) install $(DEBS) install_pgsql_debian: - apt-get install $(PGSQL_DEBIAN) + $(APT_TOOL) install $(PGSQL_DEBIAN) install_pgsql_ubuntu: - apt-get install $(PGSQL_UBUNTU) + $(APT_TOOL) install $(PGSQL_UBUNTU) # ------------------------------------------------------------------ # - GENTOO --------------------------------------------------------- @@ -292,3 +418,16 @@ install_gentoo_perl: # ------------------------------------------------------------------ +# CENTOS +install_centos_rpms: + yum -y install $(CENTOS) + +install_centos_pgsql: + yum -y install $(PGSQL_CENTOS) + +install_centos_perl: + for m in $(CENTOS_PERL); do perl -MCPAN -e "install \"$$m\";"; done + for m in $(CENTOS_PERL_VERSION); do perl -MCPAN -e "CPAN::Shell->install \"$$m\";"; done + for m in $(CENTOS_PERL_NOTEST); do perl -MCPAN -e "CPAN::Shell->notest('install', \"$$m\";"; done + for m in $(CENTOS_PERL_LOCAL); do LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib perl -MCPAN -e "install \"$$m\";"; done + -- 2.11.0