Difference between revisions of "Freeside:4:Documentation:InstallingOnDebian8"

From Freeside
Jump to: navigation, search
(Installation)
Line 1: Line 1:
= Prerequisites =
+
= Configure package repositories =
 
+
* Add the following apt sources to <code>/etc/apt/sources.list</code> (for Debian 8.x "jessie"):
== Aptitude & Required Libraries ==
 
=== Add the freeside repository ===
 
* Add the following apt source to <code>/etc/apt/sources.list</code> (for Debian 8.x "jessie"):
 
  
 
<pre>
 
<pre>
 
deb http://freeside.biz/~ivan/freeside-jessie/ ./
 
deb http://freeside.biz/~ivan/freeside-jessie/ ./
 +
deb http://freeside.biz/~jeremyd/freeside4-jessie-stable/ ./
 
</pre>
 
</pre>
  
 
* Run <code>aptitude update</code>.
 
* Run <code>aptitude update</code>.
  
=== Install the Appropriate Packages ===
+
= Install =
 +
 
 +
<pre>
 +
aptitude install freeside freeside-lib freeside-webui
 +
apt-mark hold freeside*
 +
</pre>
  
* Run this command to install all prerequisites:
+
= Database setup =
  
 +
== Database User ==
 +
* Allow the freeside user full access to the freeside database.
 +
with Postgresql:
 +
<pre>
 +
[ as postgres/pgsql user ]
 +
$ createuser -P freeside
 +
Enter password for new role:
 +
Enter it again:
 +
Shall the new role be a superuser? (y/n) n
 +
Shall the new role be allowed to create databases? (y/n) y
 +
Shall the new role be allowed to create more new roles? (y/n) n
 +
</pre>
 +
or with MySQL:
 
<pre>
 
<pre>
aptitude install adduser apache2 apache2-mpm-prefork apache2-utils gcc gnupg ghostscript gsfonts gzip latex-xcolor \
+
$ mysqladmin -u root password 'set_a_root_database_password'
  less libapache-dbi-perl libapache2-mod-perl2 libapache2-request-perl libapache-session-perl \
+
$ mysql -u root -p
  libbusiness-creditcard-perl libcache-cache-perl libcache-simple-timedexpiry-perl libchart-perl \
+
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY 'set_a_freeside_database_password';
  libclass-container-perl libclass-data-inheritable-perl libclass-returnvalue-perl libcolor-scheme-perl \
 
  libio-compress-perl libconvert-binhex-perl libcrypt-passwdmd5-perl libcrypt-ssleay-perl libcss-squish-perl \
 
  libdate-manip-perl libdbd-mysql-perl libdbd-pg-perl libdbi-perl libdbix-dbschema-perl libdbix-searchbuilder-perl \
 
  libdevel-stacktrace-perl libdevel-symdump-perl liberror-perl libexception-class-perl \
 
  libfile-counterfile-perl libfile-rsync-perl libfont-afm-perl libfreezethaw-perl libfrontier-rpc-perl \
 
  libgd-gd2-perl libgd-graph-perl libgd2-xpm libhtml-format-perl libhtml-mason-perl libhtml-parser-perl \
 
  libhtml-scrubber-perl libhtml-tagset-perl libhtml-tree-perl libhtml-widgets-selectlayers-perl libio-stringy-perl \
 
  libipc-run-perl libipc-run3-perl libipc-sharelite-perl libjavascript-rpc-perl libjson-perl \
 
  liblingua-en-inflect-perl liblingua-en-nameparse-perl liblocale-gettext-perl liblocale-maketext-fuzzy-perl \
 
  liblocale-maketext-lexicon-perl liblocale-subcountry-perl liblog-dispatch-perl libmailtools-perl libmime-tools-perl \
 
  libmodule-versions-report-perl libnet-daemon-perl libnet-ping-external-perl libnet-scp-perl libnet-ssh-perl \
 
  libnet-whois-raw-perl libnetaddr-ip-perl libnumber-format-perl libpam-modules libpam-runtime libpaper-utils \
 
  libparams-validate-perl libparse-recdescent-perl libpcre3 libpg-perl libregexp-common-perl \
 
  libspreadsheet-writeexcel-perl libstring-approx-perl libstring-shellquote-perl libterm-readkey-perl \
 
  libtest-inline-perl libtext-autoformat-perl libtext-charwidth-perl libtext-csv-perl libtext-iconv-perl \
 
  libtext-quoted-perl libtext-reform-perl libtext-template-perl libtext-wrapi18n-perl libtext-wrapper-perl \
 
  libtie-ixhash-perl libtime-duration-perl libtime-modules-perl libtimedate-perl libtree-simple-perl \
 
  libuniversal-require-perl liburi-perl libwant-perl libwww-perl libxml-parser-perl libyaml-perl lmodern make \
 
  perl perl-base perl-modules postgresql postgresql-client rsync openssh-client openssh-server texlive \
 
  texlive-latex-extra texinfo traceroute ttf-bitstream-vera ttf-dustin ucf zlib1g \
 
  libdatetime-perl libdatetime-format-strptime-perl libfile-slurp-perl libspreadsheet-parseexcel-perl \
 
  libauthen-passphrase-perl libnet-domain-tld-perl libbusiness-us-usps-webtools-perl libxml-simple-perl \
 
  libemail-sender-perl libemail-sender-transport-smtp-tls-perl libemail-sender-perl \
 
  libemail-sender-transport-smtp-tls-perl libhtml-defang-perl libdatetime-format-natural-perl libcgi-pm-perl \
 
  libfile-sharedir-perl libmodule-versions-report-perl libtext-wikiformat-perl libnet-server-perl \
 
  libhttp-server-simple-perl libhtml-rewriteattributes-perl libmime-types-perl libperlio-eol-perl \
 
  libgnupg-interface-perl libdata-ical-perl libcalendar-simple-perl libdatetime-set-perl \
 
  libhook-lexwrap-perl libhttp-server-simple-mason-perl libxml-rss-perl libipc-run-safehandles-perl libpoe-perl \
 
  libsoap-lite-perl libhtml-tableextract-perl libhtml-element-extended-perl libcam-pdf-perl libgd-barcode-perl \
 
  libnet-openssh-perl libgeo-coder-googlev3-perl libgeo-googleearth-pluggable-perl libnet-snmp-perl \
 
  libcrypt-openssl-rsa-perl libpdf-webkit-perl wkhtmltopdf xvfb \
 
  sam2p psmisc libsys-sigaction-perl liblog-dispatch-perl libconvert-color-perl libdate-simple-perl libemail-valid-perl \
 
  libencode-perl libexcel-writer-xlsx-perl libhtml-mason-psgihandler-perl libhtml-quoted-perl libio-string-perl \
 
  libregexp-common-net-cidr-perl libregexp-ipv6-perl libsnmp-perl libtext-password-pronounceable-perl \
 
  libparse-fixedlength-perl libnet-sftp-foreign-perl libnet-mac-vendor-perl liblocale-currency-format-perl \
 
  libapache2-authcookie-perl
 
 
</pre>
 
</pre>
  
= Installation =
+
== Database Access ==
 +
* Configure /usr/local/etc/freeside/secrets if necessary.  This file contains three lines: DBI datasource, username and password
 +
** See the DBI manpage and the manpage for your DBD for the exact syntax of your DBI data source.
 +
 
 +
== Database ==
 +
* Add the freeside database to your database engine:
 +
with Postgres:
 +
<pre>
 +
$ su freeside
 +
$ createdb -E UTF8 freeside
 +
</pre>
 +
or with MySQL:
 +
<pre>
 +
$ mysqladmin -u freeside -p create freeside
 +
</pre>
 +
 
 +
= Bootstrap Freeside =
 +
 
 +
== Freeside database ==
 +
 
 +
* As the freeside UNIX user, run <code>freeside-setup -d your.domain.name</code> to create the database tables and initial data.
 +
<pre>
 +
$ su freeside
 +
$ freeside-setup -d example.com
 +
</pre>
 +
 
 +
== RT database ==
 +
 
 +
* As the freeside UNIX user, run:
 +
<pre>
 +
$ su freeside
 +
$ /opt/rt3/sbin/rt-setup-database --action schema
 +
$ /opt/rt3/sbin/rt-setup-database --action coredata
 +
$ /opt/rt3/sbin/rt-setup-database --action insert --datafile /opt/rt3/etc/initialdata
 +
</pre>
 +
 
 +
== System users ==
 +
* Create the Freeside system users:
 +
<pre>
 +
$ su freeside
 +
$ freeside-adduser -g 1 fs_queue
 +
$ freeside-adduser -g 1 fs_daily
 +
$ freeside-adduser -g 1 fs_selfservice
 +
$ freeside-adduser -g 1 fs_api
 +
</pre>
 +
 
 +
== Employees ==
 +
* Create one or more Freeside users (your internal sales/tech folks, not customer accounts):
 +
<pre>
 +
$ su freeside
 +
$ freeside-adduser -g 1 username
 +
$ htpasswd /usr/local/etc/freeside/htpasswd username
 +
Password:
 +
</pre>
 +
Additional users can be added using the same command or from the web interface.
 +
 
 +
= Restart freeside =
 +
 
 +
* <code>/etc/init.d/freeside restart</code>
 +
 
 +
= Apache & Web GUI =
 +
* Edit /etc/apache2/envvars and set APACHE_RUN_USER and APACHE_RUN_GROUP to <code>freeside</code>
 +
* <code>a2enconf freeside-base2</code>
 +
* <code>a2enconf freeside-rt</code>
 +
* <code>a2dismod mpm_event</code>
 +
* <code>a2enmod mpm_prefork</code>
 +
* <code>chown freeside /var/lock/apache2</code>
 +
* Restart Apache
 +
* The web interface will be available at /freeside
  
Follow the [[Freeside:3:Documentation:Installation#Installation|regular installation instructions]].
+
= Next steps =
 +
* Log into the web interface using the username and password you entered above.
 +
* Proceed to the initial [[Freeside:3:Documentation:Administration|administration]] of your installation.

Revision as of 01:43, 17 February 2016

Configure package repositories

  • Add the following apt sources to /etc/apt/sources.list (for Debian 8.x "jessie"):
deb http://freeside.biz/~ivan/freeside-jessie/ ./
deb http://freeside.biz/~jeremyd/freeside4-jessie-stable/ ./
  • Run aptitude update.

Install

aptitude install freeside freeside-lib freeside-webui
apt-mark hold freeside*

Database setup

Database User

  • Allow the freeside user full access to the freeside database.

with Postgresql:

[ as postgres/pgsql user ]
$ createuser -P freeside 
Enter password for new role: 
Enter it again: 
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n

or with MySQL:

$ mysqladmin -u root password 'set_a_root_database_password'
$ mysql -u root -p
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY 'set_a_freeside_database_password';

Database Access

  • Configure /usr/local/etc/freeside/secrets if necessary. This file contains three lines: DBI datasource, username and password
    • See the DBI manpage and the manpage for your DBD for the exact syntax of your DBI data source.

Database

  • Add the freeside database to your database engine:

with Postgres:

$ su freeside
$ createdb -E UTF8 freeside

or with MySQL:

$ mysqladmin -u freeside -p create freeside 

Bootstrap Freeside

Freeside database

  • As the freeside UNIX user, run freeside-setup -d your.domain.name to create the database tables and initial data.
$ su freeside
$ freeside-setup -d example.com

RT database

  • As the freeside UNIX user, run:
$ su freeside
$ /opt/rt3/sbin/rt-setup-database --action schema
$ /opt/rt3/sbin/rt-setup-database --action coredata
$ /opt/rt3/sbin/rt-setup-database --action insert --datafile /opt/rt3/etc/initialdata

System users

  • Create the Freeside system users:
$ su freeside
$ freeside-adduser -g 1 fs_queue
$ freeside-adduser -g 1 fs_daily
$ freeside-adduser -g 1 fs_selfservice
$ freeside-adduser -g 1 fs_api

Employees

  • Create one or more Freeside users (your internal sales/tech folks, not customer accounts):
$ su freeside
$ freeside-adduser -g 1 username
$ htpasswd /usr/local/etc/freeside/htpasswd username
Password: 

Additional users can be added using the same command or from the web interface.

Restart freeside

  • /etc/init.d/freeside restart

Apache & Web GUI

  • Edit /etc/apache2/envvars and set APACHE_RUN_USER and APACHE_RUN_GROUP to freeside
  • a2enconf freeside-base2
  • a2enconf freeside-rt
  • a2dismod mpm_event
  • a2enmod mpm_prefork
  • chown freeside /var/lock/apache2
  • Restart Apache
  • The web interface will be available at /freeside

Next steps

  • Log into the web interface using the username and password you entered above.
  • Proceed to the initial administration of your installation.