installing_prerequisites_on_gentoo
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
installing_prerequisites_on_gentoo [2007/12/10 20:58] – Let's simplify this and just always install the unstable libmemcache - at least until 1.4.0 is stable dbs | installing_prerequisites_on_gentoo [2010/10/29 14:39] – eby | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | [[user-comments: | ||
+ | ====== This is a Work in Progress. Not usable yet. ====== | ||
+ | |||
+ | ====== Installing prerequisites on Gentoo (x86 64-bit) ====== | ||
+ | |||
+ | Using Gentoo 2008.0, dual-core x86 64-bit processor, emerge synced and world updated 2010/10/29. | ||
+ | |||
+ | Development with OpenSRF 1.6.1 last successfully tested ..... | ||
+ | |||
+ | ===== USE flags ===== | ||
+ | **As the root user**, add the following USE flags to ''/ | ||
+ | USE=" | ||
+ | APACHE2_MPMS=" | ||
+ | </ | ||
+ | |||
+ | ===== Add the opensrf user ===== | ||
+ | The '' | ||
+ | - **As the root user**, issue the following command to create the user and set the password: | ||
+ | < | ||
+ | passwd opensrf</ | ||
+ | |||
+ | ===== Compile and runtime environment ===== | ||
+ | Gentoo relies on files in ''/ | ||
+ | |||
+ | - Open a new file (''/ | ||
+ | - Add the following lines to the file:< | ||
+ | LDPATH="/ | ||
+ | PATH="/ | ||
+ | PERL5LIB="/ | ||
+ | - Open another new file (''/ | ||
+ | LDPATH="/ | ||
+ | - Run '' | ||
+ | |||
+ | ===== Installing memcached ===== | ||
+ | Perform the following steps **as the root user**: | ||
+ | - Install the memcached package:< | ||
+ | emerge memcached</ | ||
+ | - Restrict memcached to only listen to this machines' | ||
+ | LISTENON=" | ||
+ | </ | ||
+ | - Start memcached at system boot:< | ||
+ | rc-update add memcached default | ||
+ | </ | ||
+ | |||
+ | ===== Installing libmemcache ===== | ||
+ | '' | ||
+ | The current stable version of '' | ||
+ | (if / | ||
+ | echo " | ||
+ | emerge libmemcache | ||
+ | emerge libmemcached | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Installing PostgreSQL ===== | ||
+ | Current: postgresql-server-8.4.4-r1 | ||
+ | < | ||
+ | emerge postgresql-server | ||
+ | emerge --config =dev-db/ | ||
+ | rc-update add postgresql-8.4 default | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ==== Create the database ==== | ||
+ | We need to create the database that Open-ILS will use:< | ||
+ | createdb -U postgres -E UNICODE evergreen | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== Add tsearch2, table functions, and extra languages ==== | ||
+ | We need to add tsearch2, table functions, and the plpgsql language to the Open-ILS database:< | ||
+ | psql -U postgres evergreen | ||
+ | pg# \i / | ||
+ | pg# \i / | ||
+ | pg# \q | ||
+ | createlang -U postgres plpgsql evergreen | ||
+ | createlang -U postgres plperl evergreen | ||
+ | createlang -U postgres plperlu evergreen | ||
+ | </ | ||
+ | |||
+ | ==== Change the postgres administrator password ==== | ||
+ | You might as well change the password for the '' | ||
+ | psql -U postgres evergreen | ||
+ | pg# alter user postgres password ' | ||
+ | pg# \q | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Installing ejabberd ===== | ||
+ | Check the revision history of this page if you want instructions for using Wildfire as an alternative Jabber server. | ||
+ | |||
+ | Perform the following steps **as the root user**: | ||
+ | < | ||
+ | rc-update add ejabberd default | ||
+ | </ | ||
+ | |||
+ | ===== Installing Apache2 ===== | ||
+ | Perform the following steps **as the root user**: | ||
+ | - We'll emerge '' | ||
+ | emerge mod_perl</ | ||
+ | - Enable mod_perl and SSL by editing ''/ | ||
+ | APACHE2_OPTS=" | ||
+ | - Create a symbolic link from ''/ | ||
+ | ln -sf / | ||
+ | - Enable the Apache process to read the ''/ | ||
+ | User opensrf | ||
+ | Group opensrf</ | ||
+ | - Copy '' | ||
+ | - Modify '' | ||
+ | - Modify the eg_vhost.conf file '' | ||
+ | - Here is the '' | ||
+ | - Add '' | ||
+ | |||
+ | ===== Installing Perl modules ===== | ||
+ | Gentoo doesn' | ||
+ | |||
+ | We'll use Gentoo' | ||
+ | |||
+ | - The Net::ZOOM Perl module requires '' | ||
+ | wget http:// | ||
+ | tar xzf yaz-2.1.56.tar.gz | ||
+ | cd yaz-2.1.56 | ||
+ | ./configure | ||
+ | make</ | ||
+ | - Perform the following step **as the root user**:< | ||
+ | make install</ | ||
+ | - We depend on the '' | ||
+ | emerge --unmerge aspell-en | ||
+ | emerge aspell-en</ | ||
+ | - We depend on the '' | ||
+ | emerge spidermonkey</ | ||
+ | - Now we can install the CPAN modules as the '' | ||
+ | mkdir -p / | ||
+ | chown -R opensrf: | ||
+ | </ | ||
+ | - Perform the following steps **as the '' | ||
+ | < | ||
+ | export PERL5LIB=/ | ||
+ | perl -MCPAN -e shell | ||
+ | shell> o conf makepl_arg ' | ||
+ | shell> o conf commit | ||
+ | shell> install Bundle:: | ||
+ | shell> reload cpan | ||
+ | shell> install Cache:: | ||
+ | shell> install DateTime DateTime:: | ||
+ | shell> install DBI DBD::Pg Email::Send GD::Graph3d Log:: | ||
+ | shell> install JavaScript:: | ||
+ | shell> install XML::LibXML XML:: | ||
+ | shell> install MARC:: | ||
+ | shell> install Net:: | ||
+ | shell> install Template Text:: | ||
+ | shell> install Text::CSV Text:: | ||
+ | |||
+ | We need '' | ||
+ | |||
+ | If the '' | ||
+ | - Perform the following steps **as the root user**:< | ||
+ | emerge gsasl</ | ||
+ | - Perform the following steps **as the '' | ||
+ | shell> install Authen:: | ||
+ | shell> force install Net::Jabber | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Installing libdbi and libdbi-drivers ===== | ||
+ | The [[libdbi|generic instructions]] worked well using libdbi-0.8.2 and libdbi-drivers-0.8.2-1 releases. You do not need to specify a directory for the '' | ||
+ | ./configure --with-pgsql-dir --disable-docs --with-pgsql --enable-libdbi && make all install | ||
+ | </ | ||
+ | |||
+ | ====== Installing OpenSRF ====== | ||
+ | As of Evergreen 1.2.0, you have to download and install OpenSRF separately from Evergreen. Perform the following steps **as the '' | ||
+ | - Download OpenSRF:< | ||
+ | wget http:// | ||
+ | - Extract OpenSRF:< | ||
+ | tar xzf OpenSRF-0.9.tar.gz</ | ||
+ | - Change directories into the OpenSRF directory:< | ||
+ | cd OpenSRF-0.9</ | ||
+ | - Open '' | ||
+ | export APXS2=/ | ||
+ | export APACHE2_HEADERS=/ | ||
+ | export APR_HEADERS=/ | ||
+ | export LIBXML2_HEADERS=/ | ||
+ | - Build OpenSRF:< | ||
+ | CFLAGS=-D_LARGEFILE64_SOURCE make</ | ||
+ | - Install OpenSRF by performing the following step **as the root user**:< | ||
+ | make install | ||
+ | </ | ||
+ | |||
+ | =====Register OpenSRF users===== | ||
+ | We have to register the users listed in opensrf_core.xml with our Jabber server. OpenSRF includes a simple script to do this based on Net:: | ||
+ | # starting in the OpenSRF directory | ||
+ | cd examples | ||
+ | perl register.pl localhost 5222 osrf osrf | ||
+ | perl register.pl localhost 5222 router osrf | ||
+ | </ | ||
+ | |||
+ | ====== Installing Evergreen ====== | ||
+ | Perform the following steps **as the '' | ||
+ | - Download Evergreen:< | ||
+ | wget http:// | ||
+ | - Extract Evergreen:< | ||
+ | tar xzf Evergreen-ILS-1.2.0-rc4.tar.gz</ | ||
+ | - Change directories into the Evergreen directory:< | ||
+ | cd Evergreen-ILS-1.2.0-rc4</ | ||
+ | - Set the configuration for your system; aside from the database name, username, and password, you should only have to change the following settings on Gentoo:< | ||
+ | Apache2 apxs binary | ||
+ | Apache2 headers directory | ||
+ | Apache2 APR headers directory = / | ||
+ | Libxml2 headers directory | ||
+ | - Due to some confusion caused by apxs, '' | ||
+ | ln -sf / | ||
+ | - Build Evergreen **as the '' | ||
+ | CFLAGS=-D_LARGEFILE64_SOURCE make</ | ||
+ | - Install Evergreen **as the root user**:< | ||
+ | make install</ | ||
+ | - Change permissions on the Evergreen directories to enable the system to run **as the root user**:< | ||
+ | chown -R opensrf: | ||
+ | chmod -R +x / | ||
+ | - Edit the ''/ | ||
+ | LoadModule osrf_json_gateway_module modules/ | ||
+ | LoadModule xmlent_module | ||
+ | - Create symbolic links to support Windows staff clients and versionless staff clients **as the '' | ||
+ | cd / | ||
+ | rm HEAD | ||
+ | ln -sf / | ||
+ | ln -sf HEAD sc_v100_rc2 | ||
+ | ln -sf HEAD rel_1_2_0_rc4</ | ||
+ | |||
+ | ====== Starting Evergreen ====== | ||
+ | - Become the '' | ||
+ | su - opensrf</ | ||
+ | - Run the '' | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | - (Required only once): Run the '' | ||
+ | cd / | ||
+ | autogen.sh / | ||
+ | - Become the root user and start Apache (which now depends on the open-ils services before it can start successfully): | ||
+ | exit | ||
+ | su - | ||
+ | / |