Freeside:1.7:Documentation:MirroringRPMRepoYaST:UsingTheMirror

From Freeside
Revision as of 11:39, 7 May 2009 by Rsiddall (talk | contribs) (Created new page containing just the instructions for using a mirror of Freeside 1.7 testing, SLES 10 RPM version. Instructions for setting up the mirror will be in a separate page.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Mirroring the Freeside 1.7 Testing RPM Repository with YaST2: Using Your Mirror

Introduction

This page explains how to use the mirror of the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10. There are instructions for setting up the mirror on the main SLES mirroring page.

Switching Existing Clients to Your Repository

If you've previously installed Freeside (billing server and/or self-service) on a client machine from the Freeside Internet Services repository and want to switch it to use your local repository, change the installation sources via zypper or YaST2:

zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'
zypper service-delete 2
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386
zypper service-list # Make sure it's correct

There's no harm to adding the repository for the self-service files as another installation source:

zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386

Using Your Mirror

Follow the instructions for using the Freeside Internet Services RPM repository (SuSE), but substitute the URL of your repository. These instructions are summarized below.

Initial Installation of Freeside

# Add the folder or web server containing SuSE to your installation sources if not already there
yast2 inst_source
# Enable SSL and Perl scripting for the HTTP server
yast2 --install apache2-mod_perl
yast2 http-server modules enable=ssl,perl
# Configure apache for SSL
cd /etc/apache2/vhosts.d
cp -p vhost-ssl.template freeside-ssl.conf
vi freeside-ssl.conf # and then
# Find '#ServerName www.example.com' and uncomment and correct ServerName
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin
# Fix up any SSL file locations if you put your server certificate somewhere other than the default
cd
# Copy server cert (csr, crt, and key) to Apache SSL folders
# Assumes you have server.{csr,crt,key} in /root...
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done
# Install zypper
yast2 --install zypper
# Update the system
zypper -n update
# Install PostgreSQL (use client instead if database server is not on same box)
zypper -n install postgresql-server
# Add the Freeside repository as an installation source
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386
# Install Freeside itself (specify the Business::OnlinePayment module you use)
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet

and then finish the installation as normal, starting PostgreSQL and creating a Freeside user and database; then running freeside-setup, freeside-adduser, and restarting the web server.

Initial Installation of the Self-Service Interface

The first steps are almost the same as for the Freeside billing server, except that you don't have to enable mod_perl. If you're installing the self-service server on the same machine as the billing server for testing, then you don't need to repeat these steps:

# Add the folder or web server containing SuSE to your installation sources
yast2 inst_source
# Enable SSL for the HTTP server
yast2 http-server modules enable=ssl
# Configure apache for SSL
cd /etc/apache2/vhosts.d
cp -p vhost-ssl.template freeside-ssl.conf
vi freeside-ssl.conf # and then
# Find '#ServerName www.example.com' and uncomment and correct ServerName
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin
# Fix up any SSL file locations if you put your server certificate somewhere other than the default
cd
# Copy server cert (csr, crt, and key) to Apache SSL folders
# Assumes you have server.{csr,crt,key} in /root...
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done
# Install zypper
yast2 --install zypper
# Update the system
zypper -n update

To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:

# Add the self-service repository to zypper's installation sources
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386
# Install Freeside Self-Service
zypper -n install freeside-selfservice

and then finish the self-service installation as normal:

  • Set up key-based SSH access and check the freeside user on the billing server can SSH into the self-service machine (even if it's localhost).
/bin/su freeside
cd
ssh-keygen -t dsa
cd .ssh
cp -p id_dsa.pub authorized_keys2
ssh localhost
  • Add the self-service machine to /etc/sysconfig/freeside on the billing server.
SELFSERVICE_MACHINES=localhost
  • Start the freeside service on the billing server and check the logs (/var/log/freeside/selfservice.localhost.log) to make sure it's working. (You may need to install IPC::ShareLite, zypper -n install perl-IPC-ShareLite, and restart the freeside service.)
service freeside start
  • Check you can log in via the self-service interface using the credentials for an account already in the billing server.

On SLES systems with a billing server installed using older Freeside RPMs, you may need to create a home directory for the freeside user and also create a freeside group if the RPM did not do this:

mkdir /home/freeside
chown freeside.users /home/freeside
groupadd freeside

Updating Your Freeside Installation

Just run zypper and tell it to update packages:

zypper -t package update