Skip to content
helloadmin edited this page Apr 8, 2014 · 28 revisions

Until further notice this branch of SuiteCRM with PBX must be installed with Postgresql as the PBX works native with Postgresql. At some point in the future this will change to support the full range of dbs supported by the main branch.

OS Install

Use Ubuntu 14.04 (Trusty) to install updates sudo apt-get update -y # Fetches the list of available updates sudo apt-

get dist-upgrade -y # Installs updates

Web Server Install:

Apache is the defacto web server. Others may work too

Include the:

  • Imap Module
  • cURL module
  • Sprite Support
  • Modify Upload File size to 20MB

Before you install SuiteCRM, set AllowOverride to All for the SuiteCRM installation directory in the httpd.conf file. After you install SuiteCRM, a .htaccess file is created in your Sugar installation directory. This file contains the following content:

# BEGIN SUITECRM RESTRICTIONS RedirectMatch 403 (?i)^.*\.log$ RedirectMatch 403 (?i)/+not_imported_.*\.txt RedirectMatch 403 (?i)/+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl) RedirectMatch 403 (?i)/+emailmandelivery\.php RedirectMatch 403 (?i)/+cache/+upload # END SUITECRM RESTRICTIONS

sudo apt-get install apache2 php5 libapache2-mod-php5 php5-imap php5-curl php5-gd -y

/bin/sed -i -e s,'upload_max_filesize = 2M','upload_max_filesize = 20M', /etc/php5/apache2/php.ini

Database Install:

see https://www.digitalocean.com/community/articles/how-to-install-and-use-postgresql-on-ubuntu-12-04

Postgresql must be installed: sudo apt-get install postgresql postgresql-contrib php5-pgsql -y

Restart Apache again to load postgres drivers sudo /etc/init.d/apache2 restart

-- SU to postgres so accounts can be setup. su - postgres

-- Create a database for this user (bug in PGSQLmanager than needs to be fixed when no database is specified psql looks for a database the same as the username which must exist) -- Create a user: Obviously change 'myPassword' so something random

-- Now create a suitecrm database as suitecrm will try to connect to this database if it is specified during install but will not create it as it fails to connect to the server because it doesn't exist, during the step to create it.

psql <<EOF \x CREATE USER crmuser WITH PASSWORD 'myPassword'; CREATE DATABASE crmuser WITH ENCODING='UTF8' OWNER=crmuser; CREATE DATABASE suitecrm WITH ENCODING='UTF8' OWNER=crmuser; EOF

-- To exit PostgreSQL prompt type \q -- Test the connection psql -Ucrmuser -W -h 127.0.0.1

Install SuiteCRM_w_PBX from git

Install git sudo apt-get install git -y

cd /var/www

git init

git clone https://github.com/helloadmin/SuiteCRM.git

cd SuiteCRM

sudo chown -R www-data:www-data .

sudo chmod -R 755 .

sudo chmod -R 775 custom modules themes data upload config_override.php

Add cron job:

(crontab -l 2>/dev/null; echo "* * * * * cd /var/www/SuiteCRM; php -f cron.php > /dev/null 2>&1") | crontab -

-- Move the root web directory for SuiteCRM to the root directory of SuiteCRM

/bin/sed -i -e s,'DocumentRoot /var/www/html','DocumentRoot /var/www/html/SuiteCRM', /etc/apache2/sites-enabled/000-default.conf

sudo /etc/init.d/apache2 restart

Open a browser and navigate to the IP or hostname of your install.

On the database page ensure that the database ip address is 127.0.0.1, the username is crmuser, database name is suitecrm and the password to whatever you made it in the database section above.

PBX Install

Copy the install script to a location to install from cp install/install_pbx.sh /usr/local/src

Clone this wiki locally