Difference between revisions of "Freeside:2.1:Documentation:Installation"

From Freeside
Jump to: navigation, search
(Moved)
Line 1: Line 1:
== 1. Install the base system ==
+
Placeholder
- Only select the OpenSSH Package
 
 
== 2. Configure the network ==
 
 
 
Change the server to static IP
 
<pre>
 
nano /etc/network/interfaces
 
</pre>
 
Replace the below settings with you own ip addresses etc
 
<pre>
 
# This file describes the network interfaces available on your system
 
# and how to activate them. For more information, see interfaces(5).
 
 
 
# The loopback network interface
 
auto lo
 
iface lo inet loopback
 
 
 
# The primary network interface
 
auto eth0
 
iface eth0 inet static
 
        address 192.168.0.100
 
        netmask 255.255.255.0
 
        network 192.168.0.0
 
        broadcast 192.168.0.255
 
        gateway 192.168.0.1
 
</pre>
 
 
 
Set the hostname correctly
 
<pre>
 
nano /etc/hosts
 
</pre>
 
 
 
<pre>
 
127.0.0.1      localhost.localdomain  localhost
 
192.168.0.100  server1.example.com    server1
 
 
 
# The following lines are desirable for IPv6 capable hosts
 
::1    localhost ip6-localhost ip6-loopback
 
fe00::0 ip6-localnet
 
ff00::0 ip6-mcastprefix
 
ff02::1 ip6-allnodes
 
ff02::2 ip6-allrouters
 
</pre>
 
 
 
<pre>
 
echo server1.example.com > /etc/hostname
 
/etc/init.d/hostname restart
 
</pre>
 
 
 
==3. Update the system==
 
 
 
<pre>
 
apt-get update
 
apt-get upgrade
 
</pre>
 
 
 
==4. Install core packages==
 
Keep the system time correct
 
<pre>
 
apt-get install ntp ntpdate
 
</pre>
 
 
 
Apache2 etc
 
<pre>
 
apt-get install apache2 libapache2-mod-perl2 postgresql-8.4 build-essential texlive-base
 
</pre>
 
 
 
 
 
Common Perl Packages - Packages are much faster to install
 
<pre>
 
apt-get install libwww-perl liburi-perl libhtml-tagset-perl libhtml-parser-perl libdbd-pg-perl libtimedate-perl libdate-manip-perl libchart-perl
 
apt-get install libcache-cache-perl libdatetime-perl libdatetime-format-strptime-perl libdatetime-format-natural-perl libemail-sender-perl
 
apt-get install libhtml-mason-perl libmailtools-perl libmail-mboxparser-perl libnetaddr-ip-perl libnet-ping-external-perl
 
apt-get install libnumber-format-perl libnumber-format-perl libspreadsheet-writeexcel-perl libstring-approx-perl libtext-csv-xs-perl
 
apt-get install libtext-template-perl libnet-ping-external-perl libterm-readkey-perl libnet-ssleay-perl
 
</pre>
 
Additional Perl Packages
 
<pre>
 
apt-get install libfile-counterfile-perl libfile-policy-perl libipc-run-perl libipc-run3-perl libjson-perl
 
apt-get install liblingua-en-nameparse-perl liblingua-en-inflect-perl libnet-domain-tld-perl libnet-ssh2-perl
 
apt-get install libnet-whois-raw-perl libtime-duration-perl
 
</pre>
 
Modules not available as packages - Allow cpan to prepend any dependencies
 
<pre>
 
cpan Authen::Passphrase Business::CreditCard Business::US::USPS::WebTools Color::Scheme Crypt::PasswdMD5 Frontier::RPC2 HTML::Defang
 
cpan HTML::Widgets::SelectLayers String::ShellQuote Tie::IxHash Apache::DBI Email::Sender::Transport::SMTP::TLS DBIx::DBSchema
 
</pre>
 
 
 
==5. Prepare the system==
 
 
 
Download latest freeside tar and extract
 
<pre>
 
mkdir /freesidesource
 
cd /freesidesource
 
wget http://www.freeside.biz/freeside/freeside-2.1.1.tar.gz
 
tar -zxvf freeside-2.1.1.tar.gz
 
</pre>
 
 
 
Add the freeside user
 
<pre>
 
adduser freeside
 
</pre>
 
 
 
Grant permissions to freeside in postgresql
 
<pre>
 
#su postgres
 
$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
 
$exit
 
</pre>
 
 
 
Edit the Makefile
 
Set DB_PASSWORD to the freeside database user's password.
 
<pre>
 
cd /freesidesource/freeside-2.1.1
 
nano Makefile
 
</pre>
 
 
 
Add the database
 
<pre>
 
#su freeside
 
$createdb -E Unicode freeside
 
</pre>
 
 
 
Set the encoding
 
*Uncomment client_encoding and set it to Latin1
 
<pre>
 
nano /etc/postgresql/8.4/main/postgresql.conf
 
</pre>
 
 
 
Configure Apache
 
*Set user to freeside
 
<pre>
 
nano /etc/apache2/httpd.conf
 
</pre>
 
*Add
 
<pre>
 
User freeside
 
Group Freeside
 
</pre>
 
 
 
==6. Install freeside==
 
 
 
Build and Install the Perl modules - stay as freeside user
 
<pre>
 
cd /freeside/freeside-2.1.1
 
make perl-modules
 
su
 
make install-perl-modules
 
</pre>
 
 
 
Create config files
 
<pre>
 
make create-config
 
</pre>
 
 
 
Invoice Typesetting
 
<pre>
 
make install-texmf
 
</pre>
 
 
 
Install the Web Interface
 
<pre>
 
make install-docs
 
</pre>
 
 
 
Install Apache Config
 
<pre>
 
make install-apache
 
</pre>
 
 
 
Drop back to freeside permissions
 
<pre>
 
su freeside
 
</pre>
 
 
 
Initialize Data
 
<pre>
 
freeside-setup -d example.com
 
</pre>
 
 
 
Stay as freeside user and add additional users
 
<pre>
 
freeside-adduser -g 1 fs_queue
 
freeside-adduser -g 1 fs_daily
 
freeside-adduser -g 1 fs_selfservice
 
</pre>
 
 
 
Reboot
 
 
 
== Trouble Shooting ==
 
* If freeside-setup fails its often due to a missing perl module - google the .pm filename and find and install the module
 

Revision as of 22:07, 10 December 2010

Placeholder