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

From Freeside
Jump to: navigation, search
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Summary ==
 
== Summary ==
 
Tested with Ubuntu 10.4 LTS
 
Tested with Ubuntu 10.4 LTS
 +
Step by step instructions
  
 
== 1. Install the base system ==
 
== 1. Install the base system ==
Line 28: Line 29:
 
         broadcast 192.168.0.255
 
         broadcast 192.168.0.255
 
         gateway 192.168.0.1
 
         gateway 192.168.0.1
 +
</pre>
 +
 +
Restart networking
 +
<pre>
 +
/etc/init.d/networking restart
 
</pre>
 
</pre>
  
Line 35: Line 41:
 
</pre>
 
</pre>
  
 +
In this example the name of the host is ''server1.example.com''
 
<pre>
 
<pre>
 
127.0.0.1      localhost.localdomain  localhost
 
127.0.0.1      localhost.localdomain  localhost
Line 47: Line 54:
 
</pre>
 
</pre>
  
 +
Use the name found in the hosts file and update the hostname file.
 
<pre>
 
<pre>
 
echo server1.example.com > /etc/hostname
 
echo server1.example.com > /etc/hostname
Line 77: Line 85:
 
apt-get install libhtml-mason-perl libmailtools-perl libmail-mboxparser-perl libnetaddr-ip-perl libnet-ping-external-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 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  
+
apt-get install libtext-template-perl libnet-ping-external-perl libterm-readkey-perl libnet-ssleay-perl libhtml-tableextract-perl
 
</pre>
 
</pre>
 
Additional Perl Packages
 
Additional Perl Packages
Line 83: Line 91:
 
apt-get install libfile-counterfile-perl libfile-policy-perl libipc-run-perl libipc-run3-perl libjson-perl  
 
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 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  
+
apt-get install libnet-whois-raw-perl libtime-duration-perl liblocale-subcountry-perl
 
</pre>
 
</pre>
 
Modules not available as packages - Allow cpan to prepend any dependencies  
 
Modules not available as packages - Allow cpan to prepend any dependencies  
 +
- Cpan may complain about YAML you can optionally install this if you choose.
 
<pre>
 
<pre>
cpan Authen::Passphrase Business::CreditCard Business::US::USPS::WebTools Color::Scheme Crypt::PasswdMD5 Frontier::RPC2 HTML::Defang
+
cpan Authen::Passphrase Business::CreditCard Business::US::USPS::WebTools Color::Scheme Crypt::PasswdMD5 Frontier::RPC2 HTML::Defang Net::SSH
cpan HTML::Widgets::SelectLayers String::ShellQuote Tie::IxHash Apache::DBI Email::Sender::Transport::SMTP::TLS DBIx::DBSchema
+
cpan HTML::Widgets::SelectLayers String::ShellQuote Tie::IxHash Apache::DBI Email::Sender::Transport::SMTP::TLS DBIx::DBSchema HTML::ElementTable
 
</pre>
 
</pre>
  
Line 99: Line 108:
 
wget http://www.freeside.biz/freeside/freeside-2.1.1.tar.gz
 
wget http://www.freeside.biz/freeside/freeside-2.1.1.tar.gz
 
tar -zxvf freeside-2.1.1.tar.gz
 
tar -zxvf freeside-2.1.1.tar.gz
 +
chmod 777 -R /freesidesource
 
</pre>
 
</pre>
  
Line 107: Line 117:
  
 
Grant permissions to freeside in postgresql
 
Grant permissions to freeside in postgresql
 +
<br>
 +
'''''Note''' - If your freeside database user's password contains a $ symbol, it is currently not handled properly by the "make create-rt" step of the integrated RT ticketing system install''
 
<pre>
 
<pre>
 
#su postgres
 
#su postgres
Line 129: Line 141:
 
#su freeside
 
#su freeside
 
$createdb -E Unicode freeside
 
$createdb -E Unicode freeside
 +
exit
 
</pre>
 
</pre>
  
Line 135: Line 148:
 
<pre>
 
<pre>
 
nano /etc/postgresql/8.4/main/postgresql.conf
 
nano /etc/postgresql/8.4/main/postgresql.conf
 +
/etc/init.d/postgresql-8.4 restart
 
</pre>
 
</pre>
  
Line 145: Line 159:
 
<pre>
 
<pre>
 
User freeside
 
User freeside
Group Freeside
+
Group freeside
 
</pre>
 
</pre>
  
Line 152: Line 166:
 
Build and Install the Perl modules - stay as freeside user
 
Build and Install the Perl modules - stay as freeside user
 
<pre>
 
<pre>
cd /freeside/freeside-2.1.1
+
su freeside
 +
cd /freesidesource/freeside-2.1.1
 
make perl-modules
 
make perl-modules
 
su
 
su
Line 201: Line 216:
 
$ htpasswd /usr/local/etc/freeside/htpasswd username
 
$ htpasswd /usr/local/etc/freeside/htpasswd username
 
Password:  
 
Password:  
 +
</pre>
 +
 +
=== RT ===
 +
* Either [[Freeside:2.1:Documentation:RT_Installation:Ubuntu|install the integrated RT ticketing system]], or delete the <code>ticket_system</code> entry from your conf table.
 +
 +
EDIT - I have reports that the below still fails - just for now install the RT system to get everything going.
 +
 +
<pre>
 +
su freeside
 +
psql freeside
 +
delete from conf where name = 'ticket_system';
 
</pre>
 
</pre>
  

Latest revision as of 18:11, 16 November 2011

Summary

Tested with Ubuntu 10.4 LTS Step by step instructions

1. Install the base system

- Only select the OpenSSH Package

2. Configure the network

Change the server to static IP

nano /etc/network/interfaces

Replace the below settings with you own ip addresses etc

# 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

Restart networking

/etc/init.d/networking restart

Set the hostname correctly

nano /etc/hosts

In this example the name of the host is server1.example.com

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

Use the name found in the hosts file and update the hostname file.

echo server1.example.com > /etc/hostname
/etc/init.d/hostname restart

3. Update the system

apt-get update
apt-get upgrade

4. Install core packages

Keep the system time correct

apt-get install ntp ntpdate

Apache2 etc

apt-get install apache2 libapache2-mod-perl2 postgresql-8.4 build-essential texlive-base


Common Perl Packages - Packages are much faster to install

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 libhtml-tableextract-perl

Additional Perl Packages

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 liblocale-subcountry-perl

Modules not available as packages - Allow cpan to prepend any dependencies - Cpan may complain about YAML you can optionally install this if you choose.

cpan Authen::Passphrase Business::CreditCard Business::US::USPS::WebTools Color::Scheme Crypt::PasswdMD5 Frontier::RPC2 HTML::Defang Net::SSH
cpan HTML::Widgets::SelectLayers String::ShellQuote Tie::IxHash Apache::DBI Email::Sender::Transport::SMTP::TLS DBIx::DBSchema HTML::ElementTable

5. Prepare the system

Download latest freeside tar and extract

mkdir /freesidesource
cd /freesidesource
wget http://www.freeside.biz/freeside/freeside-2.1.1.tar.gz
tar -zxvf freeside-2.1.1.tar.gz
chmod 777 -R /freesidesource

Add the freeside user

adduser freeside

Grant permissions to freeside in postgresql
Note - If your freeside database user's password contains a $ symbol, it is currently not handled properly by the "make create-rt" step of the integrated RT ticketing system install

#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 

Edit the Makefile Set DB_PASSWORD to the freeside database user's password.

cd /freesidesource/freeside-2.1.1
nano Makefile

Add the database

#su freeside
$createdb -E Unicode freeside
exit

Set the encoding

  • Uncomment client_encoding and set it to Latin1
nano /etc/postgresql/8.4/main/postgresql.conf
/etc/init.d/postgresql-8.4 restart

Configure Apache

  • Set user to freeside
nano /etc/apache2/httpd.conf
  • Add
User freeside
Group freeside

6. Install freeside

Build and Install the Perl modules - stay as freeside user

su freeside
cd /freesidesource/freeside-2.1.1
make perl-modules
su
make install-perl-modules

Create config files

make create-config

Invoice Typesetting

make install-texmf

Install the Web Interface

make install-docs

Install Apache Config

make install-apache

Drop back to freeside permissions

su freeside

Initialize Data

freeside-setup -d example.com

Stay as freeside user and add additional users

freeside-adduser -g 1 fs_queue
freeside-adduser -g 1 fs_daily
freeside-adduser -g 1 fs_selfservice

Add first freeside user / administrator

$ su freeside
$ freeside-adduser -g 1 username
$ htpasswd /usr/local/etc/freeside/htpasswd username
Password: 

RT

EDIT - I have reports that the below still fails - just for now install the RT system to get everything going.

su freeside
psql freeside
delete from conf where name = 'ticket_system';

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