If you aren't going to work in --dev-links mode (meaning you would like a standard install of FreePBX 12) then do NOT follow the rest of this guide, failure to not adhere to these warning will only cause headaches for you, especially if you don't understand how FreePBX functions internally, instead run
mkdir /usr/src/freepbx cd /usr/src/freepbx git clone ssh://git@git.freepbx.org/freepbx/framework.git cd framework git checkout release/13.0 ./install_amp --installdb |
If you are on the FreePBX 7 Distro you can setup a development environment in less than 10 minutes. Check it out: Here
GIT
FreePBX uses GIT, an open source version control system. If you are unfamiliar with GIT, you can learn more about it at http://git-scm.com/ . If you are already familiar with Subversion, you may be interested in checking out http://git.or.cz/course/svn.html for a brief crash course based on your Subversion knowledge. Because GIT is based on a distributed system there is no 'one' central server as there was with SVN. However we consider our master server to be http://git.freepbx.org which mirrors to github at https://github.com/freepbx
Supported Modules
Supported Modules are modules that are actively supported by the FreePBX development team and are supported by FreePBX's Sponsor, Sangoma Technologies, INC. They can be found in our standard project http://git.freepbx.org/projects/FREEPBX or on our mirror at https://github.com/freepbx
Contributed Modules
Contributed modules are modules that have been submitted to the FreePBX development team to host, they are very inactive and sometimes don't have a developer attached to them. They can be found in our contributed modules project http://git.freepbx.org/projects/FPBXCN or on our mirror at https://github.com/freepbx-ContributedModules
Initial Setup
FreePBX 14 Warning
Note that FreePBX 14 requires PHP 5.6 or higher to run. Currently, no patches or pull requests will be accepted to make it run on PHP 5.5 or lower. Your development environment MUST have PHP 5.6 or higher. The easiest way to accomplish this is to install FreePBX Distro 7 and then run 'yum install freepbx-devel'
Make sure you have added your SSH key to our GIT Server: http://git.freepbx.org/plugins/servlet/ssh/account/keys
Navigate to /usr/src
cd /usr/src
Checkout the devtools repo into this starting location
git clone ssh://git@git.freepbx.org/freepbx/devtools.git
Navigate to inside the devtools repo
cd /usr/src/devtools
Install your default configuration settings to the config file (create a file in your home directory called .freepbxconfig and put the information below in it)
.freepbxconfig
repo_directory=/usr/src/freepbx language_directory=/usr/src/freepbxlocalization
Run the freepbx_git.php setup script. This script will download all of the repos from the FreePBX Project, excluding devtools, into /usr/src/ (unless you specify somewhere else using --directory). When prompted for your Username and Password, please use your FreePBX.org Username and Password.
./freepbx_git.php --setup --switch=release/13.0
Navigate to /usr/src/freepbx/framework
cd /usr/src/freepbx/framework
Run install with the '--dev-links' parameter.
./install --dev-links
Note you can add '-n' after '--dev-links', which will use secure defaults and passwords for all the services requred.
When you add the --dev-links parameter, this significantly and fundamentally changes the layout of your FreePBX machine. This parameter sets up symlinks throughout all of FreePBX and renders online module updates unreliable, at best! You should never do this on a production machine as it can easily cause significant and unexpected problems.
Receiving an Error?
PHP Fatal error: Cannot redeclare composerRequire29de5ac29f36fb522a59e5e3da081c0a() (previously declared in /usr/src/freepbx/framework/amp_conf/htdocs/admin/libraries/Composer/vendor/composer/autoload_real.php:63) in /var/www/html/admin/libraries/Composer/vendor/composer/autoload_real.php on line 70 |
This is caused because you have an existing installation of FreePBX and our installer will not override a real file with a symlink. To fix it we should, perform the following after backing up any changes you in /var/www/html:
Open /etc/freepbx.conf and get the database credentials (save them in a safe place)
Remove /etc/freepbx.conf & /etc/amportal.conf
Remove /var/www/html/
cd /usr/src/freepbx/framework
./install --dbuser=[username from /etc/freepbx.conf] --dbpass=[password from /etc/freepbx.conf] --dev-links
Maintenance
Updating Modules
Navigate to your devtools directory
cd /usr/src/devtools
Run freepbx_git with --refresh
./freepbx_git.php --refresh ./freepbx_git.php -s cd ../freepbx/framework ./install --dev-links -n
Checking Out Modules from Contributed
Navigate to your devtools directory
cd /usr/src/devtools
Check out the module using the raw name (a list of modules can be seen here: http://git.freepbx.org/projects/FPBXCN
./freepbx_git.php -m accountcodepreserve