Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
installing_prerequisites_on_gentoo [2008/01/06 17:03] – Add JSON::XS to the CPAN modules to install dbs | installing_prerequisites_on_gentoo [2010/10/29 14:46] – eby |
---|
[[user-comments:installing_prerequisites_on_gentoo|User Comments]] | [[user-comments:installing_prerequisites_on_gentoo|User Comments]] |
| |
====== Installing prerequisites on Gentoo (x86 32-bit) ====== | ====== This is a Work in Progress. Not usable yet. ====== |
| |
Using Gentoo 2007.0, single-core x86 32-bit processor, emerge synced and world updated 2007/09/21. | ====== Installing prerequisites on Gentoo (x86 64-bit) ====== |
| |
Development with Evergreen SVN 1.2.0-rc4 and OpenSRF 0.9 last successfully tested 2007/09/21. | Using Gentoo 2008.0, dual-core x86 64-bit processor, emerge synced and world updated 2010/10/29. |
| |
If you just want to test out Evergreen on Gentoo, you may be interested in the [[vmware:gentoo|Gentoo VMWare image instructions]]. | Development with OpenSRF 1.6.1 last successfully tested ..... |
| |
===== USE flags ===== | ===== USE flags ===== |
**As the root user**, add the following USE flags to ''/etc/make.conf'':<code> | **As the root user**, add the following USE flags to ''/etc/make.conf'':<code> |
USE="-ldap apache2 mpm-prefork perl postgres gif jpeg png urandom web" | USE="-ldap apache2 mpm-prefork perl postgres gif jpeg png urandom web" |
| APACHE2_MPMS="prefork" |
</code> | </code> |
| |
===== Add the opensrf user ===== | ===== Add the opensrf user ===== |
The ''opensrf'' user is required to start the OpenSRF services that constitute Evergreen. | The ''opensrf'' user is required to start the OpenSRF services that constitute Evergreen. |
- **As the root user**, issue the following command to create the user and set the password (substitute your preferred password for //password//): <code>useradd -m -p password opensrf</code> | - **As the root user**, issue the following command to create the user and set the password: |
- **As the opensrf user**, issue the following command to ensure that the Evergreen libraries will be able to be found:<code> | <code>useradd -m -s /bin/bash opensrf |
echo "export LD_LIBRARY_PATH=/openils/lib:/usr/local/lib/dbd" >> /home/opensrf/.bashrc</code> | passwd opensrf</code> |
| |
//Note:// As of 2007-10-11, the second step will no longer be required for the trunk version of Evergreen. Side note: this needs to be updated when a stable release incorporates the fix. | |
| |
===== Compile and runtime environment ===== | ===== Compile and runtime environment ===== |
LDPATH="/openils/lib" | LDPATH="/openils/lib" |
PATH="/openils/bin" | PATH="/openils/bin" |
PERL5LIB="/openils/lib/perl5:/usr/lib/perl5/site_perl/5.8.8/i686-linux:/usr/lib/perl5/vendor_perl/5.8.8/i686-linux/Bundle</code> You might need to adjust the ''PERL5LIB'' variable to reflect your own architecture, and eventually a newer version of Perl. | PERL5LIB="/openils/lib/perl5:/usr/lib/perl5/site_perl/5.12.2/x86_64-linux:/usr/lib/perl5/vendor_perl/5.12.2/x86_64-linux/Bundle"</code> You might need to adjust the ''PERL5LIB'' variable to reflect your own architecture, and eventually a newer version of Perl. |
- Open another new file (''/etc/env.d/89libdbi'') in a text editor. Add the following line to the file:<code> | - Open another new file (''/etc/env.d/89libdbi'') in a text editor. Add the following line to the file:<code> |
LDPATH="/usr/local/lib/dbd"</code> | LDPATH="/usr/local/lib/dbd"</code> |
''libmemcache'' provides a C API for putting and getting cached values from ''memcached''. | ''libmemcache'' provides a C API for putting and getting cached values from ''memcached''. |
The current stable version of ''libmemcache'' in Gentoo (1.2.0) is subject to memory corruption problems; therefore, we install the pre-release unstable version of ''libmemcache'' (1.4.0-rc2). Perform the following steps as **a root user**:<code> | The current stable version of ''libmemcache'' in Gentoo (1.2.0) is subject to memory corruption problems; therefore, we install the pre-release unstable version of ''libmemcache'' (1.4.0-rc2). Perform the following steps as **a root user**:<code> |
echo "dev-libs/libmemcache ~x86" >> /etc/portage/package.keywords | (if /etc/portage directory doesn't exist, create it) |
| echo "dev-libs/libmemcache" >> /etc/portage/package.keywords |
emerge libmemcache | emerge libmemcache |
| emerge libmemcached |
</code> | </code> |
| |
| |
===== Installing PostgreSQL ===== | ===== Installing PostgreSQL ===== |
I installed PostgreSQL 8.2.4 on the advice of Mike Rylander. As PostgreSQL 8.0.13 is currently the "stable" version on Gentoo, I had to tell Gentoo to use the unstable version. Perform the following steps **as the root user**:<code> | Current: postgresql-server-8.4.4-r1 |
echo "dev-db/postgresql ~x86" >> /etc/portage/package.keywords | <code> |
echo "dev-db/libpq ~x86" >> /etc/portage/package.keywords | emerge postgresql-server |
emerge postgresql | emerge --config =dev-db/postgresql-server-8.4.4-r1 |
emerge postgresql --config | rc-update add postgresql-8.4 default |
rc-update add postgresql default | /etc/init.d/postgresql-8.4 start |
/etc/init.d/postgresql start | |
</code> | </code> |
| |
We need to add tsearch2, table functions, and the plpgsql language to the Open-ILS database:<code> | We need to add tsearch2, table functions, and the plpgsql language to the Open-ILS database:<code> |
psql -U postgres evergreen | psql -U postgres evergreen |
pg# \i /usr/share/postgresql/contrib/tsearch2.sql | pg# \i /usr/share/postgresql-8.4/contrib/tsearch2.sql |
pg# \i /usr/share/postgresql/contrib/tablefunc.sql | pg# \i /usr/share/postgresql-8.4/contrib/tablefunc.sql |
pg# \q | pg# \q |
createlang -U postgres plpgsql evergreen | createlang -U postgres plpgsql evergreen |
rc-update add ejabberd default | rc-update add ejabberd default |
</code> | </code> |
| |
Despite the emerge log, at least for ejabberd-1.1.3, there is no ''/etc/jabber/self-cert.sh'' script that gets installed. Instead, a certificate ''/etc/jabber/ssl.pem'' is created. | |
| |
Change the ''/etc/jabber/ejabberd.cfg'' file to mostly correspond with the generic Open-ILS configuration instructions for [[ejabberd]]. Here's the configuration used on the Gentoo VMWare image: {{:gentoo:ejabberd.txt}} | |
| |
===== Installing Apache2 ===== | ===== Installing Apache2 ===== |
shell> install Bundle::CPAN | shell> install Bundle::CPAN |
shell> reload cpan | shell> reload cpan |
shell> install Cache::Memcached Class::DBI::AbstractSearch | shell> install Cache::Memcached DBI DateTime DateTime::Format::ISO8601 FreezeThaw JSON::XS Net::Server UNIVERSAL::require Unix::Syslog XML::LibXML |
shell> install DateTime DateTime::Format::ISO8601 DateTime::TimeZone | </code> |
shell> install DBI DBD::Pg Email::Send GD::Graph3d Log::Log4perl | |
shell> install JavaScript::SpiderMonkey JSON::XS | |
shell> install XML::LibXML XML::LibXSLT XML::Simple | |
shell> install MARC::Record MARC::Charset MARC::File::XML | |
shell> install Net::Server::PreFork Net::Z3950::ZOOM | |
shell> install Template Text::Aspell UNIVERSAL::require Unix::Syslog | |
shell> install Text::CSV Text::CSV_XS Spreadsheet::WriteExcel Tie::IxHash</code> | |
| |
We need ''Net::Jabber'' to register users with ejabberd. The gsasl ebuild is required for authentication. I found that I had to select **no** when asked if I wanted to install the optional GSSAPI module for ''XML::Stream'', one of its underlying modules, to avoid severe test failure. I stopped ejabberd before installing this module to avoid any port conflicts during the ''Net::Jabber'' tests. Finally, a few ''Net::Jabber'' tests failed anyways, so I forced the install of that module. | We need ''Net::Jabber'' to register users with ejabberd. The gsasl ebuild is required for authentication. I found that I had to select **no** when asked if I wanted to install the optional GSSAPI module for ''XML::Stream'', one of its underlying modules, to avoid severe test failure. I stopped ejabberd before installing this module to avoid any port conflicts during the ''Net::Jabber'' tests. Finally, a few ''Net::Jabber'' tests failed anyways, so I forced the install of that module. |