http://www.freeside.biz/mediawiki/api.php?action=feedcontributions&user=Rsiddall&feedformat=atomFreeside - User contributions [en]2024-03-29T15:32:34ZUser contributionsMediaWiki 1.27.7http://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:InstallingUsingRPM&diff=5265Freeside:1.7:Documentation:InstallingUsingRPM2009-08-31T15:54:37Z<p>Rsiddall: Added instructions on using the stable and pre-release repositories with yum. Both require you to use the testing repository for everything but the Freeside RPMs.</p>
<hr />
<div>=Introduction=<br />
<br />
==Warning!==<br />
The RPM installation of Freeside is experimental! The instructions below may be incomplete or incorrect and are subject to change. You should only attempt to use the RPM installation if you are prepared to work around omissions and inaccuracies, and can recover data in the event of a loss.<br />
<br />
==Information==<br />
<br />
The currently available packages are for the i386 and x86_64 architectures. The packages are built on CentOS v4 and currently tested on CentOS v5 and RHEL v4. Packagers for other distributions are welcome; see [[Freeside:1.7:Documentation:CreatingRPMRepo|creating RPM repositories]]. You can also read about our own [[Freeside:1.7:Documentation:RPMBuildSystem|RPM build system]].<br />
<br />
Installing the RPM version of Freeside may not be a good idea if you plan to do development on Freeside as the RPMs may not include all the files supplied in the tarball.<br />
<br />
===Status===<br />
<br />
The RPM version of Freeside does not include Request Tracker at this time. The self-service RPM has not been fully tested. Both PostgreSQL and MySQL back-end databases should work. The version and release of the RPM were shown in the "Billing Main" page in Freeside, but we concluded this was misleading. You can now get the version and release by entering <code>rpm -q freeside</code> at the command line.<br />
<br />
=Installation=<br />
<br />
RPM installation can preferably be done with a tool such as YUM or APT (or up2date on RHEL). As a last resort, you can install with RPM directly.<br />
<br />
==Installing using yum==<br />
=== Setup YUM ===<br />
* If you are installing to a machine behind a proxy server, you may need to set up the proxy directives in /etc/yum.conf for yum to work correctly.<br />
* Make sure the yum priorities plugin is installed by running <code>yum install yum-plugin-priorities</code> for CentOS v4, or <code>yum install yum-priorities</code> for CentOS v5.<br />
* Make sure the yum priorities plugin is enabled by editing the <code>/etc/yum/pluginconf.d/priorities.conf</code> file, and ensuring that it contains the following lines: <br />
[main]<br />
enabled=1<br />
* Edit <code>/etc/yum.repso.d/CentOS-Base.repo</code>, adding the following lines to the <nowiki>[base] and [update] sections, and adding the [centosplus] section:</nowiki><br />
<br />
CentOS v4:<br />
<br />
<pre>[base] <br />
exclude=php* httpd* postgres* MySQL* mysql* perl perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[update]<br />
exclude=php* httpd* postgres* MySQL* mysql* perl perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[centosplus]<br />
enabled=1<br />
priority=2<br />
</pre><br />
<br />
CentOS v5:<br />
<br />
<pre>[base] <br />
exclude=php* httpd* MySQL* mysql* perl perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[update]<br />
exclude=php* httpd* MySQL* mysql* perl perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[centosplus]<br />
enabled=1<br />
priority=2<br />
</pre><br />
<br />
* Select a repository containing the required RPMs, and add the repository to a new file in your /etc/yum.repo.d directory or directly to the /etc/yum.conf file. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
<br />
==== 1.7 pre-release repository ====<br />
<br />
This repository contains <b>only</b> the Freeside RPMs for release candidates. Use the testing repository for all of the required Perl RPMs.<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
wget http://www.freeside.biz/~rsiddall/freeside.repo<br />
</pre><br />
<br />
The repository definition file defines a testing, stable, and a pre-release repository. All of these are disabled by default, so<br />
you either need to include <code>--enablerepo=freeside-testing --enablerepo=freeside-prerelease</code> when invoking yum, or just edit the file and enable the repositories you want to use by changing the <code>enable=0</code> to <code>enable=1</code> in the corresponding section of the file.<br />
<br />
Since the release candidate RPMs have a higher version number than the CVS snapshot builds, yum will install the release candidates instead of the CVS snapshot. You can verify this after yum completes by entering <code>rpm -q freeside</code> and checking that it's something like <code>freeside-1.7.4rc2-1</code>.<br />
<br />
==== 1.7 stable repository ====<br />
<br />
Follow the instructions for the 1.7 pre-release repository, but enable the stable repository instead of the pre-release.<br />
<br />
==== 1_7_BRANCH testing repository ====<br />
CentOS/RHEL v4 i386: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-4<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/i386<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v4 x86_64: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-4<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/x86_64<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v5 i386: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.7/testing/i386<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v5 x86_64: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.7/testing/x86_64<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
==== HEAD/1.9 testing repository ====<br />
CentOS/RHEL v5 i386: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.9/testing/i386<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v5 x86_64: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.9/testing/x86_64<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
=== Install ===<br />
<br />
* Install the required components by issuing the commands:<br />
<pre>yum install httpd mod_perl mod_ssl perl postgresql-server<br />
yum install perl-File-Temp perl-CGI.pm perl-Test-Simple<br />
yum install freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes:<br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database.<br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use.<br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=== Troubleshooting ===<br />
<br />
* If you are using a repository that is normally disabled, use <code>yum --enablerepo=Freeside-4 install ...</code> where ''Freeside-4'' is the name of the repository.<br />
* If you get an error such as:<br />
<pre><br />
Transaction Check Error: file /usr/share/man/man3/File::Temp.3pm.gz from install of perl-File-Temp-0.18-1 conflicts with file from package perl-5.8.8-4.el4s1<br />
</pre><br />
then you're using an operating system with a badly packaged Perl. You will have to force the installation of the RPM which conflicts with the Perl, using something like:<br />
<pre><br />
rpm -Uvh --force /var/cache/yum/freeside/packages/perl-File-Temp-0.18-1.x86_64.rpm<br />
</pre><br />
This installs the conflicting RPM from yum's cache for the "freeside" repository.<br />
You can then retry installing from yum.<br />
<br />
==Installing using up2date==<br />
<br />
Mainly for vanilla RHEL (tested on 4.5, 4.7); if you are running CentOS, the [[#Installing_using_yum|yum]] or [[#Installing_using_APT|apt-get]] instructions may be preferable.<br />
<br />
===Setup up2date===<br />
* Select a repository containing the required RPMs and add the repository to your /etc/sysconfig/rhn/sources file. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
* Import GPG keys:<br />
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4<br />
rpm --import http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
<br />
==== 1.7.3 stable repository ====<br />
(not yet available)<br />
<br />
==== 1_7_BRANCH testing repository ====<br />
RHEL v4 i386: <pre>yum centosplus http://mirror.centos.org/centos/4/centosplus/i386/<br />
yum freeside http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/i386</pre><br />
<br />
RHEL v4 x86_64: <pre>yum centosplus http://mirror.centos.org/centos/4/centosplus/x86_64/<br />
yum freeside http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/x86_64</pre><br />
<br />
=== Install ===<br />
<br />
* Install the required components by issuing the commands:<br />
<pre>up2date httpd mod_perl mod_ssl perl postgresql-server tetex-latex perl-Digest-SHA1 perl-XML-Parser<br />
up2date perl-File-Temp #this will fail, that's okay for now<br />
rpm -Uvh --force /var/spool/up2date/perl-File-Temp-0.18-1.x86_64.rpm #to force File::Temp 0.18 installation, for now<br />
up2date freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes:<br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database.<br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use.<br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=== Troubleshooting ===<br />
<br />
* Does up2date show a "freeside" channel when doing <code>up2date --show-channels</code>, but won't install packages from that repository? Make sure <code>/etc/sysconfig/rhn/up2date</code> has a line designating a blank proxy:<br />
httpProxy=<br />
<br />
==Installing using APT==<br />
===Setup APT===<br />
Select a repository containing the required RPMs and add the repository to your /etc/apt.conf file.. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
====1.7.3 stable repository ====<br />
(not yet available)<br />
====1_7_BRANCH testing repository====<br />
(not yet available)<br />
<br />
===Install===<br />
* Install the required components by issuing the command:<br />
<pre>apt-get install freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes: <br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database. <br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use. <br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
==Installation using RPM==<br />
Installation is much easier if you have a repository that works with a tool such as [[#Installing_using_yum|yum]], [[#Installing_using_APT|apt-get]] or [[#Installing_using_up2date|up2date]]. If you only have rpm and wish to use that, enter:<br />
<br />
<pre><br />
rpm -Uvh --test freeside-1.7.3-1.noarch.rpm \<br />
freeside-mason-1.7.3-1.noarch.rpm \<br />
freeside-postgresql-1.7.3-1.noarch.rpm \<br />
perl-Business-OnlinePayment-AuthorizeNet-3.17-1.i386.rpm<br />
</pre><br />
Where:<br />
* 1.7.3-1 is the version of Freeside and the release of the RPM. Change this if necessary.<br />
* postgresql is the database you wish to use as the Freeside back-end. Replace freeside-postgresql with freeside-mysql if you wish to use MySQL. See the main installation document for which databases are supported.<br />
* Replace AuthorizeNet with the name of the credit card processor you wish to use for real-time transactions. Also replace 3.17-1.i386 with the current version, release, and architecture of the corresponding Business::OnlinePayment RPM.<br />
The command should result in some warnings about unsatisfied dependencies. Find the corresponding RPMs and add them to the list on the command line. Keep doing this until the command results in no warnings, then issue the command one last time without the --test to actually install all the RPMs.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=Finalizing the installation=<br />
<br />
* Start the database:<br />
with PostgreSQL<br />
<br />
chown -R postgres:postgres /var/lib/pgsql<br />
/sbin/service postgresql start<br />
<br />
or with MySQL<br />
<br />
/sbin/service mysqld start<br />
<br />
* Allow the freeside user full access to the freeside database. <br />
with PostgreSQL<br />
<pre><br />
$ su - postgres<br />
$ createuser -P freeside<br />
Enter password for user "freeside": <br />
Enter it again: <br />
Shall the new role be a superuser? (y/n) n<br />
Shall the new role be allowed to create databases? (y/n) y<br />
Shall the new role be allowed to create more new roles? (y/n) n<br />
CREATE ROLE<br />
</pre><br />
or with MySQL:<br />
<pre><br />
$ mysqladmin -u root password 'set_a_root_database_password'<br />
$ mysql -u root -p<br />
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY 'set_a_freeside_database_password';<br />
</pre><br />
<br />
* Edit <code>/etc/freeside/secrets</code> and replace the third line (currently blank) with the password you entered in the last step.<br />
<br />
* Add the freeside database to your database engine: <br />
with Postgres: <br />
<pre><br />
$ su freeside<br />
$ createdb -E sql_ascii freeside<br />
</pre><br />
or with MySQL: <br />
<pre><br />
$ mysqladmin -u freeside -p create freeside <br />
</pre><br />
<br />
* As the freeside UNIX user, run <code>freeside-setup -d your.domain.name</code> to create the database tables and initial data.<br />
<pre><br />
$ su freeside<br />
$ freeside-setup -d example.com<br />
</pre><br />
<br />
* Create the Freeside system users: <br />
<pre><br />
$ su freeside<br />
$ freeside-adduser -g 1 fs_queue<br />
$ freeside-adduser -g 1 fs_daily<br />
$ freeside-adduser -g 1 fs_selfservice<br />
</pre><br />
<br />
* Create one or more Freeside users (your internal sales/tech folks, not customer accounts):<br />
<pre><br />
$ su freeside<br />
$ freeside-adduser -g 1 username<br />
$ htpasswd /etc/freeside/htpasswd username<br />
Password: <br />
</pre><br />
Additional users can be added using the same command or from the web interface.<br />
<br />
* <code>/sbin/service freeside start</code><br />
<br />
* <code>/sbin/service httpd restart</code><br />
<br />
* Log into the web interface using the username and password you entered above.<br />
<br />
* Now proceed to the initial [[Freeside:1.7:Documentation:Administration|administration]] of your installation.<br />
<br />
=Upgrading=<br />
<br />
==Introduction==<br />
If you have an existing Freeside installation that was installed from the tarball, following the instructions for installing or upgrading from RPM&nbsp;'''''may''''' result in an operational system where the RPMs have overwritten most or all of the files installed from the tarball or CPAN.<br />
<br />
==Upgrading==<br />
Upgrading can be done with a tool such as YUM or APT (or up2date on RHEL), preferably, or as a last resort, with RPM directly.<br />
<br />
===Upgrading using a repository===<br />
If you installed the RPM version of Freeside from a repository, and a new version is available on the repository, then you can install the new files on your system using the package manager:<br />
<pre>yum update</pre><br />
or:<br />
<pre>apt-get update</pre><br />
To avoid unplanned upgrades, you may wish to mark the repository containing Freeside as disabled, or remove it from your yum or apt configuration files.<br />
===Upgrading using RPM===<br />
When there's a new version of Freeside available as RPM, just download the new RPMs and upgrade them:<pre><br />
rpm -Uvh --test freeside-1.7.3-1.noarch.rpm freeside-mason-1.7.3-1.noarch.rpm freeside-postgresql-1.7.3-1.noarch.rpm<br />
</pre><br />
<br />
==Finalizing the upgrade==<br />
* As the freeside UNIX user, run <code>freeside-upgrade username</code>, passing the username of an internal Freeside user.<br />
* If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.<br />
* Restart Apache and Freeside:<br />
/etc/init.d/httpd restart<br />
/etc/init.d/freeside restart<br />
* You may want to check your ACLs under Configuration->Employee->View/Edit employee groups and grant some of the new rights to one or more groups.<br />
<br />
=Known issues=<br />
<br />
* yum will not automatically upgrade Perl modules bundled in the main Perl RPM to the newer versions on the Freeside repository due to the lack of version information in the main Perl RPM. (It cannot determine that the newer versions are newer.) So, you have to install them as a separate operation. This applies to the <code>perl-File-Temp perl-CGI.pm perl-Test-Simple</code> RPMs.<br />
<br />
* ssh -X in as root and run system-config-securitylevel (can't seem to do this from -tui. may need to <code>yum install xauth xorg-x11-fonts-*</code>)<br />
** firewall options, open up www and secure www<br />
** selinux options: enforcing -> permissive (otherwise freeside can't even create /etc/freeside/masondata/obj etc.)</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.9:Documentation:Administration:opensrs.pm&diff=5257Freeside:1.9:Documentation:Administration:opensrs.pm2009-08-12T21:11:26Z<p>Rsiddall: A few more links, and an ugly patch we can take out as soon as we release Net::OpenSRS 0.03.</p>
<hr />
<div>=Using Freeside's OpenSRS Domain Registration Export=<br />
<br />
==Introduction==<br />
<br />
As of June, 2009, Freeside CVS includes an export to perform common operations on domains using the [http://tucowsinc.com/ Tucows] [http://opensrs.com/ OpenSRS] domain registration service.<br />
<br />
The export, domreg_opensrs, uses the [http://search.cpan.org/~mahlon/Net-OpenSRS-0.02/ Net::OpenSRS] module from [http://search.cpan.org/ CPAN]. (This uses OpenSRS in a simple, robust way, but does not make use of advanced features like auto-renewal, whois privacy, etc.)<br />
<br />
==Setup==<br />
<br />
===Common Preparation===<br />
<br />
Setting up the export is similar to setting up any of Freeside's exports.<br />
<br />
* Make sure you have a reseller account at OpenSRS.<br />
<br />
* Log into OpenSRS and enter your IP address under "Add IPs for Script/API Access" in the Profile Management section of the site. If you haven't already done so, select "Generate New Private Key" and save the key for later. You'll paste it into the export configuration. (If you're intending to use the OpenSRS test system for testing your setup and switch to the live system later, you'll need to generate a separate key in each system.)<br />
<br />
* Make sure you have Net::OpenSRS and its prerequisites installed<br />
<br />
<code><br />
perl -MNet::OpenSRS -e 'print $Net::OpenSRS::VERSION'<br />
</code><br />
<br />
* Patch Net::OpenSRS if necessary. Net::OpenSRS uses XML::Simple, which can use several XML parsers. At least one of these, probably SAX/Expat throws an exception parsing the response from OpenSRS when renewing a domain as the response does not meet strict XML standards. Net::OpenSRS 0.03 will include a fix for this problem. If you're using an earlier version, apply this patch:<br />
<br />
<pre><br />
--- OpenSRS.pm.orig 2006-04-08 22:26:22.000000000 +0000<br />
+++ OpenSRS.pm 2009-06-14 22:07:32.000000000 +0000<br />
@@ -1159,7 +1159,10 @@<br />
my $struct;<br />
if ( $res->is_success ) {<br />
$self->debug("HTTP result: " . $res->status_line);<br />
- eval { $struct = XML::Simple::XMLin( $res->content); };<br />
+ my $rslt = $res->content;<br />
+ # OpenSRS renew response triggers parser error due to spaces in element name<br />
+ $rslt =~ s/registration expiration date/registration_expiration_date/g;<br />
+ eval { $struct = XML::Simple::XMLin( $rslt ); };<br />
<br />
if ($self->debug_level > 1) {<br />
$self->debug("\nOpenSRS Response XML:\n" . '-' x 30);<br />
</pre><br />
<br />
* Make sure your LWP::UserAgent can make HTTPS connections. (You have the Crypt::SSLeay or the IO::Socket::SSL module installed.) You'll need this for your Business::OnlinePayment modules too.<br />
<br />
* Log into Freeside, select "Configuration / Provisioning and services / Exports" in the menu, and "Add a new export" using domreg_opensrs, and configure the export.<br />
<br />
===Configuration===<br />
<br />
Many of the export's configuration options are required for Net::OpenSRS, so reading the documentation for that module may help in understanding the options.<br />
<br />
* The "Export host" must be the OpenSRS test or live gateway. Use one of the preset buttons in the description to get the right value.<br />
<br />
* Type in your OpenSRS reseller name.<br />
<br />
* Paste the OpenSRS private key.<br />
<br />
* Type in the password you'll use to manage the domains at https://manage.opensrs.net/ (This is a limitation of Net::OpenSRS: all domains are registered under the same set of credentials, and the user name is the same as your reseller user name.)<br />
<br />
* Enter a master domain that all other domains will be associated with at OpenSRS. (Net::OpenSRS uses this to associate all domains together.) This domain should be registered at OpenSRS with the user name and password you entered above.<br />
<br />
* Enter a Net::OpenSRS debug level. Set this to zero for production use, and 3 for testing. Debugging messages are written to the Apache server logs.<br />
<br />
* Select the top-level domains you want to allow the export to try to manage. The export does not implement all the business rules to successfully register domains in .ca, and several other TLDs.<br />
<br />
* Click "Apply changes"<br />
<br />
===New Setup===<br />
<br />
If you have no existing svc_domain service representing domain registrations that you wish to handle with OpenSRS:<br />
<br />
* Configure a service using svc_domain and associate the export with it. Or, modify an existing service to use the export.<br />
<br />
* Place the new svc_domain service in a package.<br />
<br />
===Conversion===<br />
<br />
If you already have a svc_domain service that you use for domain registrations, you can add the OpenSRS export to the exports used for that service. Configure the export as above before adding it to the service.<br />
<br />
Adding will take a few minutes if you have a sizable number of domains, as Freeside will be exporting all the domains. The export will not attempt to register or transfer any of your existing domains as they're probably already in the state you want.<br />
<br />
==Use==<br />
<br />
===New Domain===<br />
<br />
Once the export is set up and associated with a svc_domain service, Freeside will give you additional options when you provision the svc_domain. The "Add Domain" screen will let you choose to register the domain at OpenSRS, transfer it to OpenSRS, or just add the domain to Freeside. The last choice is useful if the client has the domain registered somewhere else and does not want you to handle the registration for them. The export does not check if the domain is already registered, so you need to ask the client if it is a new domain and choose register or transfer as appropriate.<br />
<br />
When a domain is registered, the customer contact information is used for the owner, admin, and billing contacts of the domain. OpenSRS requires a first and last name, street address, city, state and ZIP code, and a phone number and email address. The export uses the first invoicing email address.<br />
<br />
===View Domain===<br />
<br />
There are additional operations you can perform at the "View Domain" screen. The screen shows the registration status of the domain. This can include:<br />
<br />
* An error message to say that Net::OpenSRS is not installed.<br />
* An error message indicating that OpenSRS cannot be contacted and the status of the domain cannot be determined.<br />
* "Not registered" if the domain is not registered anywhere.<br />
* "Transfer to OpenSRS" if the domain is not registered through your OpenSRS reseller account.<br />
* The current expiration date of the registration if the domain is registered through your account.<br />
<br />
Depending on the status, a set of appropriate operations are displayed:<br />
<br />
* Register the domain at OpenSRS.<br />
* Transfer the domain to OpenSRS.<br />
* Renew the registration. (This is displayed even if the domain is registered for the maximum term.)<br />
* Revoke the registration. (This is displayed even if the domain has been registered longer than the grace period during which revocation is allowed.)<br />
<br />
Click on the link to select the desired operation.<br />
<br />
Once the operation has been attempted, you will see the result in the "View Domain" screen. If you have OpenSRS set to queue requests, then the operation will not be performed until you log into OpenSRS and tell it to perform the queued operation. (This is useful for testing, but you'll probably want to set OpenSRS for immediate processing in production.)<br />
<br />
===Transfers===<br />
<br />
Telling Freeside to transfer the domain just files a transfer request, causing OpenSRS to send the domain admin contact an email asking them to confirm the transfer. (It does not, and cannot, perform an unauthorized transfer.) Be sure to let them know where to get the required auth code to authorize the transfer.</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.9:Documentation:Administration:opensrs.pm&diff=5256Freeside:1.9:Documentation:Administration:opensrs.pm2009-08-12T21:05:32Z<p>Rsiddall: It helps if you format the external links correctly...</p>
<hr />
<div>=Using Freeside's OpenSRS Domain Registration Export=<br />
<br />
==Introduction==<br />
<br />
As of June, 2009, Freeside CVS includes an export to perform common operations on domains using the [http://tucowsinc.com/ Tucows] [http://opensrs.com/ OpenSRS] domain registration service.<br />
<br />
The export, domreg_opensrs, uses the Net::OpenSRS module from CPAN. (This uses OpenSRS in a simple, robust way, but does not make use of advanced features like auto-renewal, whois privacy, etc.)<br />
<br />
==Setup==<br />
<br />
===Common Preparation===<br />
<br />
Setting up the export is similar to setting up any of Freeside's exports.<br />
<br />
* Make sure you have a reseller account at OpenSRS.<br />
<br />
* Log into OpenSRS and enter your IP address under "Add IPs for Script/API Access" in the Profile Management section of the site. If you haven't already done so, select "Generate New Private Key" and save the key for later. You'll paste it into the export configuration. (If you're intending to use the OpenSRS test system for testing your setup and switch to the live system later, you'll need to generate a separate key in each system.)<br />
<br />
* Make sure you have Net::OpenSRS and its prerequisites installed<br />
<br />
<code><br />
perl -MNet::OpenSRS -e 'print $Net::OpenSRS::VERSION'<br />
</code><br />
<br />
* Patch Net::OpenSRS if necessary. Net::OpenSRS uses XML::Simple, which can use several XML parsers. At least one of these, probably SAX/Expat throws an exception parsing the response from OpenSRS when renewing a domain as the response does not meet strict XML standards.<br />
<br />
* Make sure your LWP::UserAgent can make HTTPS connections. (You have the Crypt::SSLeay or the IO::Socket::SSL module installed.) You'll need this for your Business::OnlinePayment modules too.<br />
<br />
* Log into Freeside, select "Configuration / Provisioning and services / Exports" in the menu, and "Add a new export" using domreg_opensrs, and configure the export.<br />
<br />
===Configuration===<br />
<br />
Many of the export's configuration options are required for Net::OpenSRS, so reading the documentation for that module may help in understanding the options.<br />
<br />
* The "Export host" must be the OpenSRS test or live gateway. Use one of the preset buttons in the description to get the right value.<br />
<br />
* Type in your OpenSRS reseller name.<br />
<br />
* Paste the OpenSRS private key.<br />
<br />
* Type in the password you'll use to manage the domains at https://manage.opensrs.net/ (This is a limitation of Net::OpenSRS: all domains are registered under the same set of credentials, and the user name is the same as your reseller user name.)<br />
<br />
* Enter a master domain that all other domains will be associated with at OpenSRS. (Net::OpenSRS uses this to associate all domains together.) This domain should be registered at OpenSRS with the user name and password you entered above.<br />
<br />
* Enter a Net::OpenSRS debug level. Set this to zero for production use, and 3 for testing. Debugging messages are written to the Apache server logs.<br />
<br />
* Select the top-level domains you want to allow the export to try to manage. The export does not implement all the business rules to successfully register domains in .ca, and several other TLDs.<br />
<br />
* Click "Apply changes"<br />
<br />
===New Setup===<br />
<br />
If you have no existing svc_domain service representing domain registrations that you wish to handle with OpenSRS:<br />
<br />
* Configure a service using svc_domain and associate the export with it. Or, modify an existing service to use the export.<br />
<br />
* Place the new svc_domain service in a package.<br />
<br />
===Conversion===<br />
<br />
If you already have a svc_domain service that you use for domain registrations, you can add the OpenSRS export to the exports used for that service. Configure the export as above before adding it to the service.<br />
<br />
Adding will take a few minutes if you have a sizable number of domains, as Freeside will be exporting all the domains. The export will not attempt to register or transfer any of your existing domains as they're probably already in the state you want.<br />
<br />
==Use==<br />
<br />
===New Domain===<br />
<br />
Once the export is set up and associated with a svc_domain service, Freeside will give you additional options when you provision the svc_domain. The "Add Domain" screen will let you choose to register the domain at OpenSRS, transfer it to OpenSRS, or just add the domain to Freeside. The last choice is useful if the client has the domain registered somewhere else and does not want you to handle the registration for them. The export does not check if the domain is already registered, so you need to ask the client if it is a new domain and choose register or transfer as appropriate.<br />
<br />
When a domain is registered, the customer contact information is used for the owner, admin, and billing contacts of the domain. OpenSRS requires a first and last name, street address, city, state and ZIP code, and a phone number and email address. The export uses the first invoicing email address.<br />
<br />
===View Domain===<br />
<br />
There are additional operations you can perform at the "View Domain" screen. The screen shows the registration status of the domain. This can include:<br />
<br />
* An error message to say that Net::OpenSRS is not installed.<br />
* An error message indicating that OpenSRS cannot be contacted and the status of the domain cannot be determined.<br />
* "Not registered" if the domain is not registered anywhere.<br />
* "Transfer to OpenSRS" if the domain is not registered through your OpenSRS reseller account.<br />
* The current expiration date of the registration if the domain is registered through your account.<br />
<br />
Depending on the status, a set of appropriate operations are displayed:<br />
<br />
* Register the domain at OpenSRS.<br />
* Transfer the domain to OpenSRS.<br />
* Renew the registration. (This is displayed even if the domain is registered for the maximum term.)<br />
* Revoke the registration. (This is displayed even if the domain has been registered longer than the grace period during which revocation is allowed.)<br />
<br />
Click on the link to select the desired operation.<br />
<br />
Once the operation has been attempted, you will see the result in the "View Domain" screen. If you have OpenSRS set to queue requests, then the operation will not be performed until you log into OpenSRS and tell it to perform the queued operation. (This is useful for testing, but you'll probably want to set OpenSRS for immediate processing in production.)<br />
<br />
===Transfers===<br />
<br />
Telling Freeside to transfer the domain just files a transfer request, causing OpenSRS to send the domain admin contact an email asking them to confirm the transfer. (It does not, and cannot, perform an unauthorized transfer.) Be sure to let them know where to get the required auth code to authorize the transfer.</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.9:Documentation:Administration:opensrs.pm&diff=5254Freeside:1.9:Documentation:Administration:opensrs.pm2009-08-11T15:45:39Z<p>Rsiddall: Initial draft</p>
<hr />
<div>=Using Freeside's OpenSRS Domain Registration Export=<br />
<br />
==Introduction==<br />
<br />
As of June, 2009, Freeside CVS includes an export to perform common operations on domains using the [[http://tucowsinc.com/|Tucows]] [[http://opensrs.com/|OpenSRS]] domain registration service.<br />
<br />
The export, domreg_opensrs, uses the Net::OpenSRS module from CPAN. (This uses OpenSRS in a simple, robust way, but does not make use of advanced features like auto-renewal, whois privacy, etc.)<br />
<br />
==Setup==<br />
<br />
===Common Preparation===<br />
<br />
Setting up the export is similar to setting up any of Freeside's exports.<br />
<br />
* Make sure you have a reseller account at OpenSRS.<br />
<br />
* Log into OpenSRS and enter your IP address under "Add IPs for Script/API Access" in the Profile Management section of the site. If you haven't already done so, select "Generate New Private Key" and save the key for later. You'll paste it into the export configuration. (If you're intending to use the OpenSRS test system for testing your setup and switch to the live system later, you'll need to generate a separate key in each system.)<br />
<br />
* Make sure you have Net::OpenSRS and its prerequisites installed<br />
<br />
<code><br />
perl -MNet::OpenSRS -e 'print $Net::OpenSRS::VERSION'<br />
</code><br />
<br />
* Patch Net::OpenSRS if necessary. Net::OpenSRS uses XML::Simple, which can use several XML parsers. At least one of these, probably SAX/Expat throws an exception parsing the response from OpenSRS when renewing a domain as the response does not meet strict XML standards.<br />
<br />
* Make sure your LWP::UserAgent can make HTTPS connections. (You have the Crypt::SSLeay or the IO::Socket::SSL module installed.) You'll need this for your Business::OnlinePayment modules too.<br />
<br />
* Log into Freeside, select "Configuration / Provisioning and services / Exports" in the menu, and "Add a new export" using domreg_opensrs, and configure the export.<br />
<br />
===Configuration===<br />
<br />
Many of the export's configuration options are required for Net::OpenSRS, so reading the documentation for that module may help in understanding the options.<br />
<br />
* The "Export host" must be the OpenSRS test or live gateway. Use one of the preset buttons in the description to get the right value.<br />
<br />
* Type in your OpenSRS reseller name.<br />
<br />
* Paste the OpenSRS private key.<br />
<br />
* Type in the password you'll use to manage the domains at https://manage.opensrs.net/ (This is a limitation of Net::OpenSRS: all domains are registered under the same set of credentials, and the user name is the same as your reseller user name.)<br />
<br />
* Enter a master domain that all other domains will be associated with at OpenSRS. (Net::OpenSRS uses this to associate all domains together.) This domain should be registered at OpenSRS with the user name and password you entered above.<br />
<br />
* Enter a Net::OpenSRS debug level. Set this to zero for production use, and 3 for testing. Debugging messages are written to the Apache server logs.<br />
<br />
* Select the top-level domains you want to allow the export to try to manage. The export does not implement all the business rules to successfully register domains in .ca, and several other TLDs.<br />
<br />
* Click "Apply changes"<br />
<br />
===New Setup===<br />
<br />
If you have no existing svc_domain service representing domain registrations that you wish to handle with OpenSRS:<br />
<br />
* Configure a service using svc_domain and associate the export with it. Or, modify an existing service to use the export.<br />
<br />
* Place the new svc_domain service in a package.<br />
<br />
===Conversion===<br />
<br />
If you already have a svc_domain service that you use for domain registrations, you can add the OpenSRS export to the exports used for that service. Configure the export as above before adding it to the service.<br />
<br />
Adding will take a few minutes if you have a sizable number of domains, as Freeside will be exporting all the domains. The export will not attempt to register or transfer any of your existing domains as they're probably already in the state you want.<br />
<br />
==Use==<br />
<br />
===New Domain===<br />
<br />
Once the export is set up and associated with a svc_domain service, Freeside will give you additional options when you provision the svc_domain. The "Add Domain" screen will let you choose to register the domain at OpenSRS, transfer it to OpenSRS, or just add the domain to Freeside. The last choice is useful if the client has the domain registered somewhere else and does not want you to handle the registration for them. The export does not check if the domain is already registered, so you need to ask the client if it is a new domain and choose register or transfer as appropriate.<br />
<br />
When a domain is registered, the customer contact information is used for the owner, admin, and billing contacts of the domain. OpenSRS requires a first and last name, street address, city, state and ZIP code, and a phone number and email address. The export uses the first invoicing email address.<br />
<br />
===View Domain===<br />
<br />
There are additional operations you can perform at the "View Domain" screen. The screen shows the registration status of the domain. This can include:<br />
<br />
* An error message to say that Net::OpenSRS is not installed.<br />
* An error message indicating that OpenSRS cannot be contacted and the status of the domain cannot be determined.<br />
* "Not registered" if the domain is not registered anywhere.<br />
* "Transfer to OpenSRS" if the domain is not registered through your OpenSRS reseller account.<br />
* The current expiration date of the registration if the domain is registered through your account.<br />
<br />
Depending on the status, a set of appropriate operations are displayed:<br />
<br />
* Register the domain at OpenSRS.<br />
* Transfer the domain to OpenSRS.<br />
* Renew the registration. (This is displayed even if the domain is registered for the maximum term.)<br />
* Revoke the registration. (This is displayed even if the domain has been registered longer than the grace period during which revocation is allowed.)<br />
<br />
Click on the link to select the desired operation.<br />
<br />
Once the operation has been attempted, you will see the result in the "View Domain" screen. If you have OpenSRS set to queue requests, then the operation will not be performed until you log into OpenSRS and tell it to perform the queued operation. (This is useful for testing, but you'll probably want to set OpenSRS for immediate processing in production.)<br />
<br />
===Transfers===<br />
<br />
Telling Freeside to transfer the domain just files a transfer request, causing OpenSRS to send the domain admin contact an email asking them to confirm the transfer. (It does not, and cannot, perform an unauthorized transfer.) Be sure to let them know where to get the required auth code to authorize the transfer.</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:InstallingUsingRPM&diff=4784Freeside:1.7:Documentation:InstallingUsingRPM2009-06-14T12:55:21Z<p>Rsiddall: Updated instructions for replacement core Perl modules. (Mostly for yum as I can't test it with up2date.)</p>
<hr />
<div>=Introduction=<br />
<br />
==Warning!==<br />
The RPM installation of Freeside is experimental! The instructions below may be incomplete or incorrect and are subject to change. You should only attempt to use the RPM installation if you are prepared to work around omissions and inaccuracies, and can recover data in the event of a loss.<br />
<br />
==Information==<br />
<br />
The currently available packages are for the i386 and x86_64 architectures. The packages are built on CentOS v4 and currently tested on CentOS v5 and RHEL v4. Packagers for other distributions are welcome; see [[Freeside:1.7:Documentation:CreatingRPMRepo|creating RPM repositories]]. You can also read about our own [[Freeside:1.7:Documentation:RPMBuildSystem|RPM build system]].<br />
<br />
Installing the RPM version of Freeside may not be a good idea if you plan to do development on Freeside as the RPMs may not include all the files supplied in the tarball.<br />
<br />
===Status===<br />
<br />
The RPM version of Freeside does not include Request Tracker at this time. The self-service RPM has not been fully tested. Both PostgreSQL and MySQL back-end databases should work. The version and release of the RPM are shown in the "Billing Main" page in Freeside.<br />
<br />
=Installation=<br />
<br />
RPM installation can preferably be done with a tool such as YUM or APT (or up2date on RHEL). As a last resort, you can install with RPM directly.<br />
<br />
==Installing using yum==<br />
=== Setup YUM ===<br />
* If you are installing to a machine behind a proxy server, you may need to set up the proxy directives in /etc/yum.conf for yum to work correctly.<br />
* Make sure the yum priorities plugin is installed by running <code>yum install yum-plugin-priorities</code> for CentOS v4, or <code>yum install yum-priorities</code> for CentOS v5.<br />
* Make sure the yum priorities plugin is enabled by editing the <code>/etc/yum/pluginconf.d/priorities.conf</code> file, and ensuring that it contains the following lines: <br />
[main]<br />
enabled=1<br />
* Edit <code>/etc/yum.repso.d/CentOS-Base.repo</code>, adding the following lines to the <nowiki>[base] and [update] sections, and adding the [centosplus] section:</nowiki><br />
<br />
CentOS v4:<br />
<br />
<pre>[base] <br />
exclude=php* httpd* postgres* MySQL* mysql* perl perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[update]<br />
exclude=php* httpd* postgres* MySQL* mysql* perl perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[centosplus]<br />
enabled=1<br />
priority=2<br />
</pre><br />
<br />
CentOS v5:<br />
<br />
<pre>[base] <br />
exclude=php* httpd* MySQL* mysql* perl perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[update]<br />
exclude=php* httpd* MySQL* mysql* perl perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[centosplus]<br />
enabled=1<br />
priority=2<br />
</pre><br />
<br />
* Select a repository containing the required RPMs, and add the repository to a new file in your /etc/yum.repo.d directory or directly to the /etc/yum.conf file. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
<br />
==== 1.7.3 stable repository ====<br />
<br />
(not yet available)<br />
<br />
==== 1_7_BRANCH testing repository ====<br />
CentOS/RHEL v4 i386: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-4<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/i386<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v4 x86_64: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-4<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/x86_64<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v5 i386: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.7/testing/i386<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v5 x86_64: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.7/testing/x86_64<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
==== HEAD/1.9 testing repository ====<br />
CentOS/RHEL v5 i386: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.9/testing/i386<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v5 x86_64: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-5<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/5/freeside-1.9/testing/x86_64<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
=== Install ===<br />
<br />
* Install the required components by issuing the commands:<br />
<pre>yum install httpd mod_perl mod_ssl perl postgresql-server<br />
yum install perl-File-Temp perl-CGI.pm perl-Test-Simple<br />
yum install freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes:<br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database.<br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use.<br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=== Troubleshooting ===<br />
<br />
* If you are using a repository that is normally disabled, use <code>yum --enablerepo=Freeside-4 install ...</code> where ''Freeside-4'' is the name of the repository.<br />
* If you get an error such as:<br />
<pre><br />
Transaction Check Error: file /usr/share/man/man3/File::Temp.3pm.gz from install of perl-File-Temp-0.18-1 conflicts with file from package perl-5.8.8-4.el4s1<br />
</pre><br />
then you're using an operating system with a badly packaged Perl. You will have to force the installation of the RPM which conflicts with the Perl, using something like:<br />
<pre><br />
rpm -Uvh --force /var/cache/yum/freeside/packages/perl-File-Temp-0.18-1.x86_64.rpm<br />
</pre><br />
This installs the conflicting RPM from yum's cache for the "freeside" repository.<br />
You can then retry installing from yum.<br />
<br />
==Installing using up2date==<br />
<br />
Mainly for vanilla RHEL (tested on 4.5, 4.7); if you are running CentOS, the [[#Installing_using_yum|yum]] or [[#Installing_using_APT|apt-get]] instructions may be preferable.<br />
<br />
===Setup up2date===<br />
* Select a repository containing the required RPMs and add the repository to your /etc/sysconfig/rhn/sources file. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
* Import GPG keys:<br />
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4<br />
rpm --import http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
<br />
==== 1.7.3 stable repository ====<br />
(not yet available)<br />
<br />
==== 1_7_BRANCH testing repository ====<br />
RHEL v4 i386: <pre>yum centosplus http://mirror.centos.org/centos/4/centosplus/i386/<br />
yum freeside http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/i386</pre><br />
<br />
RHEL v4 x86_64: <pre>yum centosplus http://mirror.centos.org/centos/4/centosplus/x86_64/<br />
yum freeside http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/x86_64</pre><br />
<br />
=== Install ===<br />
<br />
* Install the required components by issuing the commands:<br />
<pre>up2date httpd mod_perl mod_ssl perl postgresql-server tetex-latex perl-Digest-SHA1 perl-XML-Parser<br />
up2date perl-File-Temp #this will fail, that's okay for now<br />
rpm -Uvh --force /var/spool/up2date/perl-File-Temp-0.18-1.x86_64.rpm #to force File::Temp 0.18 installation, for now<br />
up2date freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes:<br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database.<br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use.<br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=== Troubleshooting ===<br />
<br />
* Does up2date show a "freeside" channel when doing <code>up2date --show-channels</code>, but won't install packages from that repository? Make sure <code>/etc/sysconfig/rhn/up2date</code> has a line designating a blank proxy:<br />
httpProxy=<br />
<br />
==Installing using APT==<br />
===Setup APT===<br />
Select a repository containing the required RPMs and add the repository to your /etc/apt.conf file.. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
====1.7.3 stable repository ====<br />
(not yet available)<br />
====1_7_BRANCH testing repository====<br />
(not yet available)<br />
<br />
===Install===<br />
* Install the required components by issuing the command:<br />
<pre>apt-get install freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes: <br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database. <br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use. <br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
==Installation using RPM==<br />
Installation is much easier if you have a repository that works with a tool such as [[#Installing_using_yum|yum]], [[#Installing_using_APT|apt-get]] or [[#Installing_using_up2date|up2date]]. If you only have rpm and wish to use that, enter:<br />
<br />
<pre><br />
rpm -Uvh --test freeside-1.7.3-1.noarch.rpm \<br />
freeside-mason-1.7.3-1.noarch.rpm \<br />
freeside-postgresql-1.7.3-1.noarch.rpm \<br />
perl-Business-OnlinePayment-AuthorizeNet-3.17-1.i386.rpm<br />
</pre><br />
Where:<br />
* 1.7.3-1 is the version of Freeside and the release of the RPM. Change this if necessary.<br />
* postgresql is the database you wish to use as the Freeside back-end. Replace freeside-postgresql with freeside-mysql if you wish to use MySQL. See the main installation document for which databases are supported.<br />
* Replace AuthorizeNet with the name of the credit card processor you wish to use for real-time transactions. Also replace 3.17-1.i386 with the current version, release, and architecture of the corresponding Business::OnlinePayment RPM.<br />
The command should result in some warnings about unsatisfied dependencies. Find the corresponding RPMs and add them to the list on the command line. Keep doing this until the command results in no warnings, then issue the command one last time without the --test to actually install all the RPMs.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=Finalizing the installation=<br />
<br />
* Start the database:<br />
with PostgreSQL<br />
<br />
chown -R postgres:postgres /var/lib/pgsql<br />
/sbin/service postgresql start<br />
<br />
or with MySQL<br />
<br />
/sbin/service mysqld start<br />
<br />
* Allow the freeside user full access to the freeside database. <br />
with PostgreSQL<br />
<pre><br />
$ su - postgres<br />
$ createuser -P freeside<br />
Enter password for user "freeside": <br />
Enter it again: <br />
Shall the new role be a superuser? (y/n) n<br />
Shall the new role be allowed to create databases? (y/n) y<br />
Shall the new role be allowed to create more new roles? (y/n) n<br />
CREATE ROLE<br />
</pre><br />
or with MySQL:<br />
<pre><br />
$ mysqladmin -u root password 'set_a_root_database_password'<br />
$ mysql -u root -p<br />
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY 'set_a_freeside_database_password';<br />
</pre><br />
<br />
* Edit <code>/etc/freeside/secrets</code> and replace the third line (currently blank) with the password you entered in the last step.<br />
<br />
* Add the freeside database to your database engine: <br />
with Postgres: <br />
<pre><br />
$ su freeside<br />
$ createdb -E sql_ascii freeside<br />
</pre><br />
or with MySQL: <br />
<pre><br />
$ mysqladmin -u freeside -p create freeside <br />
</pre><br />
<br />
* As the freeside UNIX user, run <code>freeside-setup -d your.domain.name</code> to create the database tables and initial data.<br />
<pre><br />
$ su freeside<br />
$ freeside-setup -d example.com<br />
</pre><br />
<br />
* Create the Freeside system users: <br />
<pre><br />
$ su freeside<br />
$ freeside-adduser -g 1 fs_queue<br />
$ freeside-adduser -g 1 fs_daily<br />
$ freeside-adduser -g 1 fs_selfservice<br />
</pre><br />
<br />
* Create one or more Freeside users (your internal sales/tech folks, not customer accounts):<br />
<pre><br />
$ su freeside<br />
$ freeside-adduser -g 1 username<br />
$ htpasswd /etc/freeside/htpasswd username<br />
Password: <br />
</pre><br />
Additional users can be added using the same command or from the web interface.<br />
<br />
* <code>/sbin/service freeside start</code><br />
<br />
* <code>/sbin/service httpd restart</code><br />
<br />
* Log into the web interface using the username and password you entered above.<br />
<br />
* Now proceed to the initial [[Freeside:1.7:Documentation:Administration|administration]] of your installation.<br />
<br />
=Upgrading=<br />
<br />
==Introduction==<br />
If you have an existing Freeside installation that was installed from the tarball, following the instructions for installing or upgrading from RPM&nbsp;'''''may''''' result in an operational system where the RPMs have overwritten most or all of the files installed from the tarball or CPAN.<br />
<br />
==Upgrading==<br />
Upgrading can be done with a tool such as YUM or APT (or up2date on RHEL), preferably, or as a last resort, with RPM directly.<br />
<br />
===Upgrading using a repository===<br />
If you installed the RPM version of Freeside from a repository, and a new version is available on the repository, then you can install the new files on your system using the package manager:<br />
<pre>yum update</pre><br />
or:<br />
<pre>apt-get update</pre><br />
To avoid unplanned upgrades, you may wish to mark the repository containing Freeside as disabled, or remove it from your yum or apt configuration files.<br />
===Upgrading using RPM===<br />
When there's a new version of Freeside available as RPM, just download the new RPMs and upgrade them:<pre><br />
rpm -Uvh --test freeside-1.7.3-1.noarch.rpm freeside-mason-1.7.3-1.noarch.rpm freeside-postgresql-1.7.3-1.noarch.rpm<br />
</pre><br />
<br />
==Finalizing the upgrade==<br />
* As the freeside UNIX user, run <code>freeside-upgrade username</code>, passing the username of an internal Freeside user.<br />
* If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.<br />
* Restart Apache and Freeside:<br />
/etc/init.d/httpd restart<br />
/etc/init.d/freeside restart<br />
* You may want to check your ACLs under Configuration->Employee->View/Edit employee groups and grant some of the new rights to one or more groups.<br />
<br />
=Known issues=<br />
<br />
* yum will not automatically upgrade Perl modules bundled in the main Perl RPM to the newer versions on the Freeside repository due to the lack of version information in the main Perl RPM. (It cannot determine that the newer versions are newer.) So, you have to install them as a separate operation. This applies to the <code>perl-File-Temp perl-CGI.pm perl-Test-Simple</code> RPMs.<br />
<br />
* ssh -X in as root and run system-config-securitylevel (can't seem to do this from -tui. may need to <code>yum install xauth xorg-x11-fonts-*</code>)<br />
** firewall options, open up www and secure www<br />
** selinux options: enforcing -> permissive (otherwise freeside can't even create /etc/freeside/masondata/obj etc.)</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4639Freeside:Documentation:MirroringRPMRepo2009-05-07T19:48:26Z<p>Rsiddall: /* Introduction */ Added links to the simpler SLES 10 instructions.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
There's a [[Freeside:1.7:Documentation:MirroringRPMRepoYaST|SuSE-specific version of this page with longer examples]], as well as two pages on [[Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup|setting up a mirror of Freeside 1.7 "testing" for SLES 10]] and [[Freeside:1.7:Documentation:MirroringRPMRepoYaST:UsingTheMirror|using it]].<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
perl -pi -e 's|freeside.biz/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingRPM|CentOS/RHEL]] or [[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
====Updating Your Freeside Installation====<br />
<br />
On RHEL/CentOS, etc.:<br />
<br />
<pre><br />
yum --enablerepo=freeside-testing update<br />
</pre><br />
<br />
On SuSE:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4638Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-05-07T19:45:47Z<p>Rsiddall: Moved the instructions on using the mirror to a different page.</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget. Instructions on [[Freeside:1.7:Documentation:MirroringRPMRepoYaST:UsingTheMirror|how to use your mirror using YaST2 and zypper are on another page]]. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an [[#Initial_Installation_of_Freeside|installation]] or [[#Updating_Your_Freeside_Installation|update]]<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
==Using Your Mirror==<br />
<br />
Full instructions for using your mirror are [[Freeside:1.7:Documentation:MirroringRPMRepoYaST:UsingTheMirror|on a separate page]].</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4636Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-05-07T19:40:56Z<p>Rsiddall: Freeside:1.7:Documentation:MirroringRPMRepoYaST:Simple moved to Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup: This page will contain only the setup information.</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an [[#Initial_Installation_of_Freeside|installation]] or [[#Updating_Your_Freeside_Installation|update]]<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
<pre><br />
SELFSERVICE_MACHINES=localhost<br />
</pre><br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Simple&diff=4637Freeside:1.7:Documentation:MirroringRPMRepoYaST:Simple2009-05-07T19:40:56Z<p>Rsiddall: Freeside:1.7:Documentation:MirroringRPMRepoYaST:Simple moved to Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup: This page will contain only the setup information.</p>
<hr />
<div>#REDIRECT [[Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup]]</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4634Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-05-07T19:40:20Z<p>Rsiddall: Freeside:1.7:Documentation:MirroringRPMRepoYaST moved to Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long: This version of the page was rather long. I'm replacing it with two shorter pages.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
The first steps are almost the same as for the Freeside billing server, except that you don't have to enable mod_perl:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST&diff=4635Freeside:1.7:Documentation:MirroringRPMRepoYaST2009-05-07T19:40:20Z<p>Rsiddall: Freeside:1.7:Documentation:MirroringRPMRepoYaST moved to Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long: This version of the page was rather long. I'm replacing it with two shorter pages.</p>
<hr />
<div>#REDIRECT [[Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long]]</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:UsingTheMirror&diff=4633Freeside:1.7:Documentation:MirroringRPMRepoYaST:UsingTheMirror2009-05-07T19:39:37Z<p>Rsiddall: 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.</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2: Using Your Mirror=<br />
<br />
==Introduction==<br />
<br />
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 [[Freeside:1.7:Documentation:MirroringRPMRepoYaST|the main SLES mirroring page]].<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
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:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
==Using Your Mirror==<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
===Initial Installation of Freeside===<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
===Initial Installation of the Self-Service Interface===<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
<pre><br />
SELFSERVICE_MACHINES=localhost<br />
</pre><br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
===Updating Your Freeside Installation===<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4632Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-05-06T19:28:18Z<p>Rsiddall: Upped the cut-dirs parameter so that users could omit the /repo/sles from the URL of their mirror. Also fixed a repo URL.</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an [[#Initial_Installation_of_Freeside|installation]] or [[#Updating_Your_Freeside_Installation|update]]<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=3 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/10/freeside-1.7/testing/self-service/i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
<pre><br />
SELFSERVICE_MACHINES=localhost<br />
</pre><br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4587Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T19:39:40Z<p>Rsiddall: /* Initial Installation of the Self-Service Interface */</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an [[#Initial_Installation_of_Freeside|installation]] or [[#Updating_Your_Freeside_Installation|update]]<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
<pre><br />
SELFSERVICE_MACHINES=localhost<br />
</pre><br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4586Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T19:34:55Z<p>Rsiddall: /* Initial Setup */</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an [[#Initial_Installation_of_Freeside|installation]] or [[#Updating_Your_Freeside_Installation|update]]<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4585Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T19:32:09Z<p>Rsiddall: /* Introduction */</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4584Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T19:29:36Z<p>Rsiddall: /* Initial Installation of the Self-Service Interface */</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The following instructions will not mirror the whole Freeside repository, just the branch(es) for the SuSE version you use.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4583Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T19:27:59Z<p>Rsiddall: /* Other Assumptions */</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The following instructions will not mirror the whole Freeside repository, just the branch(es) for the SuSE version you use.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The PostgreSQL database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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 as the RPM did not do this:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4582Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T19:27:09Z<p>Rsiddall: </p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The following instructions will not mirror the whole Freeside repository, just the branch(es) for the SuSE version you use.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Other Assumptions===<br />
<br />
*You are also using the Freeside self-service interface.<br />
<br />
*You are installing the self-service interface on the same computer as the billing server.<br />
<br />
*You are using PostgreSQL as the database server for Freeside.<br />
<br />
*The Freeside database server will be on the same computer as the billing server.<br />
<br />
==Instructions==<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (You may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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 as the RPM did not do this:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4581Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T19:18:01Z<p>Rsiddall: </p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. The following instructions will not mirror the whole repository, just the branch(es) for the SuSE version you use.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (For older RPMs you may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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 as the RPM did not do this:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4580Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T15:35:47Z<p>Rsiddall: </p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. The following instructions will not mirror the whole repository, just the branch(es) for the SuSE version you use.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Web Server Caching===<br />
<br />
The web server you use as a mirror must not be cached as that would result in a delay before the updated mirror contents became available to clients.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder (<code>/srv/www/freeside-repo</code>) and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder on the machine that will act as your repository server:<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs (<code>/var/log/freeside/selfservice.localhost.log</code>) to make sure it's working. (For older RPMs you may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface using the credentials for an account already in the billing server.<br />
<br />
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 as the RPM did not do this:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup&diff=4579Freeside:1.7:Documentation:MirroringRPMRepoYaST:Setup2009-04-16T15:17:49Z<p>Rsiddall: Another attempt at simple instructions for Freeside 1.7 branch, testing, i386 on SLES 10.</p>
<hr />
<div>=Mirroring the Freeside 1.7 Testing RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the i386 version of the Freeside 1.7 branch "testing" RPM repository for SuSE Linux Enterprise Server (SLES) 10, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. The following instructions will not mirror the whole repository, just the branch(es) for the SuSE version you use.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Web Server Caching===<br />
<br />
The web server you use as a mirror must not be cached as that would result in a delay before the updated mirror contents became available to clients.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
Replace <code>server.domain.tld</code> in the following with your actual server name.<br />
<br />
To set up the mirror initially:<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
(The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.)<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. Put an Apache configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
And remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources if not already there<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
# Assumes you have server.{csr,crt,key} in /root...<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (use client instead if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
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:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # and then<br />
# Find '#ServerName www.example.com' and uncomment and correct ServerName<br />
# Find '/#ServerAdmin root@example.com' and uncomment and correct ServerAdmin<br />
# Fix up any SSL file locations if you put your server certificate somewhere other than the default<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
<pre><br />
/bin/su freeside<br />
cd<br />
ssh-keygen -t dsa<br />
# And if you're running self-service on the same machine:<br />
cd .ssh<br />
cp -p id_dsa.pub authorized_keys2<br />
ssh localhost<br />
</pre><br />
<br />
*Add the self-service machine to /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working. (For older RPMs you may need to install IPC::ShareLite, <code>zypper -n install perl-IPC-ShareLite</code>, and restart the freeside service.)<br />
<br />
<pre><br />
service freeside start<br />
</pre><br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
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 as the RPM did not do this:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
Just run zypper and tell it to update packages:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4578Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:37:48Z<p>Rsiddall: /* Initial Installation of the Self-Service Interface */ Factoring out common steps for people installing both self-service and billing server on the same machine</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
The first steps are almost the same as for the Freeside billing server, except that you don't have to enable mod_perl:<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
</pre><br />
<br />
To install the self-service interface you use a different repository on your mirror and install the appropriate set of RPMs:<br />
<br />
<pre><br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4577Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:23:06Z<p>Rsiddall: /* Initial Installation of the Self-Service Interface */ Link to SSH instructions.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*Set up [[Freeside:1.7:Documentation:Self-Service_Installation#SSH_setup|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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group:<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4576Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:17:16Z<p>Rsiddall: /* Initial Setup */</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*The Freeside web server auto-generated index.html files. Remove them from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4575Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:16:22Z<p>Rsiddall: /* Initial Setup */</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash after the i386 prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Remove the auto-generated index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4574Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:15:31Z<p>Rsiddall: /* Instructions */</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Remove the auto-generated index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4573Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:14:37Z<p>Rsiddall: /* Introduction */ Using YaST, etc. with the repository; using wget to create it...</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using wget; and how to use your mirror using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Remove the auto-generated index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4572Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:09:20Z<p>Rsiddall: Instructions for fixing a bug in the RPM's user creation on SuSE.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Remove the auto-generated index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
<pre><br />
mkdir /home/freeside<br />
chown freeside.users /home/freeside<br />
groupadd freeside<br />
</pre><br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4571Freeside:Documentation:MirroringRPMRepo2009-04-15T15:07:09Z<p>Rsiddall: Shuffled up the section on changing existing clients over to the new repository.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
There's a [[Freeside:1.7:Documentation:MirroringRPMRepoYaST|SuSE-specific version of this page with longer examples]].<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
perl -pi -e 's|freeside.biz/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingRPM|CentOS/RHEL]] or [[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
====Updating Your Freeside Installation====<br />
<br />
On RHEL/CentOS, etc.:<br />
<br />
<pre><br />
yum --enablerepo=freeside-testing update<br />
</pre><br />
<br />
On SuSE:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4570Freeside:Documentation:MirroringRPMRepo2009-04-15T15:05:36Z<p>Rsiddall: /* Introduction */ Added link to SuSE specific page...</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
There's a [[Freeside:1.7:Documentation:MirroringRPMRepoYaST|SuSE-specific version of this page with longer examples]].<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
perl -pi -e 's|freeside.biz/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingRPM|CentOS/RHEL]] or [[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
====Updating Your Freeside Installation====<br />
<br />
On RHEL/CentOS, etc.:<br />
<br />
<pre><br />
yum --enablerepo=freeside-testing update<br />
</pre><br />
<br />
On SuSE:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4569Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:03:35Z<p>Rsiddall: Removing some detail about yum.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing files used by yum<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Remove the auto-generated index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4568Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:02:15Z<p>Rsiddall: Managed to get a broken link again.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using YaST2 and zypper. There's more discussion on the main page on [[Freeside:1.7:Documentation:MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Remove the auto-generated index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long&diff=4567Freeside:1.7:Documentation:MirroringRPMRepoYaST:Long2009-04-15T15:00:29Z<p>Rsiddall: SuSE-specific version of mirroring instructions. This can contain longer, SuSE-specific, examples.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository with YaST2=<br />
<br />
==Introduction==<br />
<br />
This page explains how to mirror the Freeside RPM repository for SuSE systems, including SLES, using YaST2 and zypper. There's more discussion on the main page on [[MirroringRPMRepo|mirroring the RPM repository]].<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the SuSE version you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/ # other distributions<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-CVS-change) and may lack prerequisite Perl modules that have recently begun to be used.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*Copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Remove the auto-generated index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
Remove the index.html files generated by the web server from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Switching Existing Clients to Your Repository===<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
There's no harm to adding the repository for the self-service files as another installation source if it's not already there:<br />
<br />
<pre><br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository. These instructions are summarized below.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Add the Freeside repository as an installation source<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
# Install Freeside itself (specify the Business::OnlinePayment module you use)<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
====Updating Your Freeside Installation====<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4566Freeside:Documentation:MirroringRPMRepo2009-04-15T14:41:26Z<p>Rsiddall: Updated the section on using the repository.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://freeside.biz/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=100k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
perl -pi -e 's|freeside.biz/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://freeside.biz/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingRPM|CentOS/RHEL]] or [[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of the source using freeside.biz (or wavetail.420.am), say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre><br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Initial Installation of the Self-Service Interface====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL for the HTTP server<br />
yast2 http-server modules enable=ssl<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Add the self-service repository to zypper's installation sources<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/self-service i386<br />
# Install Freeside Self-Service<br />
zypper -n install freeside-selfservice<br />
</pre><br />
<br />
and then finish the self-service installation as normal:<br />
<br />
*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).<br />
<br />
*Add the self-service machine to /etc/defaults/freeside or /etc/sysconfig/freeside on the billing server.<br />
<br />
*Start the freeside service on the billing server and check the logs to make sure it's working.<br />
<br />
*Check you can log in via the self-service interface.<br />
<br />
On older SLES/SuSE systems you may need to create a home directory for the freeside user and also create a freeside group.<br />
<br />
====Updating Your Freeside Installation====<br />
<br />
On RHEL/CentOS, etc.:<br />
<br />
<pre><br />
yum --enablerepo=freeside-testing update<br />
</pre><br />
<br />
On SuSE:<br />
<br />
<pre><br />
zypper -t package update<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:InstallingUsingYaST&diff=4565Freeside:1.7:Documentation:InstallingUsingYaST2009-04-14T20:46:52Z<p>Rsiddall: /* Status */ Updating the status to match reality.</p>
<hr />
<div>=Introduction=<br />
<br />
==Warnings!==<br />
<br />
The YaST installation of Freeside is experimental! The instructions below may be incomplete or incorrect and are subject to change. You should only attempt to use the YaST installation if you are prepared to work around omissions and inaccuracies, and can recover data in the event of a loss.<br />
<br />
==Information==<br />
<br />
YaST is the installer on the SuSE Linux distributions: Novell's SuSE Enterprise Linux Server (SLES) and OpenSuSE. The Freeside repository is a repomd, i.e. RPM-based, repository.<br />
<br />
Installing the YaST version of Freeside may not be a good idea if you plan to do development on Freeside as the RPMs may not include all the files supplied in the tarball.<br />
<br />
YaST tends to try to pull in a large set of conflicting RPMs, so any attempt to use YaST or zypper may result in you having to work through a slew of warnings and tell YaST not to pull in RPMs you didn't specify, or which yum would have concluded were not required.<br />
<br />
===Status===<br />
<br />
The YaST version of Freeside does not include Request Tracker at this time. The self-service interface no longer conflicts with the main server installation, but has been temporarily moved to its own repository. The MySQL backend has not yet been tested. Only the 1.7 branch has been tested. The version and release of the YaST package is shown in the "Billing Main" page in Freeside.<br />
<br />
=Installation=<br />
<br />
== Basic setup and Apache webserver ==<br />
<br />
* Install SLES on your target machine.<br />
<br />
* SSH in as root.<br />
<br />
* If you are installing to a machine behind a proxy server, run <code>yast2</code> and select <code>Network Settings : Proxy</code> and enter the proxy details so that YaST can access external repositories. (You can also set the proxy settings from the command line using <code>yast2 proxy</code>.)<br />
<br />
* Run "yast2" and select "Software : Installation Source", or (faster) enter "yast2 inst_source", and make sure the SLES repo is present. If not click Add and add the URL of the repo.<br />
<br />
* Also add an update source if you're using a separate repo for updates.<br />
<br />
* At the command line enter:<br />
<br />
<pre><br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
</pre><br />
<br />
* Setup SSL. SLES does not ship with a working SSL configuration for Apache2. You'll need to configure a virtual host and configure SSL on that virtual host. First, scp the server certificate and key to /etc/apache2/ssl.{crt,key}, and copy any certificate authority bundles supplied by your certificate provider.<br />
<br />
Next, use the template in /etc/apache2/vhosts.d to create an SSL configuration file for use with Apache:<br />
<br />
<pre><br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # Uncomment and correct ServerName, ServerAdmin, and any SSL file locations<br />
</pre><br />
<br />
ServerName can be the same as the main host name of the SuSE machine.<br />
<br />
== Zypper setup == <br />
<br />
* Install the zypper catalog manager:<br />
<br />
<pre><br />
yast2 --install zypper<br />
</pre><br />
<br />
as zypper has a better CLI interface than YaST.<br />
<br />
* Use zypper to update the whole system?<br />
<br />
<pre><br />
zypper update<br />
</pre><br />
<br />
You might have to repeat this several times as updating zypper itself may result in more updates becoming available.<br />
<br />
== PostgreSQL setup ==<br />
<br />
* Use zypper to install postgresql-server if the database server is going to be running on the same machine as Freeside:<br />
<br />
<pre><br />
zypper install postgresql-server<br />
</pre><br />
<br />
* Set PostgreSQL to run on startup:<br />
<br />
<pre><br />
chkconfig --add postgresql<br />
</pre><br />
<br />
and start it now<br />
<br />
<pre><br />
service postgresql start<br />
</pre><br />
<br />
* If the database server is going to be running elsewhere, you probably still want the psql command-line client:<br />
<br />
<pre><br />
zypper install postgresql<br />
</pre><br />
<br />
== Freeside setup ==<br />
<br />
* Use zypper to add the Freeside repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/x86_64<br />
</pre><br />
<br />
* Install Freeside:<br />
<br />
<pre><br />
zypper install freeside-postgresql<br />
</pre><br />
<br />
If zypper complains that it can't find a provider of "freeside" or "freeside-mason", it means that your repo is missing Perl module RPMs that the freeside or freeside-mason RPMs require. You can keep telling zypper to ignore that requirement, which will cause zypper to enumerate the missing modules.<br />
<br />
* Install Business::OnlinePayment gateways:<br />
<br />
<pre><br />
zypper install perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
* Optionally, check for troublesome RPMs:<br />
<br />
You may wish to spot check the version of a couple of RPMs at this point to detect problems now before the final stages of installation fail.<br />
<br />
For each of <code><nowiki>perl-DBI</nowiki></code> and <code><nowiki>perl-MailTools</nowiki></code>, do the following.<br />
<br />
<pre><br />
zypper search perl-MailTools<br />
</pre><br />
<br />
which should show the installed version, marked with an 'i' in the left column, as being the same as the one on the Freeside repository. If the installed version came from the SLES repository, see the section on troublesome RPMs.<br />
<br />
* Work down the final steps to bring up a Freeside installation:<br />
<br />
<pre><br />
su postgres -c 'createuser -P freeside'<br />
su freeside -c 'createdb -E sql_ascii freeside'<br />
su freeside -c 'freeside-setup -d example.com' <br />
su freeside -c 'for i in fs_queue fs_daily fs_selfservice ivan; do freeside-adduser -g 1 $i; done'<br />
su freeside -c '/usr/sbin/htpasswd2 /etc/freeside/htpasswd ivan'<br />
</pre><br />
<br />
A failure in freeside-setup may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
* Restart the web server<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
If the web server fails to start due to a problem in /etc/freeside/handler.pl, it may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
= Finalizing the installation =<br />
<br />
* Go to <code><nowiki>https://your.host.name/freeside</nowiki></code> and log in.<br />
<br />
* Proceed to the initial [[Freeside:1.7:Documentation:Administration | administration]] of your installation.<br />
<br />
* After doing the initial administration, do some cursory testing, including generating and viewing typeset invoices (to test pslatex).<br />
<br />
* Don't forget to prepare your installation for [[Freeside:1.7:Documentation:DisasterRecovery|Disaster Recovery]]<br />
<br />
= Updating the Installation =<br />
<br />
* Since the Freeside repository does not contain patch RPMs and zypper defaults to using patch RPMs, the installation can be updated with:<br />
<br />
<pre><br />
zypper update -t package<br />
</pre><br />
<br />
answer any questions about conflicts, and confirm the installation of the updated RPMs.<br />
<br />
* If there have been any schema changes, run <code><nowiki>/usr/bin/freeside-update</nowiki></code>.<br />
<br />
= Installing the Self-Service Interface =<br />
<br />
On a new SLES system, complete the steps up to and including the "zypper installation" above. (You can skip installing mod_perl and omit "perl" in the list of Apache modules to enable.)<br />
<br />
(Installing the self-service interface on the same system as the Freeside billing server is not recommended for security reasons. However, it is possible to install self-service by following these instructions after completing the billing server installation.)<br />
<br />
* Use zypper to add the Freeside Self-Service repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/x86_64<br />
</pre><br />
<br />
* Install Freeside Self-Service:<br />
<br />
<pre><br />
zypper install freeside-selfservice<br />
</pre><br />
<br />
This will install the core self-service Perl modules, the self-service CGI scripts, and an Apache configuration file that makes the self-service available at https://www.example.com/selfservice/selfservice.cgi. If you wish to configure Apache differently, either edit the configuration file after installation or install freeside-selfservice-cgi instead of freeside-selfservice to skip the configuration file installation.<br />
<br />
* Restart the Apache web server:<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
* On your billing server, check the value of SELFSERVICE_MACHINES in /etc/default/freeside or /etc/sysconfig/freeside, make sure the freeside user can SSH into each of the self-service machines, and start the freeside service. Look at the log file for the self-service daemon to ensure it's connecting correctly to the client. (Note that RPM-based self-service installations have the client daemon the billing server connects to located at /usr/sbin/freeside-selfservice-clientd, not under /usr/local/sbin. You may have to edit freeside-selfservice-server on your billing machine to match.)<br />
<br />
= Troublesome RPMs =<br />
<br />
You may have trouble getting yast2/zypper to install the newer versions of RPMs from the Freeside repository since libzypp considers build architecture to be more important than software version. This problem is more prevalent on i386 systems where it's easy to build an i386 RPM for which SLES has an older, i586, version. However, you may also see it where you build a noarch RPM to replace a SLES x86_64 RPM.<br />
<br />
If zypper refuses to install the newer version from the Freeside repository, the most likely problem is that libzypp prefers the architecture of the RPM on the SLES repository. You can confirm this by running (for perl-MailTools):<br />
<br />
<pre><br />
zypper -vv install perl-MailTools<br />
</pre><br />
<br />
The last couple of lines will show you which of the available RPMs zypper is selecting, and why.<br />
<br />
If you don't have time to fix your Freeside repository (i.e. to rebuild the RPM with the same or better BuildArch than that used for the equivalent SLES RPM), you can always download the RPMs manually from your repository source above, and install them with <code>rpm -Uvh filename.rpm</code>. The output of <code>zypper search perl-MailTools</code> gives you the base URL of the repository, the RPM name, version/release, and architecture, which you can piece together into the URL of the RPM:<br />
<br />
<pre><br />
wget <base_url>/<rpm_name>-<rpm_version/release>.<arch>.rpm<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:InstallingUsingYaST&diff=4564Freeside:1.7:Documentation:InstallingUsingYaST2009-04-14T20:26:24Z<p>Rsiddall: The installer needs to check the freeside user on the billing server can connect to the client machine via SSH</p>
<hr />
<div>=Introduction=<br />
<br />
==Warnings!==<br />
<br />
The YaST installation of Freeside is experimental! The instructions below may be incomplete or incorrect and are subject to change. You should only attempt to use the YaST installation if you are prepared to work around omissions and inaccuracies, and can recover data in the event of a loss.<br />
<br />
==Information==<br />
<br />
YaST is the installer on the SuSE Linux distributions: Novell's SuSE Enterprise Linux Server (SLES) and OpenSuSE. The Freeside repository is a repomd, i.e. RPM-based, repository.<br />
<br />
Installing the YaST version of Freeside may not be a good idea if you plan to do development on Freeside as the RPMs may not include all the files supplied in the tarball.<br />
<br />
YaST tends to try to pull in a large set of conflicting RPMs, so any attempt to use YaST or zypper may result in you having to work through a slew of warnings and tell YaST not to pull in RPMs you didn't specify, or which yum would have concluded were not required.<br />
<br />
===Status===<br />
<br />
The YaST version of Freeside does not include Request Tracker at this time. The self-service interface conflicts with the main server installation and has been temporarily removed from the repository. The MySQL backend has not yet been tested. Only the 1.7 branch has been tested. The version and release of the YaST package is shown in the "Billing Main" page in Freeside.<br />
<br />
=Installation=<br />
<br />
== Basic setup and Apache webserver ==<br />
<br />
* Install SLES on your target machine.<br />
<br />
* SSH in as root.<br />
<br />
* If you are installing to a machine behind a proxy server, run <code>yast2</code> and select <code>Network Settings : Proxy</code> and enter the proxy details so that YaST can access external repositories. (You can also set the proxy settings from the command line using <code>yast2 proxy</code>.)<br />
<br />
* Run "yast2" and select "Software : Installation Source", or (faster) enter "yast2 inst_source", and make sure the SLES repo is present. If not click Add and add the URL of the repo.<br />
<br />
* Also add an update source if you're using a separate repo for updates.<br />
<br />
* At the command line enter:<br />
<br />
<pre><br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
</pre><br />
<br />
* Setup SSL. SLES does not ship with a working SSL configuration for Apache2. You'll need to configure a virtual host and configure SSL on that virtual host. First, scp the server certificate and key to /etc/apache2/ssl.{crt,key}, and copy any certificate authority bundles supplied by your certificate provider.<br />
<br />
Next, use the template in /etc/apache2/vhosts.d to create an SSL configuration file for use with Apache:<br />
<br />
<pre><br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # Uncomment and correct ServerName, ServerAdmin, and any SSL file locations<br />
</pre><br />
<br />
ServerName can be the same as the main host name of the SuSE machine.<br />
<br />
== Zypper setup == <br />
<br />
* Install the zypper catalog manager:<br />
<br />
<pre><br />
yast2 --install zypper<br />
</pre><br />
<br />
as zypper has a better CLI interface than YaST.<br />
<br />
* Use zypper to update the whole system?<br />
<br />
<pre><br />
zypper update<br />
</pre><br />
<br />
You might have to repeat this several times as updating zypper itself may result in more updates becoming available.<br />
<br />
== PostgreSQL setup ==<br />
<br />
* Use zypper to install postgresql-server if the database server is going to be running on the same machine as Freeside:<br />
<br />
<pre><br />
zypper install postgresql-server<br />
</pre><br />
<br />
* Set PostgreSQL to run on startup:<br />
<br />
<pre><br />
chkconfig --add postgresql<br />
</pre><br />
<br />
and start it now<br />
<br />
<pre><br />
service postgresql start<br />
</pre><br />
<br />
* If the database server is going to be running elsewhere, you probably still want the psql command-line client:<br />
<br />
<pre><br />
zypper install postgresql<br />
</pre><br />
<br />
== Freeside setup ==<br />
<br />
* Use zypper to add the Freeside repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/x86_64<br />
</pre><br />
<br />
* Install Freeside:<br />
<br />
<pre><br />
zypper install freeside-postgresql<br />
</pre><br />
<br />
If zypper complains that it can't find a provider of "freeside" or "freeside-mason", it means that your repo is missing Perl module RPMs that the freeside or freeside-mason RPMs require. You can keep telling zypper to ignore that requirement, which will cause zypper to enumerate the missing modules.<br />
<br />
* Install Business::OnlinePayment gateways:<br />
<br />
<pre><br />
zypper install perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
* Optionally, check for troublesome RPMs:<br />
<br />
You may wish to spot check the version of a couple of RPMs at this point to detect problems now before the final stages of installation fail.<br />
<br />
For each of <code><nowiki>perl-DBI</nowiki></code> and <code><nowiki>perl-MailTools</nowiki></code>, do the following.<br />
<br />
<pre><br />
zypper search perl-MailTools<br />
</pre><br />
<br />
which should show the installed version, marked with an 'i' in the left column, as being the same as the one on the Freeside repository. If the installed version came from the SLES repository, see the section on troublesome RPMs.<br />
<br />
* Work down the final steps to bring up a Freeside installation:<br />
<br />
<pre><br />
su postgres -c 'createuser -P freeside'<br />
su freeside -c 'createdb -E sql_ascii freeside'<br />
su freeside -c 'freeside-setup -d example.com' <br />
su freeside -c 'for i in fs_queue fs_daily fs_selfservice ivan; do freeside-adduser -g 1 $i; done'<br />
su freeside -c '/usr/sbin/htpasswd2 /etc/freeside/htpasswd ivan'<br />
</pre><br />
<br />
A failure in freeside-setup may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
* Restart the web server<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
If the web server fails to start due to a problem in /etc/freeside/handler.pl, it may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
= Finalizing the installation =<br />
<br />
* Go to <code><nowiki>https://your.host.name/freeside</nowiki></code> and log in.<br />
<br />
* Proceed to the initial [[Freeside:1.7:Documentation:Administration | administration]] of your installation.<br />
<br />
* After doing the initial administration, do some cursory testing, including generating and viewing typeset invoices (to test pslatex).<br />
<br />
* Don't forget to prepare your installation for [[Freeside:1.7:Documentation:DisasterRecovery|Disaster Recovery]]<br />
<br />
= Updating the Installation =<br />
<br />
* Since the Freeside repository does not contain patch RPMs and zypper defaults to using patch RPMs, the installation can be updated with:<br />
<br />
<pre><br />
zypper update -t package<br />
</pre><br />
<br />
answer any questions about conflicts, and confirm the installation of the updated RPMs.<br />
<br />
* If there have been any schema changes, run <code><nowiki>/usr/bin/freeside-update</nowiki></code>.<br />
<br />
= Installing the Self-Service Interface =<br />
<br />
On a new SLES system, complete the steps up to and including the "zypper installation" above. (You can skip installing mod_perl and omit "perl" in the list of Apache modules to enable.)<br />
<br />
(Installing the self-service interface on the same system as the Freeside billing server is not recommended for security reasons. However, it is possible to install self-service by following these instructions after completing the billing server installation.)<br />
<br />
* Use zypper to add the Freeside Self-Service repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/x86_64<br />
</pre><br />
<br />
* Install Freeside Self-Service:<br />
<br />
<pre><br />
zypper install freeside-selfservice<br />
</pre><br />
<br />
This will install the core self-service Perl modules, the self-service CGI scripts, and an Apache configuration file that makes the self-service available at https://www.example.com/selfservice/selfservice.cgi. If you wish to configure Apache differently, either edit the configuration file after installation or install freeside-selfservice-cgi instead of freeside-selfservice to skip the configuration file installation.<br />
<br />
* Restart the Apache web server:<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
* On your billing server, check the value of SELFSERVICE_MACHINES in /etc/default/freeside or /etc/sysconfig/freeside, make sure the freeside user can SSH into each of the self-service machines, and start the freeside service. Look at the log file for the self-service daemon to ensure it's connecting correctly to the client. (Note that RPM-based self-service installations have the client daemon the billing server connects to located at /usr/sbin/freeside-selfservice-clientd, not under /usr/local/sbin. You may have to edit freeside-selfservice-server on your billing machine to match.)<br />
<br />
= Troublesome RPMs =<br />
<br />
You may have trouble getting yast2/zypper to install the newer versions of RPMs from the Freeside repository since libzypp considers build architecture to be more important than software version. This problem is more prevalent on i386 systems where it's easy to build an i386 RPM for which SLES has an older, i586, version. However, you may also see it where you build a noarch RPM to replace a SLES x86_64 RPM.<br />
<br />
If zypper refuses to install the newer version from the Freeside repository, the most likely problem is that libzypp prefers the architecture of the RPM on the SLES repository. You can confirm this by running (for perl-MailTools):<br />
<br />
<pre><br />
zypper -vv install perl-MailTools<br />
</pre><br />
<br />
The last couple of lines will show you which of the available RPMs zypper is selecting, and why.<br />
<br />
If you don't have time to fix your Freeside repository (i.e. to rebuild the RPM with the same or better BuildArch than that used for the equivalent SLES RPM), you can always download the RPMs manually from your repository source above, and install them with <code>rpm -Uvh filename.rpm</code>. The output of <code>zypper search perl-MailTools</code> gives you the base URL of the repository, the RPM name, version/release, and architecture, which you can piece together into the URL of the RPM:<br />
<br />
<pre><br />
wget <base_url>/<rpm_name>-<rpm_version/release>.<arch>.rpm<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4559Freeside:Documentation:MirroringRPMRepo2009-04-13T15:19:51Z<p>Rsiddall: /* Initial Installation of Freeside */ zypper has no -y switch: it's -n for non-interactive...</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingRPM|CentOS/RHEL]] or [[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -n update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -n install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -n install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation&diff=4558Freeside:1.7:Documentation2009-04-13T15:12:52Z<p>Rsiddall: Added a link to the instructions for mirroring a repository.</p>
<hr />
<div>= Installation and upgrades =<br />
<br />
== Backend Installation ==<br />
<br />
* [[Freeside:1.7:Documentation:Installation|New Installation]]<br />
* [[Freeside:1.7:Documentation:RT Installation|Integrated RT Installation]]<br />
* OS-specific installation guides (source)<br />
** [[Freeside:1.7:Documentation:InstallingOnDebian|Debian 4.0 "etch"]]<br />
** [[Freeside:1.7:Documentation:InstallingOnDebian5|Debian 5.0 "lenny"]]<br />
** [[Freeside:1.7:Documentation:InstallingOnCentOS4|CentOS 4.x (and Red Hat Enterprise Linux 4.x)]]<br />
** [[Freeside:1.7:Documentation:InstallingOnFreeBSD|FreeBSD]]<br />
* Experimental OS-specific installation guides (packages)<br />
** [[Freeside:1.7:Documentation:InstallingUsingAPT|Debian packages]]<br />
** [[Freeside:1.7:Documentation:InstallingUsingRPM|RPM-based install on RedHat, Fedora, CentOS]]<br />
** [[Freeside:1.7:Documentation:InstallingUsingYaST|RPM-based install on SuSE Linux Enterprise Server (SLES)]]<br />
<br />
== Signup and Self-service installation ==<br />
<br />
* [[Freeside:1.7:Documentation:Self-Service Installation|Signup/Self-service Installation]]<br />
<br />
== Distributor guides ==<br />
<br />
* [[Freeside:1.7:Documentation:CreatingRPMRepo|Creating your own repository with Freeside RPMs]]<br />
<br />
* [[Freeside:1.7:Documentation:MirroringRPMRepo|Creating and using a mirror of the Freeside Internet Services RPM repositories]]<br />
<br />
* [[Freeside:1.7:Documentation:RPMBuildSystem|Documentation on the RPM build system]]<br />
<br />
== Upgrading ==<br />
<br />
* [[Freeside:1.7:Documentation:Upgrading|Upgrading to 1.7]]<br />
* [[Freeside:1.7.3:Documentation:Upgrading|Upgrading to 1.7.3]]<br />
* [[Freeside:1.7.4:Documentation:Upgrading|Upgrading to 1.7.4]]<br />
* [[Freeside:1.7:Changelog|1.7 Changelog]]<br />
* [[Freeside:1.7.3:Changelog|1.7.3 Changelog]]<br />
* [[Freeside:1.7.4:Changelog|1.7.4 Changelog]]<br />
<br />
= User's Guide =<br />
<br />
* [[Freeside:1.7:Documentation:User|User's Guide]] (help wanted)<br />
* [http://www.sisd.com/~ivan/freeside-slides Training presentation slides]<br />
<br />
= Administrator's Guide =<br />
<br />
* [[Freeside:1.7:Documentation:Administration|Administrator's Guide]]<br />
* [[Freeside:1.7:Documentation:DisasterRecovery|Disaster Recovery]]<br />
* [[:Category:Freeside:1.7:Documentation:Template|Templates]] used and their fill in variables.<br />
<br />
= Developer's Guide =<br />
<br />
* [[Freeside:1.7:Documentation:Developer|Developer's Guide]]<br />
<br />
= Accounting Guide =<br />
<br />
*[[Freeside:1.7:Documentation:Accounting|Accounting Guide]]<br />
<br />
= Misc =<br />
<br />
* [[Freeside:Documentation:FAQ|Frequently Asked Questions]]<br />
* [[3rd_party_software|Third-party software]]<br />
<br />
<br />
{{ContextSensitiveHelp}}</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4557Freeside:Documentation:MirroringRPMRepo2009-04-13T15:10:13Z<p>Rsiddall: /* Using Your Mirror */ Link to full instructions for using a repository.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository ([[Freeside:1.7:Documentation:InstallingUsingRPM|CentOS/RHEL]] or [[Freeside:1.7:Documentation:InstallingUsingYaST|SuSE]]), but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -y update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -y install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -y install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4556Freeside:Documentation:MirroringRPMRepo2009-04-13T15:02:05Z<p>Rsiddall: /* Refreshing Your Mirror */ Inserted missing hyphen in self-service.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository, but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -y update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -y install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -y install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4555Freeside:Documentation:MirroringRPMRepo2009-04-13T14:46:43Z<p>Rsiddall: Forgot trailing slashes in commands to refresh the repo.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/selfservice/i386/<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository, but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -y update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -y install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -y install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4554Freeside:Documentation:MirroringRPMRepo2009-04-13T14:45:01Z<p>Rsiddall: </p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/selfservice/i386<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
(Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.)<br />
<br />
Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
The above commands can be put in a shell script and executed periodically via cron.<br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository, but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -y update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -y install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -y install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4553Freeside:Documentation:MirroringRPMRepo2009-04-13T14:26:28Z<p>Rsiddall: /* Initial Setup */ Removed an ~rsiddall rendered unnecessary by using --cut-dirs=1</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/selfservice/i386<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.<br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
We recommend putting the above <br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository, but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -y update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -y install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -y install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4552Freeside:Documentation:MirroringRPMRepo2009-04-12T15:16:47Z<p>Rsiddall: Added switch to remove the user folder from the downloaded files folder tree; added Apache configuration to make repository visible under SuSE.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*If using yum, copy down the signing keys and the yum repository definition file, and then fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo/~rsiddall<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
Allow From All<br />
Order Deny,Allow<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
wget --mirror --no-parent --no-host-directories --cut-dirs=1 http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/selfservice/i386<br />
</pre><br />
<br />
and if using yum:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.<br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
We recommend putting the above <br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository, but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
# Copy server cert (csr, crt, and key) to Apache SSL folders<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper -y update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper -y install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper -y install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4541Freeside:Documentation:MirroringRPMRepo2009-04-10T17:04:37Z<p>Rsiddall: </p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Copy down the signing keys and, if you're using yum, the yum repository definition file:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
*If using yum, fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo/~rsiddall<br />
<Directory /srv/www/freeside-repo><br />
Options +Indexes<br />
</Directory><br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/selfservice/i386<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.<br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
We recommend putting the above <br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository, but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:Documentation:MirroringRPMRepo&diff=4540Freeside:Documentation:MirroringRPMRepo2009-04-10T16:59:12Z<p>Rsiddall: First draft of instructions for mirroring the repository and using a local mirror.</p>
<hr />
<div>=Mirroring the Freeside RPM Repository=<br />
<br />
==Introduction==<br />
<br />
If you installed (or intend to install) Freeside from RPM, you may wish to mirror the Freeside RPM repository locally for a variety of reasons, including faster re-installation after a crash, faster testing when doing periodic disaster recovery tests, baselining the repository if you stage changes to your machines through local mirrors, guaranteeing availability of a repository for disaster recovery, you run modified Freeside RPMs but want to mirror all the prerequisite modules, etc.<br />
<br />
The complete repository tree is currently about 3GB in size and growing. We strongly recommend that you do not mirror the whole repository. Mirror only the branch(es) for the distribution(s) you use.<br />
<br />
===Freeside Repository Structure===<br />
<br />
The current repository structure is:<br />
<br />
<pre><br />
http://wavetail.420.am/~rsiddall - Base URL containing GPG keys and yum repos.d file<br />
repo/ - Base of RPM repositories<br />
centos/<br />
4/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
sles/<br />
10/<br />
freeside-1.7/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
freeside-1.9/<br />
stable/<br />
i386/<br />
x86_64/<br />
prerelease/<br />
i386/<br />
x86_64/<br />
testing/<br />
i386/<br />
x86_64/<br />
self-service/<br />
i386/<br />
x86_64/<br />
</pre><br />
<br />
The "testing" branches contain "daily" CVS builds (build-on-change) and may not actually have a complete set of prerequisite Perl modules.<br />
<br />
The "centos" branch should work on RHEL as well as CentOS and compatible operating systems.<br />
<br />
We currently build only for i386 and x86_64 architectures.<br />
<br />
Due to the way SuSE's libzypp treats RPM repositories, the self-service files are kept in a different branch from the billing server RPMs. This is not necessary on CentOS due to yum's better handling of RPMs.<br />
<br />
===Proxy Servers===<br />
<br />
The following assumes you are not accessing the internet through a proxy server, or that you are using a transparent proxy server that requires no special configuration for client programs. If this is not the case, you may need to add command line switches to route internet accesses through your proxy server and to authenticate yourself to the server.<br />
<br />
===Mirroring via Rsync===<br />
<br />
Freeside Internet Services does not currently make its RPM repository available for anonymous rsync. We may do so in future and will update these instructions if and when anonymous rsync becomes available.<br />
<br />
===Using curl Instead of wget===<br />
<br />
The instructions below use the readily available wget utility to fetch files from the web. Some administrators prefer to use curl. This is perfectly reasonable. To keep the instructions simple, details on using curl have been omitted.<br />
<br />
===Rate Limiting===<br />
<br />
We would greatly appreciate it if you would include <code>--limit-rate=20k</code> in the wget command line to limit the load on the Freeside repository server.<br />
<br />
==Instructions==<br />
<br />
With the exception of a couple of steps to create a folder and make it available via your web server, the steps for initial setup and refreshing the repository are identical. You could put all these steps in a shell script.<br />
<br />
===Initial Setup===<br />
<br />
The Freeside RPM repository is just a web server containing the RPMs and some metadata files. To mirror this, you would download the files into a folder and then make that folder available to your local client machines via a web server.<br />
<br />
To set up the mirror initially:<br />
<br />
*Decide which distributions, branches, and architectures you are going to mirror, for example <code>sles/10/freeside-1.7/testing/i386</code> or <code>centos/4/freeside-1.7</code>.<br />
<br />
*Create a folder somewhere on the machine that will act as your repository server (under /var/www or /srv/www, for example):<br />
<br />
<pre><br />
mkdir /srv/www/freeside-repo<br />
</pre><br />
<br />
*Copy down the repository from the Freeside web server:<br />
<br />
<pre><br />
cd /srv/www/freeside-repo<br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386/<br />
</pre><br />
<br />
The trailing slash is important. It prevents wget from downloading all repositories at the same level as the i386 folder.<br />
<br />
*If using SuSE, copy down the corresponding self-service server files if you want them:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386/<br />
</pre><br />
<br />
*Copy down the signing keys and, if you're using yum, the yum repository definition file:<br />
<br />
<pre><br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
*If using yum, fix up the URLs in the repository definition file so they point to your web server:<br />
<br />
<pre><br />
perl -pi -e 's|wavetail.420.am/~rsiddall|server.domain.tld/freeside-repo|g' freeside.repo<br />
</pre><br />
<br />
*Remove index.html files from the mirror:<br />
<br />
<pre><br />
find /srv/www/freeside-repo -name 'index.html*' -print -exec /bin/rm {} \;<br />
</pre><br />
<br />
*Make the folder available via the web server. For Apache, put a configuration snippet in a file (freeside-repo.conf) in /etc/httpd/conf.d or /etc/apache2/conf.d:<br />
<br />
<pre><br />
Alias /freeside-repo /srv/www/freeside-repo/~rsiddall<br />
</pre><br />
<br />
*Restart or reload your web server:<br />
<br />
<pre><br />
service apache2 reload<br />
</pre><br />
<br />
*Test the repository:<br />
<br />
**Load <code>http://server.domain.tld/freeside-repo</code> in your web browser.<br />
<br />
**Try doing an installation or update<br />
<br />
===Refreshing Your Mirror===<br />
<br />
To refresh the mirror, just repeat the steps to copy down the files:<br />
<br />
<pre><br />
cd /srv/www/repo<br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
wget --mirror --no-parent --no-host-directories http://wavetail.420.am/~rsiddall/repo/sles/10/freeside-1.7/testing/selfservice/i386<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/RPM-GPG-KEY-Freeside<br />
wget --mirror --no-parent --no-directories http://wavetail.420.am/~rsiddall/freeside.repo<br />
</pre><br />
<br />
Don't forget to fix up the URLs in the yum repository definition file if it is downloaded.<br />
<br />
The RPM signing keys and repository definition file will hardly ever change.<br />
<br />
We recommend putting the above <br />
<br />
===Using Your Mirror===<br />
<br />
Follow the instructions for using the Freeside Internet Services RPM repository, but substitute the URL of your repository.<br />
<br />
====Initial Installation of Freeside====<br />
<br />
<pre><br />
# Add the folder or web server containing SuSE to your installation sources<br />
yast2 inst_source<br />
# Enable SSL and Perl scripting for the HTTP server<br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
# Configure apache for SSL<br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
perl -pi -e 's/#ServerName www.example.com/ServerName `hostname`/g;' freeside-ssl.conf # Uncomment and correct ServerName<br />
perl -pi -e 's/#ServerAdmin root\@example.com/you\@domain.tld/g' freeside-ssl.conf # Uncomment and correct ServerAdmin, and any SSL file locations<br />
cd<br />
for ext in csr crt key; do cp -p server.${ext} /etc/apache2/ssl.${ext}; done<br />
# Install zypper<br />
yast2 --install zypper<br />
# Update the system<br />
zypper update<br />
# Install PostgreSQL (might need a client if database server is not on same box)<br />
zypper install postgresql-server<br />
# Installing Freeside itself<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper install freeside-postgresql freeside freeside-mason perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
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.<br />
<br />
====Switching Existing Clients to Your Repository====<br />
<br />
If you've previously installed Freeside (billing server and/or self-service) on a client machine and want to switch it to use your local repository, do the following:<br />
<br />
*For CentOS, etc., replace the existing freeside.repo file:<br />
<br />
<pre><br />
cd /etc/yum.repos.d<br />
mv freeside.repo freeside.repo.orig<br />
wget http://server.domain.tld/freeside-repo/freeside.repo<br />
</pre><br />
<br />
*For SuSE, change the installation sources via zypper or YaST2:<br />
<br />
<pre><br />
zypper service-list # Get number of source using wavetail.420.am, say '2'<br />
zypper service-delete 2<br />
zypper service-add http://server.domain.tld/freeside-repo/repo/sles/10/freeside-1.7/testing/i386<br />
zypper service-list # Make sure it's correct<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:InstallingUsingYaST&diff=4539Freeside:1.7:Documentation:InstallingUsingYaST2009-04-08T14:55:41Z<p>Rsiddall: /* Basic setup and Apache webserver */ Added note about proxy server.</p>
<hr />
<div>=Introduction=<br />
<br />
==Warnings!==<br />
<br />
The YaST installation of Freeside is experimental! The instructions below may be incomplete or incorrect and are subject to change. You should only attempt to use the YaST installation if you are prepared to work around omissions and inaccuracies, and can recover data in the event of a loss.<br />
<br />
==Information==<br />
<br />
YaST is the installer on the SuSE Linux distributions: Novell's SuSE Enterprise Linux Server (SLES) and OpenSuSE. The Freeside repository is a repomd, i.e. RPM-based, repository.<br />
<br />
Installing the YaST version of Freeside may not be a good idea if you plan to do development on Freeside as the RPMs may not include all the files supplied in the tarball.<br />
<br />
YaST tends to try to pull in a large set of conflicting RPMs, so any attempt to use YaST or zypper may result in you having to work through a slew of warnings and tell YaST not to pull in RPMs you didn't specify, or which yum would have concluded were not required.<br />
<br />
===Status===<br />
<br />
The YaST version of Freeside does not include Request Tracker at this time. The self-service interface conflicts with the main server installation and has been temporarily removed from the repository. The MySQL backend has not yet been tested. Only the 1.7 branch has been tested. The version and release of the YaST package is shown in the "Billing Main" page in Freeside.<br />
<br />
=Installation=<br />
<br />
== Basic setup and Apache webserver ==<br />
<br />
* Install SLES on your target machine.<br />
<br />
* SSH in as root.<br />
<br />
* If you are installing to a machine behind a proxy server, run <code>yast2</code> and select <code>Network Settings : Proxy</code> and enter the proxy details so that YaST can access external repositories. (You can also set the proxy settings from the command line using <code>yast2 proxy</code>.)<br />
<br />
* Run "yast2" and select "Software : Installation Source", or (faster) enter "yast2 inst_source", and make sure the SLES repo is present. If not click Add and add the URL of the repo.<br />
<br />
* Also add an update source if you're using a separate repo for updates.<br />
<br />
* At the command line enter:<br />
<br />
<pre><br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
</pre><br />
<br />
* Setup SSL. SLES does not ship with a working SSL configuration for Apache2. You'll need to configure a virtual host and configure SSL on that virtual host. First, scp the server certificate and key to /etc/apache2/ssl.{crt,key}, and copy any certificate authority bundles supplied by your certificate provider.<br />
<br />
Next, use the template in /etc/apache2/vhosts.d to create an SSL configuration file for use with Apache:<br />
<br />
<pre><br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # Uncomment and correct ServerName, ServerAdmin, and any SSL file locations<br />
</pre><br />
<br />
ServerName can be the same as the main host name of the SuSE machine.<br />
<br />
== Zypper setup == <br />
<br />
* Install the zypper catalog manager:<br />
<br />
<pre><br />
yast2 --install zypper<br />
</pre><br />
<br />
as zypper has a better CLI interface than YaST.<br />
<br />
* Use zypper to update the whole system?<br />
<br />
<pre><br />
zypper update<br />
</pre><br />
<br />
You might have to repeat this several times as updating zypper itself may result in more updates becoming available.<br />
<br />
== PostgreSQL setup ==<br />
<br />
* Use zypper to install postgresql-server if the database server is going to be running on the same machine as Freeside:<br />
<br />
<pre><br />
zypper install postgresql-server<br />
</pre><br />
<br />
* Set PostgreSQL to run on startup:<br />
<br />
<pre><br />
chkconfig --add postgresql<br />
</pre><br />
<br />
and start it now<br />
<br />
<pre><br />
service postgresql start<br />
</pre><br />
<br />
* If the database server is going to be running elsewhere, you probably still want the psql command-line client:<br />
<br />
<pre><br />
zypper install postgresql<br />
</pre><br />
<br />
== Freeside setup ==<br />
<br />
* Use zypper to add the Freeside repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/x86_64<br />
</pre><br />
<br />
* Install Freeside:<br />
<br />
<pre><br />
zypper install freeside-postgresql<br />
</pre><br />
<br />
If zypper complains that it can't find a provider of "freeside" or "freeside-mason", it means that your repo is missing Perl module RPMs that the freeside or freeside-mason RPMs require. You can keep telling zypper to ignore that requirement, which will cause zypper to enumerate the missing modules.<br />
<br />
* Install Business::OnlinePayment gateways:<br />
<br />
<pre><br />
zypper install perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
* Optionally, check for troublesome RPMs:<br />
<br />
You may wish to spot check the version of a couple of RPMs at this point to detect problems now before the final stages of installation fail.<br />
<br />
For each of <code><nowiki>perl-DBI</nowiki></code> and <code><nowiki>perl-MailTools</nowiki></code>, do the following.<br />
<br />
<pre><br />
zypper search perl-MailTools<br />
</pre><br />
<br />
which should show the installed version, marked with an 'i' in the left column, as being the same as the one on the Freeside repository. If the installed version came from the SLES repository, see the section on troublesome RPMs.<br />
<br />
* Work down the final steps to bring up a Freeside installation:<br />
<br />
<pre><br />
su postgres -c 'createuser -P freeside'<br />
su freeside -c 'createdb -E sql_ascii freeside'<br />
su freeside -c 'freeside-setup -d example.com' <br />
su freeside -c 'for i in fs_queue fs_daily fs_selfservice ivan; do freeside-adduser -g 1 $i; done'<br />
su freeside -c '/usr/sbin/htpasswd2 /etc/freeside/htpasswd ivan'<br />
</pre><br />
<br />
A failure in freeside-setup may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
* Restart the web server<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
If the web server fails to start due to a problem in /etc/freeside/handler.pl, it may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
= Finalizing the installation =<br />
<br />
* Go to <code><nowiki>https://your.host.name/freeside</nowiki></code> and log in.<br />
<br />
* Proceed to the initial [[Freeside:1.7:Documentation:Administration | administration]] of your installation.<br />
<br />
* After doing the initial administration, do some cursory testing, including generating and viewing typeset invoices (to test pslatex).<br />
<br />
* Don't forget to prepare your installation for [[Freeside:1.7:Documentation:DisasterRecovery|Disaster Recovery]]<br />
<br />
= Updating the Installation =<br />
<br />
* Since the Freeside repository does not contain patch RPMs and zypper defaults to using patch RPMs, the installation can be updated with:<br />
<br />
<pre><br />
zypper update -t package<br />
</pre><br />
<br />
answer any questions about conflicts, and confirm the installation of the updated RPMs.<br />
<br />
* If there have been any schema changes, run <code><nowiki>/usr/bin/freeside-update</nowiki></code>.<br />
<br />
= Installing the Self-Service Interface =<br />
<br />
On a new SLES system, complete the steps up to and including the "zypper installation" above. (You can skip installing mod_perl and omit "perl" in the list of Apache modules to enable.)<br />
<br />
(Installing the self-service interface on the same system as the Freeside billing server is not recommended for security reasons. However, it is possible to install self-service by following these instructions after completing the billing server installation.)<br />
<br />
* Use zypper to add the Freeside Self-Service repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/x86_64<br />
</pre><br />
<br />
* Install Freeside Self-Service:<br />
<br />
<pre><br />
zypper install freeside-selfservice<br />
</pre><br />
<br />
This will install the core self-service Perl modules, the self-service CGI scripts, and an Apache configuration file that makes the self-service available at https://www.example.com/selfservice/selfservice.cgi. If you wish to configure Apache differently, either edit the configuration file after installation or install freeside-selfservice-cgi to skip the configuration file installation.<br />
<br />
* Restart the Apache web server:<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
* On your billing server, check the value of SELFSERVICE_MACHINES in /etc/default/freeside or /etc/sysconfig/freeside and start the freeside service. Look at the log file for the self-service daemon to ensure it's connecting correctly to the client. (Note that RPM-based self-service installations have the client daemon the billing server connects to located at /usr/sbin/freeside-selfservice-clientd, not under /usr/local/sbin. You may have to edit freeside-selfservice-server on your billing machine to match.)<br />
<br />
= Troublesome RPMs =<br />
<br />
You may have trouble getting yast2/zypper to install the newer versions of RPMs from the Freeside repository since libzypp considers build architecture to be more important than software version. This problem is more prevalent on i386 systems where it's easy to build an i386 RPM for which SLES has an older, i586, version. However, you may also see it where you build a noarch RPM to replace a SLES x86_64 RPM.<br />
<br />
If zypper refuses to install the newer version from the Freeside repository, the most likely problem is that libzypp prefers the architecture of the RPM on the SLES repository. You can confirm this by running (for perl-MailTools):<br />
<br />
<pre><br />
zypper -vv install perl-MailTools<br />
</pre><br />
<br />
The last couple of lines will show you which of the available RPMs zypper is selecting, and why.<br />
<br />
If you don't have time to fix your Freeside repository (i.e. to rebuild the RPM with the same or better BuildArch than that used for the equivalent SLES RPM), you can always download the RPMs manually from your repository source above, and install them with <code>rpm -Uvh filename.rpm</code>. The output of <code>zypper search perl-MailTools</code> gives you the base URL of the repository, the RPM name, version/release, and architecture, which you can piece together into the URL of the RPM:<br />
<br />
<pre><br />
wget <base_url>/<rpm_name>-<rpm_version/release>.<arch>.rpm<br />
</pre></div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:InstallingUsingRPM&diff=4538Freeside:1.7:Documentation:InstallingUsingRPM2009-04-08T14:49:18Z<p>Rsiddall: /* Setup YUM */ Added note about proxy server.</p>
<hr />
<div>=Introduction=<br />
<br />
==Warning!==<br />
The RPM installation of Freeside is experimental! The instructions below may be incomplete or incorrect and are subject to change. You should only attempt to use the RPM installation if you are prepared to work around omissions and inaccuracies, and can recover data in the event of a loss.<br />
<br />
==Information==<br />
<br />
The currently available packages are for the i386 and x86_64 architectures. The packages are built on CentOS v4 and tested on CentOS and RHEL. Packagers for other distributions are welcome; see [[Freeside:1.7:Documentation:CreatingRPMRepo|creating RPM repositories]]. You can also read about our own [[Freeside:1.7:Documentation:RPMBuildSystem|RPM build system]].<br />
<br />
Installing the RPM version of Freeside may not be a good idea if you plan to do development on Freeside as the RPMs may not include all the files supplied in the tarball.<br />
<br />
===Status===<br />
<br />
The RPM version of Freeside does not include Request Tracker at this time. The self-service RPM has not been fully tested. Both PostgreSQL and MySQL back-end databases should work. The version and release of the RPM are shown in the "Billing Main" page in Freeside.<br />
<br />
=Installation=<br />
<br />
RPM installation can preferably be done with a tool such as YUM or APT (or up2date on RHEL). As a last resort, you can install with RPM directly.<br />
<br />
==Installing using yum==<br />
=== Setup YUM ===<br />
* If you are installing to a machine behind a proxy server, you may need to set up the proxy directives in /etc/yum.conf for yum to work correctly.<br />
* Make sure the yum priorities plugin is installed by running <code>yum install yum-plugin-priorities</code>. <!-- for CentOS v4, or <code>yum install yum-priorities</code> for CentOS v5.--><br />
* Make sure the yum priorities plugin is enabled by editing the <code>/etc/yum/pluginconf.d/priorities.conf</code> file, and ensuring that it contains the following lines: <br />
[main]<br />
enabled=1<br />
* Edit <code>/etc/yum.repso.d/CentOS-Base.repo</code>, adding the following lines to the <nowiki>[base] and [update] sections, and adding the [centosplus] section:</nowiki><br />
<pre>[base] <br />
exclude=php* httpd* postgres* MySQL* mysql* perl perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[update]<br />
exclude=php* httpd* postgres* MySQL* mysql* perl perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-suidperl unixODBC* mod_auth_mysql mod_auth_pgsql mod_perl mod_perl-devel mod_ssl<br />
priority=1<br />
<br />
[centosplus]<br />
enable=1<br />
priority=2<br />
</pre><br />
* Select a repository containing the required RPMs, and add the repository to a new file in your /etc/yum.repo.d directory or directly to the /etc/yum.conf file. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
<br />
==== 1.7.3 stable repository ====<br />
<br />
(not yet available)<br />
<br />
==== 1_7_BRANCH testing repository ====<br />
CentOS/RHEL v4 i386: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-4<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/i386<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
CentOS/RHEL v4 x86_64: <pre>#Packages used in Freeside<br />
[freeside]<br />
name=Freeside-4<br />
baseurl=http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/x86_64<br />
gpgcheck=1<br />
enabled=1<br />
priority=2<br />
gpgkey=http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside</pre><br />
<br />
=== Install ===<br />
<br />
* Install the required components by issuing the commands:<br />
<pre>yum install httpd mod_perl mod_ssl perl postgresql-server<br />
yum install freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes:<br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database.<br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use.<br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=== Troubleshooting ===<br />
<br />
* If you are using a repository that is normally disabled, use <code>yum --enablerepo=Freeside-4 install ...</code> where ''Freeside-4'' is the name of the repository.<br />
* If you get an error such as:<br />
<pre><br />
Transaction Check Error: file /usr/share/man/man3/File::Temp.3pm.gz from install of perl-File-Temp-0.18-1 conflicts with file from package perl-5.8.8-4.el4s1<br />
</pre><br />
then you're using an operating system with a badly packaged Perl. You will have to force the installation of the RPM which conflicts with the Perl, using something like:<br />
<pre><br />
rpm -Uvh --force /var/cache/yum/freeside/packages/perl-File-Temp-0.18-1.x86_64.rpm<br />
</pre><br />
This installs the conflicting RPM from yum's cache for the "freeside" repository.<br />
You can then retry installing from yum.<br />
<br />
==Installing using up2date==<br />
<br />
Mainly for vanilla RHEL (tested on 4.5, 4.7); if you are running CentOS, the [[#Installing_using_yum|yum]] or [[#Installing_using_APT|apt-get]] instructions may be preferable.<br />
<br />
===Setup up2date===<br />
* Select a repository containing the required RPMs and add the repository to your /etc/sysconfig/rhn/sources file. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
* Import GPG keys:<br />
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4<br />
rpm --import http://www.freeside.biz/~rsiddall/RPM-GPG-KEY-Freeside<br />
<br />
==== 1.7.3 stable repository ====<br />
(not yet available)<br />
<br />
==== 1_7_BRANCH testing repository ====<br />
RHEL v4 i386: <pre>yum centosplus http://mirror.centos.org/centos/4/centosplus/i386/<br />
yum freeside http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/i386</pre><br />
<br />
RHEL v4 x86_64: <pre>yum centosplus http://mirror.centos.org/centos/4/centosplus/x86_64/<br />
yum freeside http://www.freeside.biz/~rsiddall/repo/centos/4/freeside-1.7/testing/x86_64</pre><br />
<br />
=== Install ===<br />
<br />
* Install the required components by issuing the commands:<br />
<pre>up2date httpd mod_perl mod_ssl perl postgresql-server tetex-latex perl-Digest-SHA1 perl-XML-Parser<br />
up2date perl-File-Temp #this will fail, that's okay for now<br />
rpm -Uvh --force /var/spool/up2date/perl-File-Temp-0.18-1.x86_64.rpm #to force File::Temp 0.18 installation, for now<br />
up2date freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes:<br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database.<br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use.<br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=== Troubleshooting ===<br />
<br />
* Does up2date show a "freeside" channel when doing <code>up2date --show-channels</code>, but won't install packages from that repository? Make sure <code>/etc/sysconfig/rhn/up2date</code> has a line designating a blank proxy:<br />
httpProxy=<br />
<br />
==Installing using APT==<br />
===Setup APT===<br />
Select a repository containing the required RPMs and add the repository to your /etc/apt.conf file.. If no such repository exists, you can [[Freeside:1.7:Documentation:CreatingRPMRepo|create your own]].<br />
====1.7.3 stable repository ====<br />
(not yet available)<br />
====1_7_BRANCH testing repository====<br />
(not yet available)<br />
<br />
===Install===<br />
* Install the required components by issuing the command:<br />
<pre>apt-get install freeside freeside-mason freeside-postgresql perl-Business-OnlinePayment-AuthorizeNet</pre><br />
with these changes: <br />
* Replace posgresql with mysql if you wish to use MySQL instead of PostgreSQL for the main Freeside database. <br />
* Replace AuthorizeNet with the name of the Business::OnlinePaymet module for the credit card gateway you wish to use. <br />
* Add the RPM name of any additional Business::OnlinePayment gateways you wish to install.<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
==Installation using RPM==<br />
Installation is much easier if you have a repository that works with a tool such as [[#Installing_using_yum|yum]], [[#Installing_using_APT|apt-get]] or [[#Installing_using_up2date|up2date]]. If you only have rpm and wish to use that, enter:<br />
<br />
<pre><br />
rpm -Uvh --test freeside-1.7.3-1.noarch.rpm \<br />
freeside-mason-1.7.3-1.noarch.rpm \<br />
freeside-postgresql-1.7.3-1.noarch.rpm \<br />
perl-Business-OnlinePayment-AuthorizeNet-3.17-1.i386.rpm<br />
</pre><br />
Where:<br />
* 1.7.3-1 is the version of Freeside and the release of the RPM. Change this if necessary.<br />
* postgresql is the database you wish to use as the Freeside back-end. Replace freeside-postgresql with freeside-mysql if you wish to use MySQL. See the main installation document for which databases are supported.<br />
* Replace AuthorizeNet with the name of the credit card processor you wish to use for real-time transactions. Also replace 3.17-1.i386 with the current version, release, and architecture of the corresponding Business::OnlinePayment RPM.<br />
The command should result in some warnings about unsatisfied dependencies. Find the corresponding RPMs and add them to the list on the command line. Keep doing this until the command results in no warnings, then issue the command one last time without the --test to actually install all the RPMs.<br />
<br />
At this point all the required components should be installed and the freeside user account created. You can now [[#Finalizing the installation|complete the installation]].<br />
<br />
=Finalizing the installation=<br />
<br />
* Start the database:<br />
with PostgreSQL<br />
<br />
chown -R postgres:postgres /var/lib/pgsql<br />
service postgresql start<br />
<br />
or with MySQL<br />
<br />
service mysqld start<br />
<br />
* Allow the freeside user full access to the freeside database. <br />
with PostgreSQL<br />
<pre><br />
$ su - postgres<br />
$ createuser -P freeside<br />
Enter password for user "freeside": <br />
Enter it again: <br />
Shall the new role be a superuser? (y/n) n<br />
Shall the new role be allowed to create databases? (y/n) y<br />
Shall the new role be allowed to create more new roles? (y/n) n<br />
CREATE ROLE<br />
</pre><br />
or with MySQL:<br />
<pre><br />
$ mysqladmin -u root password 'set_a_root_database_password'<br />
$ mysql -u root -p<br />
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY 'set_a_freeside_database_password';<br />
</pre><br />
<br />
* Edit <code>/etc/freeside/secrets</code> and replace the third line (currently blank) with the password you entered in the last step.<br />
<br />
* Add the freeside database to your database engine: <br />
with Postgres: <br />
<pre><br />
$ su freeside<br />
$ createdb -E sql_ascii freeside<br />
</pre><br />
or with MySQL: <br />
<pre><br />
$ mysqladmin -u freeside -p create freeside <br />
</pre><br />
<br />
* As the freeside UNIX user, run <code>freeside-setup -d your.domain.name</code> to create the database tables and initial data.<br />
<pre><br />
$ su freeside<br />
$ freeside-setup -d example.com<br />
</pre><br />
<br />
* Create the Freeside system users: <br />
<pre><br />
$ su freeside<br />
$ freeside-adduser -g 1 fs_queue<br />
$ freeside-adduser -g 1 fs_daily<br />
$ freeside-adduser -g 1 fs_selfservice<br />
</pre><br />
<br />
* Create one or more Freeside users (your internal sales/tech folks, not customer accounts):<br />
<pre><br />
$ su freeside<br />
$ freeside-adduser -g 1 username<br />
$ htpasswd /etc/freeside/htpasswd username<br />
Password: <br />
</pre><br />
Additional users can be added using the same command or from the web interface.<br />
<br />
* <code>service freeside start</code><br />
<br />
* <code>service httpd restart</code><br />
<br />
* Log into the web interface using the username and password you entered above.<br />
<br />
* Now proceed to the initial [[Freeside:1.7:Documentation:Administration|administration]] of your installation.<br />
<br />
=Upgrading=<br />
<br />
==Introduction==<br />
If you have an existing Freeside installation that was installed from the tarball, following the instructions for installing or upgrading from RPM&nbsp;'''''may''''' result in an operational system where the RPMs have overwritten most or all of the files installed from the tarball or CPAN.<br />
<br />
==Upgrading==<br />
Upgrading can be done with a tool such as YUM or APT (or up2date on RHEL), preferably, or as a last resort, with RPM directly.<br />
<br />
===Upgrading using a repository===<br />
If you installed the RPM version of Freeside from a repository, and a new version is available on the repository, then you can install the new files on your system using the package manager:<br />
<pre>yum update</pre><br />
or:<br />
<pre>apt-get update</pre><br />
To avoid unplanned upgrades, you may wish to mark the repository containing Freeside as disabled, or remove it from your yum or apt configuration files.<br />
===Upgrading using RPM===<br />
When there's a new version of Freeside available as RPM, just download the new RPMs and upgrade them:<pre><br />
rpm -Uvh --test freeside-1.7.3-1.noarch.rpm freeside-mason-1.7.3-1.noarch.rpm freeside-postgresql-1.7.3-1.noarch.rpm<br />
</pre><br />
<br />
==Finalizing the upgrade==<br />
* As the freeside UNIX user, run <code>freeside-upgrade username</code>, passing the username of an internal Freeside user.<br />
* If freeside-upgrade hangs, try stopping Apache, all Freeside processes, and anything else connected to your database, especially on older PostgreSQL versions.<br />
* Restart Apache and Freeside:<br />
/etc/init.d/httpd restart<br />
/etc/init.d/freeside restart<br />
* You may want to check your ACLs under Configuration->Employee->View/Edit employee groups and grant some of the new rights to one or more groups.</div>Rsiddallhttp://www.freeside.biz/mediawiki/index.php?title=Freeside:1.7:Documentation:InstallingUsingYaST&diff=4401Freeside:1.7:Documentation:InstallingUsingYaST2009-01-18T17:58:43Z<p>Rsiddall: Notes on starting self-service</p>
<hr />
<div>=Introduction=<br />
<br />
==Warnings!==<br />
<br />
The YaST installation of Freeside is experimental! The instructions below may be incomplete or incorrect and are subject to change. You should only attempt to use the YaST installation if you are prepared to work around omissions and inaccuracies, and can recover data in the event of a loss.<br />
<br />
==Information==<br />
<br />
YaST is the installer on the SuSE Linux distributions: Novell's SuSE Enterprise Linux Server (SLES) and OpenSuSE. The Freeside repository is a repomd, i.e. RPM-based, repository.<br />
<br />
Installing the YaST version of Freeside may not be a good idea if you plan to do development on Freeside as the RPMs may not include all the files supplied in the tarball.<br />
<br />
YaST tends to try to pull in a large set of conflicting RPMs, so any attempt to use YaST or zypper may result in you having to work through a slew of warnings and tell YaST not to pull in RPMs you didn't specify, or which yum would have concluded were not required.<br />
<br />
===Status===<br />
<br />
The YaST version of Freeside does not include Request Tracker at this time. The self-service interface conflicts with the main server installation and has been temporarily removed from the repository. The MySQL backend has not yet been tested. Only the 1.7 branch has been tested. The version and release of the YaST package is shown in the "Billing Main" page in Freeside.<br />
<br />
=Installation=<br />
<br />
== Basic setup and Apache webserver ==<br />
<br />
* Install SLES on your target machine.<br />
<br />
* SSH in as root.<br />
<br />
* Run "yast2" and select "Software : Installation Source", or (faster) enter "yast2 inst_source", and make sure the SLES repo is present. If not click Add and add the URL of the repo.<br />
<br />
* Also add an update source if you're using a separate repo for updates.<br />
<br />
* At the command line enter:<br />
<br />
<pre><br />
yast2 --install apache2-mod_perl<br />
yast2 http-server modules enable=ssl,perl<br />
</pre><br />
<br />
* Setup SSL. SLES does not ship with a working SSL configuration for Apache2. You'll need to configure a virtual host and configure SSL on that virtual host. First, scp the server certificate and key to /etc/apache2/ssl.{crt,key}, and copy any certificate authority bundles supplied by your certificate provider.<br />
<br />
Next, use the template in /etc/apache2/vhosts.d to create an SSL configuration file for use with Apache:<br />
<br />
<pre><br />
cd /etc/apache2/vhosts.d<br />
cp -p vhost-ssl.template freeside-ssl.conf<br />
vi freeside-ssl.conf # Uncomment and correct ServerName, ServerAdmin, and any SSL file locations<br />
</pre><br />
<br />
ServerName can be the same as the main host name of the SuSE machine.<br />
<br />
== Zypper setup == <br />
<br />
* Install the zypper catalog manager:<br />
<br />
<pre><br />
yast2 --install zypper<br />
</pre><br />
<br />
as zypper has a better CLI interface than YaST.<br />
<br />
* Use zypper to update the whole system?<br />
<br />
<pre><br />
zypper update<br />
</pre><br />
<br />
You might have to repeat this several times as updating zypper itself may result in more updates becoming available.<br />
<br />
== PostgreSQL setup ==<br />
<br />
* Use zypper to install postgresql-server if the database server is going to be running on the same machine as Freeside:<br />
<br />
<pre><br />
zypper install postgresql-server<br />
</pre><br />
<br />
* Set PostgreSQL to run on startup:<br />
<br />
<pre><br />
chkconfig --add postgresql<br />
</pre><br />
<br />
and start it now<br />
<br />
<pre><br />
service postgresql start<br />
</pre><br />
<br />
* If the database server is going to be running elsewhere, you probably still want the psql command-line client:<br />
<br />
<pre><br />
zypper install postgresql<br />
</pre><br />
<br />
== Freeside setup ==<br />
<br />
* Use zypper to add the Freeside repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/x86_64<br />
</pre><br />
<br />
* Install Freeside:<br />
<br />
<pre><br />
zypper install freeside-postgresql<br />
</pre><br />
<br />
If zypper complains that it can't find a provider of "freeside" or "freeside-mason", it means that your repo is missing Perl module RPMs that the freeside or freeside-mason RPMs require. You can keep telling zypper to ignore that requirement, which will cause zypper to enumerate the missing modules.<br />
<br />
* Install Business::OnlinePayment gateways:<br />
<br />
<pre><br />
zypper install perl-Business-OnlinePayment-AuthorizeNet<br />
</pre><br />
<br />
* Optionally, check for troublesome RPMs:<br />
<br />
You may wish to spot check the version of a couple of RPMs at this point to detect problems now before the final stages of installation fail.<br />
<br />
For each of <code><nowiki>perl-DBI</nowiki></code> and <code><nowiki>perl-MailTools</nowiki></code>, do the following.<br />
<br />
<pre><br />
zypper search perl-MailTools<br />
</pre><br />
<br />
which should show the installed version, marked with an 'i' in the left column, as being the same as the one on the Freeside repository. If the installed version came from the SLES repository, see the section on troublesome RPMs.<br />
<br />
* Work down the final steps to bring up a Freeside installation:<br />
<br />
<pre><br />
su postgres -c 'createuser -P freeside'<br />
su freeside -c 'createdb -E sql_ascii freeside'<br />
su freeside -c 'freeside-setup -d example.com' <br />
su freeside -c 'for i in fs_queue fs_daily fs_selfservice ivan; do freeside-adduser -g 1 $i; done'<br />
su freeside -c '/usr/sbin/htpasswd2 /etc/freeside/htpasswd ivan'<br />
</pre><br />
<br />
A failure in freeside-setup may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
* Restart the web server<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
If the web server fails to start due to a problem in /etc/freeside/handler.pl, it may indicate a problem with your Freeside repository. See the section on troublesome RPMs.<br />
<br />
= Finalizing the installation =<br />
<br />
* Go to <code><nowiki>https://your.host.name/freeside</nowiki></code> and log in.<br />
<br />
* Proceed to the initial [[Freeside:1.7:Documentation:Administration | administration]] of your installation.<br />
<br />
* After doing the initial administration, do some cursory testing, including generating and viewing typeset invoices (to test pslatex).<br />
<br />
* Don't forget to prepare your installation for [[Freeside:1.7:Documentation:DisasterRecovery|Disaster Recovery]]<br />
<br />
= Updating the Installation =<br />
<br />
* Since the Freeside repository does not contain patch RPMs and zypper defaults to using patch RPMs, the installation can be updated with:<br />
<br />
<pre><br />
zypper update -t package<br />
</pre><br />
<br />
answer any questions about conflicts, and confirm the installation of the updated RPMs.<br />
<br />
* If there have been any schema changes, run <code><nowiki>/usr/bin/freeside-update</nowiki></code>.<br />
<br />
= Installing the Self-Service Interface =<br />
<br />
On a new SLES system, complete the steps up to and including the "zypper installation" above. (You can skip installing mod_perl and omit "perl" in the list of Apache modules to enable.)<br />
<br />
(Installing the self-service interface on the same system as the Freeside billing server is not recommended for security reasons. However, it is possible to install self-service by following these instructions after completing the billing server installation.)<br />
<br />
* Use zypper to add the Freeside Self-Service repo:<br />
<br />
=== 1.7.3 Stable repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/stable/self-service/x86_64<br />
</pre><br />
<br />
=== 1_7_BRANCH testing repository ===<br />
<br />
i386 (32-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/i386<br />
</pre><br />
<br />
x86_64 (64-bit):<br />
<pre><br />
zypper service-add http://freeside.biz/~rsiddall/repo/sles/10/freeside-1.7/testing/self-service/x86_64<br />
</pre><br />
<br />
* Install Freeside Self-Service:<br />
<br />
<pre><br />
zypper install freeside-selfservice<br />
</pre><br />
<br />
This will install the core self-service Perl modules, the self-service CGI scripts, and an Apache configuration file that makes the self-service available at https://www.example.com/selfservice/selfservice.cgi. If you wish to configure Apache differently, either edit the configuration file after installation or install freeside-selfservice-cgi to skip the configuration file installation.<br />
<br />
* Restart the Apache web server:<br />
<br />
<pre><br />
service apache2 restart<br />
</pre><br />
<br />
* On your billing server, check the value of SELFSERVICE_MACHINES in /etc/default/freeside or /etc/sysconfig/freeside and start the freeside service. Look at the log file for the self-service daemon to ensure it's connecting correctly to the client. (Note that RPM-based self-service installations have the client daemon the billing server connects to located at /usr/sbin/freeside-selfservice-clientd, not under /usr/local/sbin. You may have to edit freeside-selfservice-server on your billing machine to match.)<br />
<br />
= Troublesome RPMs =<br />
<br />
You may have trouble getting yast2/zypper to install the newer versions of RPMs from the Freeside repository since libzypp considers build architecture to be more important than software version. This problem is more prevalent on i386 systems where it's easy to build an i386 RPM for which SLES has an older, i586, version. However, you may also see it where you build a noarch RPM to replace a SLES x86_64 RPM.<br />
<br />
If zypper refuses to install the newer version from the Freeside repository, the most likely problem is that libzypp prefers the architecture of the RPM on the SLES repository. You can confirm this by running (for perl-MailTools):<br />
<br />
<pre><br />
zypper -vv install perl-MailTools<br />
</pre><br />
<br />
The last couple of lines will show you which of the available RPMs zypper is selecting, and why.<br />
<br />
If you don't have time to fix your Freeside repository (i.e. to rebuild the RPM with the same or better BuildArch than that used for the equivalent SLES RPM), you can always download the RPMs manually from your repository source above, and install them with <code>rpm -Uvh filename.rpm</code>. The output of <code>zypper search perl-MailTools</code> gives you the base URL of the repository, the RPM name, version/release, and architecture, which you can piece together into the URL of the RPM:<br />
<br />
<pre><br />
wget <base_url>/<rpm_name>-<rpm_version/release>.<arch>.rpm<br />
</pre></div>Rsiddall