diff options
author | ivan <ivan> | 2001-10-30 11:47:54 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-10-30 11:47:54 +0000 |
commit | edda09a317f5dfef05fb8906f28531ec6f4b0927 (patch) | |
tree | 7a86bba24fe02d9b7e2862713479020736fae89a | |
parent | 399377be683d60fd80690504103b809885b27903 (diff) |
whew more install docs and automation
-rw-r--r-- | FS/bin/freeside-adduser | 6 | ||||
-rw-r--r-- | Makefile | 16 | ||||
-rwxr-xr-x | httemplate/docs/admin.html | 13 | ||||
-rw-r--r-- | httemplate/docs/config.html | 5 | ||||
-rw-r--r-- | httemplate/docs/index.html | 2 | ||||
-rw-r--r-- | httemplate/docs/install.html | 57 |
6 files changed, 62 insertions, 37 deletions
diff --git a/FS/bin/freeside-adduser b/FS/bin/freeside-adduser index 4517a83fa..e66b0d012 100644 --- a/FS/bin/freeside-adduser +++ b/FS/bin/freeside-adduser @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: freeside-adduser,v 1.1 2001-10-30 10:20:32 ivan Exp $ +# $Id: freeside-adduser,v 1.2 2001-10-30 11:47:54 ivan Exp $ use strict; use vars qw($opt_h $opt_c); @@ -33,9 +33,9 @@ freeside-adduser - Command line interface to add (freeside) users. =head1 SYNOPSIS - freeside-adduser [ -h htpasswd_file [ -c ] ] username + freeside-adduser [ -h htpasswd_file [ -c ] ] secretfile username -=head DESCRIPTION +=head1 DESCRIPTION Adds a user to the Freeside billing system. This is for adding users (internal sales/tech folks) to the web interface, not for adding customer accounts. @@ -1,15 +1,11 @@ #!/usr/bin/make -#Pg DATASOURCE = DBI:Pg:host=localhost;dbname=freeside +#DATASOURCE=DBI:mysql:freeside #pgsql on some systems; check /etc/passwd -DB_ADMIN_USER = postgres -DB_ADMIN_PASSWORD= -#mysql -#DATASOURCE=DBI:mysql:freeside -#DB_ADMIN_USER=mysql -#DB_ADMIN_PASSWORD= +DB_USER = freeside +DB_PASSWORD= TEMPLATE = asp #mason's a bit dodgy stil @@ -57,7 +53,7 @@ perl-modules: install-perl-modules: perl-modules cd FS; \ - make install + make install UNINST=1 install: install-perl-modules install-docs @@ -65,12 +61,14 @@ deploy: install /etc/init.d/apache restart create-database: - perl -e 'use DBIx::DataSource qw( create_database ); create_database( \'${DATASOURCE}\', \'${DB_ADMIN_USER}\', \'${DB_ADMIN_PASSWORD}\' ) or die $DBIx::DataSource::errstr;' + perl -e 'use DBIx::DataSource qw( create_database ); create_database( \'${DATASOURCE}\', \'${DB_USER}\', \'${DB_PASSWORD}\' ) or die $DBIx::DataSource::errstr;' create-config: install-perl-modules [ -d ${FREESIDE_CONF} ] || mkdir ${FREESIDE_CONF} chown freeside ${FREESIDE_CONF} + echo -e "${DATASOURCE}\n${DB_USER}\n${DB_PASSWORD}" >${FREESIDE_CONF}/secrets + [ -d "${FREESIDE_CONF}/conf.${DATASOURCE}" ] \ || mkdir "${FREESIDE_CONF}/conf.${DATASOURCE}" chown freeside "${FREESIDE_CONF/conf.${DATASOURCE}" diff --git a/httemplate/docs/admin.html b/httemplate/docs/admin.html index f137188f3..1dab439e1 100755 --- a/httemplate/docs/admin.html +++ b/httemplate/docs/admin.html @@ -10,13 +10,12 @@ /home/httpd/html/freeside, and your web browser's DocumentRoot is /home/httpd/html, open https://your_host/freeside/. Replace "your_host" with the name or network address of your web server. - - <li>Once in the Freeside web interface, you must first create a - service definition. An example of a service definition would be a dial-up - account or a domain. For starters, it is necessary to create a domain - definition. Click on <u>View/Edit service definitions</u> and - <u>Add a new service definition</u> with <i>Table</i> <b>svc_domain</b> - (and no modifiers). + <li>Select <u>Configuration</u> from the main menu and update your configuration values. + <li>Next you must create a service definition. An example of a service + definition would be a dial-up account or a domain. For starters, it is + necessary to create a domain definition. Click on <u>View/Edit service + definitions</u> and <u>Add a new service definition</u> with <i>Table</i> + <b>svc_domain</b> (and no modifiers). <li>Now that you have created your first service, you must create a package including this service which you can sell to customers. Zero, one, or many diff --git a/httemplate/docs/config.html b/httemplate/docs/config.html index 656723781..9caf3bb3a 100644 --- a/httemplate/docs/config.html +++ b/httemplate/docs/config.html @@ -3,6 +3,7 @@ </head> <body> <h1>Configuration files</h1> +<font size="+1" color="#ff0000">Configuration is now done by the top-level Makefile and web interface. The instructions below are no longer necessary.</font> <ul> <li>Create the <b>/usr/local/etc/freeside</b> directory to hold your configuration. <li>Setting up <a href="http://www.apache.org/docs/misc/FAQ.html#user-authentication">Apache user authetication</a> is mandatory. @@ -18,9 +19,9 @@ admin secretfile john secretfile sam secretfile </pre> - <li>Next, the filename(s) referenced in <b>/usr/local/etc/freeside/mapsecrets</b> file should be created in the <b>/usr/local/etc/freeside/</b> directory. Each file contains three lines: <a href="http://search.cpan.org/doc/TIMB/DBI-1.15/DBI.pm">DBI data source</a> (for example, + <li>Next, the filename(s) referenced in <b>/usr/local/etc/freeside/mapsecrets</b> file should be created in the <b>/usr/local/etc/freeside/</b> directory. Each file contains three lines: <a href="http://search.cpan.org/doc/TIMB/DBI-1.20/DBI.pm">DBI data source</a> (for example, <tt>DBI:mysql:freeside</tt> or <tt>DBI:Pg:host=localhost;dbname=freeside</tt>), database username, and database password. - These files should not be world readable. See the <a href="http://search.cpan.org/doc/TIMB/DBI-1.15/DBI.pm">DBI manpage</a> and the <a href="http://search.cpan.org/search?mode=module&query=DBD">manpage for your DBD</a> for the exact syntax of a DBI data source. In a normal installation such as the example above, a single file <b>/usr/local/etc/freeside/secretfile</b> would be created - for example: + These files should not be world readable. See the <a href="http://search.cpan.org/doc/TIMB/DBI-1.20/DBI.pm">DBI manpage</a> and the <a href="http://search.cpan.org/search?mode=module&query=DBD">manpage for your DBD</a> for the exact syntax of a DBI data source. In a normal installation such as the example above, a single file <b>/usr/local/etc/freeside/secretfile</b> would be created - for example: <pre> DBI:Pg:host=localhost;dbname=freeside dbusername diff --git a/httemplate/docs/index.html b/httemplate/docs/index.html index 2d6bfe786..932df0549 100644 --- a/httemplate/docs/index.html +++ b/httemplate/docs/index.html @@ -14,7 +14,9 @@ <li><a href="upgrade6.html">Upgrading from 1.2.3 to 1.3.0</a> <li><a href="upgrade7.html">Upgrading from 1.3.0 to 1.3.1</a> <li><a href="upgrade8.html">Upgrading from 1.3.1 to 1.4.0</a> +<!-- <li><a href="config.html">Configuration files</a> +!--> <li><a href="admin.html">Administration</a> <!-- <li><a href="../index.html#admin">Administration</a> diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 3a14fa779..f2db59f88 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -51,20 +51,35 @@ Install the Freeside distribution: <li>Add the user `freeside' to your system. <li>Allow the freeside user full access to the freeside database. <ul> - <li> with <a href="http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#User_Account_Management">MySQL</a>:<pre>$ mysqladmin -u root password '<i>set_a_root_database_password</i>' + <li> with <a href="http://www.postgresql.org/users-lounge/docs/7.1/postgres/user-manag.html#DATABASE-USERS">PostgreSQL</a>: + <pre> +$ su freeside +$ createuser -P freeside</pre> + <li> with <a href="http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#User_Account_Management">MySQL</a>: + <pre> +$ mysqladmin -u root password '<i>set_a_root_database_password</i>' $ mysql -u root -p mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY '<i>set_a_freeside_database_password</i>';</pre> - <li> with <a href="http://www.postgresql.org/users-lounge/docs/7.1/postgres/user-manag.html#DATABASE-USERS">PostgreSQL</a> </ul> - <li>Add the freeside database to your database engine. (with <a href="http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#CREATE_DATABASE">MySQL</a>) (with <a href="http://www.postgresql.org/users-lounge/docs/7.1/postgres/managing-databases.html#MANAGE-AG-CREATEDB">PostgreSQL</a>) <li>Unpack the tarball: <pre>gunzip -c fs-x.y.z.tar.gz | tar xvf -</pre> + <li>Edit the top-level Makefile: + <ul> + <li>Set <tt>DATASOURCE</tt> to your <a href="http://search.cpan.org/doc/TIMB/DBI-1.20/DBI.pm">DBI data source</a>, for example, <tt>DBI:Pg:host=localhost;dbname=freeside</tt> for PostgresSQL or <tt>DBI:mysql:freeside</tt> for MySQL. See the <a href="http://search.cpan.org/doc/TIMB/DBI-1.20/DBI.pm">DBI manpage</a> and the <a href="http://search.cpan.org/search?mode=module&query=DBD">manpage for your DBD</a> for the exact syntax of a DBI data source. + <li>Set <tt>DB_ADMIN_PASSWORD</tt> to the freeside database user's password. + </ul> + <li>Add the freeside database to your database engine: + <pre> +$ su +# make create-database</pre> <li>Build and install the Perl libraries: <pre> -$ cd FS/ -$ perl Makefile.PL -$ make +$ make perl-modules +$ su +# make install-perl-modules</pre> + <li>Create the necessary configuration files:<pre> $ su -# make install UNINST=1</pre> +# make create-config +</pre> <li>You should run a separate iteration of Apache[-SSL] with mod_perl enabled as the freeside user. </ul> <table> @@ -113,22 +128,32 @@ require "/usr/local/apache/conf/handler.pl"; </tr> </table> <ul> -<li>Restrict access to this web interface. (with <a href="http://httpd.apache.org/docs/misc/FAQ.html#user-authentication">Apache</a>). For example, to configure user authentication with flat files: -<font size="-1"><pre> +<li>Restrict access to this web interface - see the <a href="http://httpd.apache.org/docs/misc/FAQ.html#user-authentication">Apache documentation on user authentication</a>. For example, to configure user authentication with <a href="http://httpd.apache.org/docs/mod/mod_auth.html">mod_auth</a> (flat files): +<pre> <Directory /usr/local/apache/htdocs/freeside-asp> PerlSetVar Global /usr/local/etc/freeside/asp-global/ AuthName Freeside AuthType Basic -AuthUserFile /usr/local/etc/apache/htpasswd +AuthUserFile /usr/local/etc/freeside/htpasswd require valid-user </Directory> </pre> -<li>Create the necessary <a href="config.html">configuration files</a>. -<li>Create the `/usr/local/etc/freeside/counters.<i>datasrc</i>', - `/usr/local/etc/freeside/cache.<i>datasrc</i>', and - `/usr/local/etc/freeside/export.<i>datasrc</i>' directories for each <i>datasrc</i> (owned by the freeside user). - <li>As the freeside user, run bin/fs-setup to create the database tables. - <li>freeside-queued was installed with the Perl modules. Start it now and ensure that is run upon system startup. + <li>Create one or more Freeside users (your internal sales/tech folks, not customer accounts). These users are setup using using Apache authentication; they're not UNIX user accounts. For example, using <a href="http://httpd.apache.org/docs/mod/mod_auth.html">mod_auth</a> (flat files): + <ul> + <li>First user:<font size="-1"> +<pre>$ su +$ freeside-adduser -h /usr/local/etc/freeside/htpasswd -c /usr/local/etc/freeside/secrets <i>username</i></pre></font> + <li>Additional users:<font size="-1"> +<pre>$ su +$ freeside-adduser -h /usr/local/etc/freeside/htpasswd /usr/local/etc/freeside/secrets <i>username</i></pre></font> + </ul> + <i>(using other auth types, add each user to your <a href="http://httpd.apache.org/docs/misc/FAQ.html#user-authentication">Apache authentication</a> yand then run: <tt>freeside-adduser /usr/local/etc/freeside/secrets <b>username</b></tt></i> + <li>As the freeside UNIX user, run <tt>bin/fs-setup <b>username</b></tt> to create the database tables, passing the username of a Freeside user you created above: +<pre> +$ su freeside +$ bin/fs-setup <b>username</b> +</pre> + <li><tt>freeside-queued</tt> was installed with the Perl modules. Start it now and ensure that is run upon system startup. <li>Now proceed to the initial <a href="admin.html">administration</a> of your installation. </ul> </body> |